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:
internal error unable to execute QEMU command '__com.redhat_drive_add': Duplicate ID 'drive-virtio-disk0' for drive
Version-Release number of selected component (if applicable):
python-virtinst-0.600.0-15.el6.noarch
libvirt-java-0.4.9-1.el6.noarch
fence-virtd-multicast-0.2.3-13.el6.x86_64
virt-viewer-0.5.2-18.el6.x86_64
virt-top-1.0.4-3.15.el6.x86_64
libvirt-0.10.2-18.el6.x86_64
fence-virtd-serial-0.2.3-13.el6.x86_64
libvirt-client-0.10.2-18.el6.x86_64
virt-manager-0.9.0-18.el6.x86_64
fence-virtd-0.2.3-13.el6.x86_64
virt-what-1.11-1.2.el6.x86_64
libvirt-cim-0.6.1-4.el6.x86_64
fence-virt-0.2.3-13.el6.x86_64
fence-virtd-checkpoint-0.2.3-13.el6.x86_64
virt-who-0.8-5.el6.noarch
libvirt-snmp-0.0.2-3.el6.x86_64
virt-v2v-0.8.9-2.el6.x86_64
fence-virtd-libvirt-0.2.3-13.el6.x86_64
libvirt-python-0.10.2-18.el6.x86_64
How reproducible:
50%
Steps to Reproduce:
1. Create a "Windows Vista 64-Bit x86" guest OS.
2. Install virtio-ballon driver on the guest os.
3. Add a virtio disk on the running VM.
Actual results:
internal error unable to execute QEMU command '__com.redhat_drive_add': Duplicate ID 'drive-virtio-disk0' for drive
Expected results:
The disk should be attached while guest os is running.
Additional info:
Error details :
================================================================================
internal error unable to execute QEMU command '__com.redhat_drive_add': Duplicate ID 'drive-virtio-disk0' for drive
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/addhardware.py", line 1033, in add_device
self.vm.attach_device(self._dev)
File "/usr/share/virt-manager/virtManager/domain.py", line 711, in attach_device
self._backend.attachDevice(devxml)
File "/usr/lib64/python2.6/site-packages/libvirt.py", line 399, in attachDevice
if ret == -1: raise libvirtError ('virDomainAttachDevice() failed', dom=self)
libvirtError: internal error unable to execute QEMU command '__com.redhat_drive_add': Duplicate ID 'drive-virtio-disk0' for drive
================================================================================
Not always reproducible but found couple of times(on the same guest os) it says,
"This device could not be attached to the running machine. Would you like to make the device available after the next guest shutdown?"
Hi Pankaj,
I wasn't able to reproduce the issue you've reported. Could you please try to reproduce it with debug logs enabled on the libvirt daemon and attach them(after compressing them) to this BZ?
Thanks.
Peter
Actually I managed to reproduce the same error by a few more steps and found the root issue.
1. start a windows guest
2. hot-add a virtio disk to the guest and install virtio storage driver
3. enable the disk in the guest
4. hot-remove the disk without telling the guest (don't do "safe remove hardware")
the guest will not allow ejecting the device from the emulator, but libvirt thinks that it was successful
5. Try to hot-add a disk again -> it will fail.
The state can be verified with:
$ virsh qemu-monitor-command w2k12 --hmp "info pci"
[... truncated output ... ]
SCSI controller: PCI device 1af4:1001
IRQ 0.
BAR0: I/O at 0xff80 [0xffbf].
BAR1: 32 bit memory at 0xfebfe000 [0xfebfefff].
id "virtio-disk1"
6. "safely remove" the disk in the guest
7. Retry step 5. -> it will succeed now.
This issue is also reproducible on current upstream. I'm suspecting that libvirt isn't still properly handling the device deleted event sent from qemu after the guest ejects the device.
Also, next time please provide more accurate reproducer steps, I managed to reproduce this by accident when cleaning up the environment.
Description of problem: internal error unable to execute QEMU command '__com.redhat_drive_add': Duplicate ID 'drive-virtio-disk0' for drive Version-Release number of selected component (if applicable): python-virtinst-0.600.0-15.el6.noarch libvirt-java-0.4.9-1.el6.noarch fence-virtd-multicast-0.2.3-13.el6.x86_64 virt-viewer-0.5.2-18.el6.x86_64 virt-top-1.0.4-3.15.el6.x86_64 libvirt-0.10.2-18.el6.x86_64 fence-virtd-serial-0.2.3-13.el6.x86_64 libvirt-client-0.10.2-18.el6.x86_64 virt-manager-0.9.0-18.el6.x86_64 fence-virtd-0.2.3-13.el6.x86_64 virt-what-1.11-1.2.el6.x86_64 libvirt-cim-0.6.1-4.el6.x86_64 fence-virt-0.2.3-13.el6.x86_64 fence-virtd-checkpoint-0.2.3-13.el6.x86_64 virt-who-0.8-5.el6.noarch libvirt-snmp-0.0.2-3.el6.x86_64 virt-v2v-0.8.9-2.el6.x86_64 fence-virtd-libvirt-0.2.3-13.el6.x86_64 libvirt-python-0.10.2-18.el6.x86_64 How reproducible: 50% Steps to Reproduce: 1. Create a "Windows Vista 64-Bit x86" guest OS. 2. Install virtio-ballon driver on the guest os. 3. Add a virtio disk on the running VM. Actual results: internal error unable to execute QEMU command '__com.redhat_drive_add': Duplicate ID 'drive-virtio-disk0' for drive Expected results: The disk should be attached while guest os is running. Additional info: Error details : ================================================================================ internal error unable to execute QEMU command '__com.redhat_drive_add': Duplicate ID 'drive-virtio-disk0' for drive Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/addhardware.py", line 1033, in add_device self.vm.attach_device(self._dev) File "/usr/share/virt-manager/virtManager/domain.py", line 711, in attach_device self._backend.attachDevice(devxml) File "/usr/lib64/python2.6/site-packages/libvirt.py", line 399, in attachDevice if ret == -1: raise libvirtError ('virDomainAttachDevice() failed', dom=self) libvirtError: internal error unable to execute QEMU command '__com.redhat_drive_add': Duplicate ID 'drive-virtio-disk0' for drive ================================================================================ Not always reproducible but found couple of times(on the same guest os) it says, "This device could not be attached to the running machine. Would you like to make the device available after the next guest shutdown?"