[libvirt] [Patch] Fix detach tap device on Xen3.3.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I made the patch that corrected the following problem.

It is that when I executed the "virsh detach-disk" command on Xen3.3.1,
Libvirt could not detach tap device and output the following error
message.

# virsh detach-disk Fedora xvdd
libvir: Xen Daemon error : POST operation failed: xend_post: error
from xen daemon: (xend.err 'Device 51760 not connected')

The cause of this problem is incompatible of Xen3.3.0 and Xen3.3.1.
I think Xen specific was changed by the following patch.
http://xenbits.xensource.com/xen-3.3-testing.hg?rev/e0e17216ba70

If you have any comments, please suggest me.

Signed-off-by: Tomohiro Takahashi <takatom@xxxxxxxxxxxxxx>

Thanks,
Tomohiro Takahashi
diff -uNrp libvirt.orig/src/xend_internal.c libvirt/src/xend_internal.c
--- libvirt.orig/src/xend_internal.c	2009-02-14 03:23:23.000000000 +0900
+++ libvirt/src/xend_internal.c	2009-03-09 12:28:48.000000000 +0900
@@ -5566,7 +5566,11 @@ virDomainXMLDevID(virDomainPtr domain,
     char *xref;
 
     if (dev->type == VIR_DOMAIN_DEVICE_DISK) {
-        strcpy(class, "vbd");
+        if (!(strcmp(dev->data.disk->driverName, "tap"))) {
+            strcpy(class, "tap");
+        } else {
+            strcpy(class, "vbd");
+        }
         if (dev->data.disk->dst == NULL)
             return -1;
         xenUnifiedLock(priv);
--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]