Bug 2217472 - VM is not catching machine type from Kubevirt
Summary: VM is not catching machine type from Kubevirt
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Virtualization
Version: 4.14.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.14.0
Assignee: Antonio Cardace
QA Contact: Kedar Bidarkar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-26 11:33 UTC by Akriti Gupta
Modified: 2023-11-08 14:06 UTC (History)
1 user (show)

Fixed In Version: hco-bundle-registry-container-v4.14.0.rhel9-1546
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-08 14:05:51 UTC
Target Upstream Version:
Embargoed:
akrgupta: needinfo+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt hyperconverged-cluster-operator pull 2437 0 None Merged Fix cluster-wide MachineType 2023-07-31 11:01:14 UTC
Github kubevirt kubevirt pull 10101 0 None Merged Fix and deprecate `machineType` in KubeVirt CR Config 2023-07-31 11:01:17 UTC
Red Hat Issue Tracker CNV-30288 0 None None None 2023-06-26 11:36:49 UTC
Red Hat Product Errata RHSA-2023:6817 0 None None None 2023-11-08 14:06:06 UTC

Description Akriti Gupta 2023-06-26 11:33:48 UTC
Description of problem: When creating a VM on 4.14 without explixitely mentioning machineType, it does not pick-up default from Kubevirt CR 

[akriti@fedora ~]$ oc get vm vm1-rhel87-ocs -o yaml | grep -A 2 machine*
        machine:
          type: q35
[akriti@fedora ~]$ oc get kubevirt kubevirt-kubevirt-hyperconverged -n openshift-cnv -o yaml | grep machineType
    machineType: pc-q35-rhel9.2.0


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. create a vm , without explicitely mentioning machineType
2. check default machineType onm running VM 
3.

Actual results:
      machine:
          type: q35

Expected results:
      machine:
          type: pc-q35-rhel9.2.0 

Additional info:

Comment 1 Antonio Cardace 2023-07-13 09:19:36 UTC
@akrgupta thanks for filing this, the culprit is this PR https://github.com/kubevirt/kubevirt/pull/8293 which changed KubeVirt to ignore `spec.configuration.machineType` in favor of the new arch-specific configuration in `spec.configuration.architectureConfiguration.amd64.machineType`.

While I fix this you can just use the new field as a workaround.

To fix it I'll do 2 PRs, the first downstream to use the new field by default and another one to still take into account the old field while declaring it as deprecated.

Comment 2 zhe peng 2023-08-10 03:36:39 UTC
verify with build: CNV-v4.14.0.rhel9-1553

1. check default from kubevirt CR
$ oc get kubevirt kubevirt-kubevirt-hyperconverged -n openshift-cnv -o yaml | grep machineType
        machineType: pc-q35-rhel9.2.0
    machineType: pc-q35-rhel9.2.0

2. create a vm with default setting
check default machineType on  VM 
$ oc get vm vm-fedora -o yaml | grep -A 2 machine*
        machine:
          type: pc-q35-rhel9.2.0
        resources:

move to verified.

Comment 4 errata-xmlrpc 2023-11-08 14:05:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Virtualization 4.14.0 Images security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:6817


Note You need to log in before you can comment on or make changes to this bug.