+++ This bug was initially created as a clone of Bug #473882 +++ There are two core problems with block detach - virsh & xm both pass 'type=vbd' even for TAP devices. This causes the wrong device controller to be used. This is the cause of the detach failure. This patch checks for the bogus type=vbd and fixes it - The /vm/$UUID/device/{vbd,tap}/$DEVID path is not removed from xenstore, preventing a later re-attachment. This patch removes that path upon detach This bug is to track fixing of libvirt's virDomainDeviceDetach operation for Xen TAP disk devices.
Just to clarify, the original bug was against xen, and the patch referenced in the above comment was the xen patch. I'm not sure if there is any associated libvirt patch for RHEL or upstream. The correct 'type' value mentioned above seems to be 'tap', not 'vbd'.
Created attachment 331998 [details] Use correct device type for xend attach/detach I only build tested this. Applies against current upstream.
libvirt-0.6.3-1.el5 which was build in dist-5E-qu-candidate has the fix, Daniel
Verified with libvirt 0.6.3-11.el5 on RHEL-5.4. It's fixed, set status to VERIFIED. [root@dhcp-66-70-85 ~]# virsh attach-disk xentest /var/lib/xen/images/test.img xvda --driver vbd error: No support vbd in command 'attach-disk' [root@dhcp-66-70-85 ~]# virsh attach-disk xentest /var/lib/xen/images/test.img xvda --driver tap Disk attached successfully
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2009-1269.html