Description of problem: Failed to add sata disk to VM which with virtio disk, CNV create the VM yaml file with ioThreadsPolicy: shared, but sata disk don't support iothread in libvirt. Version-Release number of selected component (if applicable): CNV2.6.0 How reproducible: 100% Steps to Reproduce: 1. Login to web console, Project: openshift-cnv, Create a VM. Click "Virtualization" -> Virtual Machines -> Create: Virtual Machine with Wizard, Select a template: "Red Hat Enterprise Linux 8.0 + VM" -> Next, Boot source type: Import via URL (creates PVC) Import URL: http://s3-qe-cn-storage.usersys.redhat.com/libvirt-CI-resources/RHEL-8.3-x86_64-latest.qcow2 Persitent Volume Claim size: 12 GiB Advanced: Storage class: manual Access mode: Single User(RWO) Click Next, Project: openshift-cnv Virtual Machine Name: rhel8-deep-anglerfish Flavor: Small 1 CPU| 2 GiB Memory Storage: 2 Disks Workload profile: server Boot source: Boot from disk *** Select: Start this virtual machine after creation Click "Customize virtual machine": -> Networking: Name: default, click "Next" -> Storage: "Next" -> Advanced: "Next" -> Review: "Create Virtual Machine 2.Create the PV, check the PV is created, and Bound to PVC. The DV is 100.0% Succeeded. #oc create -f pv-dv-nfs-rhel.yaml 3. Login to VM, check the interface, touch file in VM. 4. On VM page, click "Disks" -> "Add Disk", add a sata disk. Add Disk: Source: Blank(create PVC); Name: disk-0; Size: 2 GiB; interface: sata; Type: Disk; Storage Class: manual; Volume Mode: Filesystem; Access Mode: RWO 5. Create PV for new added disk: pv-disk-nfs-rhel.yaml, check the PV is created, and Bound to PVC. The DV is 100.0% Succeeded. # oc create -f pv-disk-nfs-rhel.yaml 6. Restart the VM, the VM is failed to start, get error: # oc get vmi NAME AGE PHASE IP NODENAME rhel8-deep-anglerfish 3m4s Scheduled 10.131.0.48 intel-e52650-16-4.englab.nay.redhat.com # oc describe vmi rhel8-deep-anglerfish ...... Message: server error. command SyncVMI failed: "LibvirtError(Code=67, Domain=10, Message='unsupported configuration: IOThreads not available for bus sata target sda')" ...... 7. Check the VM is shutoff and the disk xml is as below: # oc rsh virt-launcher-rhel8-deep-anglerfish-ptcqb sh-4.4# virsh list --all Id Name State ------------------------------------------------------ - openshift-cnv_rhel8-deep-anglerfish shut off sh-4.4# virsh dumpxml openshift-cnv_rhel8-deep-anglerfish|grep disk -A 8 <disk type='file' device='disk'> <driver name='qemu' type='raw' iothread='1'/> <source file='/var/run/kubevirt-ephemeral-disks/cloud-init-data/openshift-cnv/rhel8-deep-anglerfish/noCloud.iso'/> <target dev='vda' bus='virtio'/> <alias name='ua-cloudinitdisk'/> <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='raw' iothread='1'/> <source file='/var/run/kubevirt-private/vmi-disks/rootdisk/disk.img'/> <target dev='vdb' bus='virtio'/> <boot order='1'/> <alias name='ua-rootdisk'/> <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='raw' iothread='1'/> <source file='/var/run/kubevirt-private/vmi-disks/disk-0/disk.img'/> <target dev='sda' bus='sata'/> <alias name='ua-disk-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> 8. Check the VM yaml file. There is "ioThreadsPolicy: shared", thus the disk xml with iothread part, but the sata disk don't support iothread in libvirt. Actual results: In step6, failed to restart VM. Expected results: In step6, restart VM successfully. Additional info: - rhel8.yaml - describe_rhel8-deep-anglerfish - openshift-cnv_rhel8-deep-anglerfish.xml - pv-dv-nfs-rhel.yaml - pv-disk-nfs-rhel.yaml
Created attachment 1743170 [details] describe_rhel8-deep-anglerfish
Created attachment 1743171 [details] openshift-cnv_rhel8-deep-anglerfish.xml
Created attachment 1743173 [details] pv-disk-nfs-rhel.yaml
Created attachment 1743174 [details] pv-dv-nfs-rhel.yaml
Created attachment 1743175 [details] rhel8.yaml
Kubevirt should block the creation of vm with sata disk and iothreads since it not supported right now the user is getting the error from libvirt and not from kuvevirt. Libvirt error message: Message: server error. command SyncVMI failed: "LibvirtError(Code=67, Domain=10, Message='unsupported configuration: IOThreads not available for bus sata target sda')"
Step: 1. Create vm with disk bus: sata and ioThreadsPolicy: shared , see vm spec 2. Start vm Test with UI Results: server error. command SyncVMI failed: "LibvirtError(Code=67, Domain=10, Message='unsupported configuration: IOThreads not available for bus sata target sda')" vm spec: apiVersion: kubevirt.io/v1 kind: VirtualMachine metadata: annotations: kubemacpool.io/transaction-timestamp: '2021-05-26T16:58:22.440434961Z' kubevirt.io/latest-observed-api-version: v1 kubevirt.io/storage-observed-api-version: v1alpha3 name.os.template.kubevirt.io/fedora34: Fedora 32 or higher vm.kubevirt.io/validations: | [ { "name": "minimal-required-memory", "path": "jsonpath::.spec.domain.resources.requests.memory", "rule": "integer", "message": "This VM requires more memory.", "min": 1073741824 } ] resourceVersion: '1674283' name: fed-iotest uid: f367ba69-c16e-4224-b098-e20d1e9aeabd creationTimestamp: '2021-05-26T16:48:08Z' generation: 6 managedFields: - apiVersion: kubevirt.io/v1 fieldsType: FieldsV1 fieldsV1: 'f:metadata': 'f:annotations': .: {} 'f:name.os.template.kubevirt.io/fedora34': {} 'f:vm.kubevirt.io/validations': {} 'f:labels': 'f:vm.kubevirt.io/template.version': {} 'f:vm.kubevirt.io/template.namespace': {} 'f:app': {} .: {} 'f:vm.kubevirt.io/template.revision': {} 'f:workload.template.kubevirt.io/server': {} 'f:flavor.template.kubevirt.io/small': {} 'f:os.template.kubevirt.io/fedora34': {} 'f:vm.kubevirt.io/template': {} 'f:spec': .: {} 'f:dataVolumeTemplates': {} 'f:template': .: {} 'f:metadata': .: {} 'f:annotations': {} 'f:labels': {} 'f:spec': .: {} 'f:domain': .: {} 'f:cpu': .: {} 'f:cores': {} 'f:sockets': {} 'f:threads': {} 'f:devices': .: {} 'f:disks': {} 'f:interfaces': {} 'f:networkInterfaceMultiqueue': {} 'f:rng': {} 'f:ioThreadsPolicy': {} 'f:machine': .: {} 'f:type': {} 'f:resources': .: {} 'f:requests': .: {} 'f:memory': {} 'f:evictionStrategy': {} 'f:hostname': {} 'f:networks': {} 'f:terminationGracePeriodSeconds': {} 'f:volumes': {} manager: Mozilla operation: Update time: '2021-05-26T16:56:05Z' - apiVersion: kubevirt.io/v1alpha3 fieldsType: FieldsV1 fieldsV1: 'f:spec': 'f:running': {} manager: virt-api operation: Update time: '2021-05-26T16:56:14Z' - apiVersion: kubevirt.io/v1alpha3 fieldsType: FieldsV1 fieldsV1: 'f:metadata': 'f:annotations': 'f:kubevirt.io/latest-observed-api-version': {} 'f:kubevirt.io/storage-observed-api-version': {} 'f:status': .: {} 'f:created': {} 'f:volumeSnapshotStatuses': {} manager: virt-controller operation: Update time: '2021-05-26T16:58:22Z' namespace: default finalizers: - k8s.v1.cni.cncf.io/kubeMacPool labels: app: fed-iotest flavor.template.kubevirt.io/small: 'true' os.template.kubevirt.io/fedora34: 'true' vm.kubevirt.io/template: fedora-server-small vm.kubevirt.io/template.namespace: openshift vm.kubevirt.io/template.revision: '1' vm.kubevirt.io/template.version: v0.14.0 workload.template.kubevirt.io/server: 'true' spec: dataVolumeTemplates: - metadata: creationTimestamp: null name: fed-iotest-rootdisk-smmhx spec: pvc: accessModes: - ReadWriteOnce resources: requests: storage: 30Gi storageClassName: hostpath-provisioner volumeMode: Filesystem source: http: url: >- <URL to image> running: true template: metadata: annotations: vm.kubevirt.io/flavor: small vm.kubevirt.io/os: fedora vm.kubevirt.io/workload: server creationTimestamp: null labels: flavor.template.kubevirt.io/small: 'true' kubevirt.io/domain: fed-iotest kubevirt.io/size: small os.template.kubevirt.io/fedora34: 'true' vm.kubevirt.io/name: fed-iotest workload.template.kubevirt.io/server: 'true' spec: domain: cpu: cores: 1 sockets: 1 threads: 1 devices: disks: - disk: bus: virtio name: cloudinitdisk - bootOrder: 1 disk: bus: sata name: rootdisk interfaces: - macAddress: '02:1f:8c:00:00:09' masquerade: {} model: virtio name: default networkInterfaceMultiqueue: true rng: {} ioThreadsPolicy: shared machine: type: pc-q35-rhel8.4.0 resources: requests: memory: 2Gi evictionStrategy: LiveMigrate hostname: fed-iotest networks: - name: default pod: {} terminationGracePeriodSeconds: 180 volumes: - cloudInitNoCloud: userData: | #cloud-config user: fedora password: tblx-ebq9-ftbx chpasswd: expire: false name: cloudinitdisk - dataVolume: name: fed-iotest-rootdisk-smmhx name: rootdisk status: created: true volumeSnapshotStatuses: - enabled: false name: cloudinitdisk reason: Volume type has no StorageClass defined - enabled: false name: rootdisk reason: >- No VolumeSnapshotClass: Volume snapshots are not configured for this StorageClass [hostpath-provisioner] [rootdisk]
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 (Moderate: OpenShift Virtualization 4.8.0 Images), 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-2021:2920