[PATCH] Have xenDaemonDetachDevice() remove device configuration

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

 




When a user runs 'virsh detach-disk' on a running domain, the disk is removed, but reappears after the domain is rebooted. This seems odd, as someone who types detach-disk most likely wants the change to be permanent.

This patch updates the code in xenDaemonDetachDevice() to pass the rm_cfg flag to Xen, so that the change is committed to the domain's configuration file.

This change depends on a xen patch that was committed to unstable on March 20: http://lists.xensource.com/archives/html/xen-changelog/2008-03/msg00122.html

-Ryan

diff --git a/src/xend_internal.c b/src/xend_internal.c
--- a/src/xend_internal.c
+++ b/src/xend_internal.c
@@ -3347,7 +3347,7 @@ xenDaemonDetachDevice(virDomainPtr domai
     if (virDomainXMLDevID(domain, xml, class, ref, sizeof(ref)))
         return (-1);
     return(xend_op(domain->conn, domain->name, "op", "device_destroy",
-        "type", class, "dev", ref, NULL));
+        "type", class, "dev", ref, "force", "0", "rm_cfg", "1", NULL));
 }

--
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]