Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
When adding an existing qcow2 disk using the "custom path" option, the disk is added to the virtual machine as raw image rather than qcow2. The machine can not boot. This is the resulting xml file:
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/zzz.qcow2'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
</disk>
If adding the very same disk using the "use existing" option, the disk is correctly added as a qcow2 image and the machine can boot correctly.
Version-Release number of selected component (if applicable):
cockpit-machines-263-1.el9.noarch
How reproducible:
Always
Steps to Reproduce:
1. add an existing qcow2 disk to a VM using the "custom path" option
2. try to boot the VM
3. the VM does not boot
Actual results:
The VM does not boot because the disk is added as raw image.
Expected results:
The disk should be added with the right format (qcow2 vs raw) and the machine should boot correctly.
Additional info:
https://github.com/cockpit-project/cockpit-machines/issues/826
I can reproduce it, but no matter add the disk with "use existing" or "custom path" , the vm can boot successfully. I think you are not using RHEL.
But never mind, when using "custom path", it's indeed attached as raw.
Version:
cockpit-machines-276-1.el9.noarch
Steps to Reproduce:
1. Prepare a shutdown VM like cirros
2. Prepare a qcow2 file:
# qemu-img create -f qcow2 /var/lib/libvirt/images/test.qcow2 1G
3. Add the qcow2 disk using the "custom path" option, here is the xml:
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/test.qcow2' index='1'/>
<backingStore/>
<target dev='vdb' bus='virtio'/>
<alias name='virtio-disk1'/>
<address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
</disk>
4. Boot the VM, it can be boot
5. Remove the disk, add it again using "use existing", here is the xml
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/cirros.qcow2' index='2'/>
<backingStore/>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</disk>
6. Boot the VM, it can be boot
The disk type in step 3 should be qcow2.
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 (cockpit-machines bug fix and enhancement 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/RHBA-2023:2211