Add support for VM.destroy
PATCH 1/1 Add support for VM.destroy
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 [email protected]
# Date 1162948456 25200
# Node ID 470f439f3f944426d070017e4af333059553c10e # Parent 8d0e06c38c0ccfb2b106f19fd74f4c144bc86166 Add support for VM.destroy RPC in libxen.
tools/libxen/include/xen_vm.h +8 -0
@@ -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
tools/libxen/src/xen_vm.c +14 -0
@@ -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
[email protected]
http://lists.xensource.com/xen-devel
Ewan Mellor
AppliedQuoted 4 lines · Jim Fehlig
This patch adds support for the VM.destroy RPC in libxen. I have successfully used it with a patched xend (
XendDomain.pyspecifically), 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.