This patch adds support for the VM.destroy RPC in libxen. I have
successfully used it with a patched xend (XendDomain.py specifically),
but am not all that happy with that patch in its current form. The xend
patch will follow after some rework and further testing.
Regards,
Jim
# HG changeset patch
# User jfehlig@xxxxxxxxxxxxxxxxxxxxxxxxx
# Date 1162948456 25200
# Node ID 470f439f3f944426d070017e4af333059553c10e
# Parent 8d0e06c38c0ccfb2b106f19fd74f4c144bc86166
Add support for VM.destroy RPC in libxen.
Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxxxx>
diff -r 8d0e06c38c0c -r 470f439f3f94 tools/libxen/include/xen_vm.h
--- a/tools/libxen/include/xen_vm.h Wed Nov 08 00:03:11 2006 +0000
+++ b/tools/libxen/include/xen_vm.h Tue Nov 07 18:14:16 2006 -0700
@@ -799,4 +799,12 @@ xen_vm_get_all(xen_session *session, str
xen_vm_get_all(xen_session *session, struct xen_vm_set **result);
+/**
+ * Destroy the specified VM. The VM is completely removed from the system.
+ * This function can only be called when the VM is in the Halted State.
+ */
+extern bool
+xen_vm_destroy(xen_session *session, xen_vm vm);
+
+
#endif
diff -r 8d0e06c38c0c -r 470f439f3f94 tools/libxen/src/xen_vm.c
--- a/tools/libxen/src/xen_vm.c Wed Nov 08 00:03:11 2006 +0000
+++ b/tools/libxen/src/xen_vm.c Tue Nov 07 18:14:16 2006 -0700
@@ -1580,3 +1580,17 @@ xen_vm_get_uuid(xen_session *session, ch
*result = session->ok ? xen_strdup_((char *)vm) : NULL;
return session->ok;
}
+
+
+bool
+xen_vm_destroy(xen_session *session, xen_vm vm)
+{
+ abstract_value param_values[] =
+ {
+ { .type = &abstract_type_string,
+ .u.string_val = vm }
+ };
+
+ xen_call_(session, "VM.destroy", param_values, 1, NULL, NULL);
+ return session->ok;
+}
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|