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:
libvirt should show some error when start the guest which disk's dev and bus is not fit
<target dev='hda' bus='virtio'/> and <target dev='vdb' bus='ide'/>
Version-Release number of selected component (if applicable):
libvirt-0.9.9-1.el6.x86_64
How reproducible:
100%
Steps to Reproduce:
1. edit guest's xml
#virsh edit $guest
disk like this :
<target dev='hda' bus='virtio'/> or <target dev='vda' bus='ide'/>
2. start the guest
#virsh start q2
Domain q2 started
3. no error or warning
# virsh dumpxml q2
...
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/var/lib/libvirt/images/q2.img'/>
<target dev='hda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</disk>
...
in the guest
disk is /dev/vda
Actual results:
not fit but no check
Expected results:
show some message when disk dev and bus is not fit
Additional info:
I don't really think this is worth fixing. Target dev doesn't really mean anything, it is merely used to easily identify the device (when using virsh commands, for example) and for sorting devices on the same bus. This is also explicitly mentioned in domain XML documentation. Target dev doesn't have to match the in-guest device name and if you run any BSD system or even Windows as a guest, the in-guest device name will not be even close to target dev. Actually since libata started to include drivers for IDE controles, the correspondence doesn't work in Linux either (<target dev='hdc' bus='ide'/> will most likely be /dev/sr0 in a guest). Not to mention that one can rename the devices easily with udev.
In other words, I don't think we should pretend there's something special about target dev and enforce unnecessary relation between dev and bus.