diff --git a/common-clusterpreferences-bundle.yaml b/common-clusterpreferences-bundle.yaml index c281d3bd..816171b2 100644 --- a/common-clusterpreferences-bundle.yaml +++ b/common-clusterpreferences-bundle.yaml @@ -599,6 +599,11 @@ spec: preferredUseEfi: true preferredUseSecureBoot: true preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 2 + memory: + guest: 4Gi --- apiVersion: instancetype.kubevirt.io/v1beta1 kind: VirtualMachineClusterPreference @@ -658,6 +663,11 @@ spec: preferredUseEfi: true preferredUseSecureBoot: true preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 2 + memory: + guest: 4Gi --- apiVersion: instancetype.kubevirt.io/v1beta1 kind: VirtualMachineClusterPreference @@ -826,6 +836,11 @@ spec: vapic: {} vpindex: {} preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi --- apiVersion: instancetype.kubevirt.io/v1beta1 kind: VirtualMachineClusterPreference @@ -880,6 +895,11 @@ spec: vapic: {} vpindex: {} preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi --- apiVersion: instancetype.kubevirt.io/v1beta1 kind: VirtualMachineClusterPreference diff --git a/common-instancetypes-all-bundle.yaml b/common-instancetypes-all-bundle.yaml index ab509116..10eec634 100644 --- a/common-instancetypes-all-bundle.yaml +++ b/common-instancetypes-all-bundle.yaml @@ -1581,6 +1581,11 @@ spec: preferredUseEfi: true preferredUseSecureBoot: true preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 2 + memory: + guest: 4Gi --- apiVersion: instancetype.kubevirt.io/v1beta1 kind: VirtualMachineClusterPreference @@ -1640,6 +1645,11 @@ spec: preferredUseEfi: true preferredUseSecureBoot: true preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 2 + memory: + guest: 4Gi --- apiVersion: instancetype.kubevirt.io/v1beta1 kind: VirtualMachineClusterPreference @@ -1808,6 +1818,11 @@ spec: vapic: {} vpindex: {} preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi --- apiVersion: instancetype.kubevirt.io/v1beta1 kind: VirtualMachineClusterPreference @@ -1862,6 +1877,11 @@ spec: vapic: {} vpindex: {} preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi --- apiVersion: instancetype.kubevirt.io/v1beta1 kind: VirtualMachineClusterPreference @@ -3687,6 +3707,11 @@ spec: preferredUseEfi: true preferredUseSecureBoot: true preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 2 + memory: + guest: 4Gi --- apiVersion: instancetype.kubevirt.io/v1beta1 kind: VirtualMachinePreference @@ -3746,6 +3771,11 @@ spec: preferredUseEfi: true preferredUseSecureBoot: true preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 2 + memory: + guest: 4Gi --- apiVersion: instancetype.kubevirt.io/v1beta1 kind: VirtualMachinePreference @@ -3914,6 +3944,11 @@ spec: vapic: {} vpindex: {} preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi --- apiVersion: instancetype.kubevirt.io/v1beta1 kind: VirtualMachinePreference @@ -3968,6 +4003,11 @@ spec: vapic: {} vpindex: {} preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi --- apiVersion: instancetype.kubevirt.io/v1beta1 kind: VirtualMachinePreference diff --git a/common-instancetypes/preferences/windows/11/kustomization.yaml b/common-instancetypes/preferences/windows/11/kustomization.yaml index 189f7f28..08411a48 100644 --- a/common-instancetypes/preferences/windows/11/kustomization.yaml +++ b/common-instancetypes/preferences/windows/11/kustomization.yaml @@ -9,5 +9,6 @@ resources: components: - ./metadata + - ./requirements - ../../components/tpm - ../../components/secureboot diff --git a/common-instancetypes/preferences/windows/2k16/kustomization.yaml b/common-instancetypes/preferences/windows/2k16/kustomization.yaml index 59599be8..18636a39 100644 --- a/common-instancetypes/preferences/windows/2k16/kustomization.yaml +++ b/common-instancetypes/preferences/windows/2k16/kustomization.yaml @@ -7,5 +7,6 @@ resources: components: - ./metadata + - ./requirements nameSuffix: .2k16 diff --git a/common-preferences-bundle.yaml b/common-preferences-bundle.yaml index 14692885..95ba7ea9 100644 --- a/common-preferences-bundle.yaml +++ b/common-preferences-bundle.yaml @@ -599,6 +599,11 @@ spec: preferredUseEfi: true preferredUseSecureBoot: true preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 2 + memory: + guest: 4Gi --- apiVersion: instancetype.kubevirt.io/v1beta1 kind: VirtualMachinePreference @@ -658,6 +663,11 @@ spec: preferredUseEfi: true preferredUseSecureBoot: true preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 2 + memory: + guest: 4Gi --- apiVersion: instancetype.kubevirt.io/v1beta1 kind: VirtualMachinePreference @@ -826,6 +836,11 @@ spec: vapic: {} vpindex: {} preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi --- apiVersion: instancetype.kubevirt.io/v1beta1 kind: VirtualMachinePreference @@ -880,6 +895,11 @@ spec: vapic: {} vpindex: {} preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi --- apiVersion: instancetype.kubevirt.io/v1beta1 kind: VirtualMachinePreference diff --git a/scripts/functest.sh b/scripts/functest.sh index 5d3ea456..e7f0ad1d 100755 --- a/scripts/functest.sh +++ b/scripts/functest.sh @@ -35,9 +35,9 @@ for preference in $(${KUBECTL} get virtualmachineclusterpreferences --no-headers fi fi - # Ensure a VirtualMachine can be created when enough resources are provided using the u1.medium instance type - if ! ${VIRTCTL} create vm --instancetype u1.medium --preference "${preference}" --volume-containerdisk name:disk,src:quay.io/containerdisks/fedora:latest --name "vm-${preference}" | ${KUBECTL} apply -f - ; then - echo "functest failed on preference ${preference} using instancetype u1.medium" + # Ensure a VirtualMachine can be created when enough resources are provided using the u1.large instance type + if ! ${VIRTCTL} create vm --instancetype u1.large --preference "${preference}" --volume-containerdisk name:disk,src:quay.io/containerdisks/fedora:latest --name "vm-${preference}" | ${KUBECTL} apply -f - ; then + echo "functest failed on preference ${preference} using instancetype u1.large" exit 1 fi ${KUBECTL} delete "vm/vm-${preference}"