From: Jim Fehlig <jfehlig@novell.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH][libxen] Add support for VM.destroy
Date: Tue, 07 Nov 2006 18:21:22 -0700 [thread overview]
Message-ID: <45513112.5010901@novell.com> (raw)
[-- 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
next reply other threads:[~2006-11-08 1:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-08 1:21 Jim Fehlig [this message]
2006-11-08 14:45 ` [PATCH][libxen] Add support for VM.destroy Ewan Mellor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45513112.5010901@novell.com \
--to=jfehlig@novell.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.