All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][libxen] Add support for VM.destroy
@ 2006-11-08  1:21 Jim Fehlig
  2006-11-08 14:45 ` Ewan Mellor
  0 siblings, 1 reply; 2+ messages in thread
From: Jim Fehlig @ 2006-11-08  1:21 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 284 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: libxen-vm-destroy.patch --]
[-- Type: text/x-patch; name="libxen-vm-destroy.patch", Size: 1492 bytes --]

# HG changeset patch
# User jfehlig@jfehlig2.provo.novell.com
# Date 1162948456 25200
# Node ID 470f439f3f944426d070017e4af333059553c10e
# Parent  8d0e06c38c0ccfb2b106f19fd74f4c144bc86166
Add support for VM.destroy RPC in libxen.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>

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;
+}

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][libxen] Add support for VM.destroy
  2006-11-08  1:21 [PATCH][libxen] Add support for VM.destroy Jim Fehlig
@ 2006-11-08 14:45 ` Ewan Mellor
  0 siblings, 0 replies; 2+ messages in thread
From: Ewan Mellor @ 2006-11-08 14:45 UTC (permalink / raw)
  To: Jim Fehlig; +Cc: xen-devel

On Tue, Nov 07, 2006 at 06:21:22PM -0700, Jim Fehlig wrote:

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

Applied, thanks.  I'll cut-and-paste that around the place a bit as well -- I
should have implemented destroy ages ago.

Cheers,

Ewan.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-11-08 14:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-08  1:21 [PATCH][libxen] Add support for VM.destroy Jim Fehlig
2006-11-08 14:45 ` Ewan Mellor

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.