ia64/xen-unstable

changeset 12317:4e3ddf1288fb

Add support for VM.destroy RPC in libxen.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
author jfehlig@jfehlig2.provo.novell.com
date Tue Nov 07 18:14:16 2006 -0700 (2006-11-07)
parents b86fe3d23f05
children 1d4fc7396c41
files tools/libxen/include/xen_vm.h tools/libxen/src/xen_vm.c
line diff
     1.1 --- a/tools/libxen/include/xen_vm.h	Wed Nov 08 13:22:08 2006 +0000
     1.2 +++ b/tools/libxen/include/xen_vm.h	Tue Nov 07 18:14:16 2006 -0700
     1.3 @@ -799,4 +799,12 @@ extern bool
     1.4  xen_vm_get_all(xen_session *session, struct xen_vm_set **result);
     1.5  
     1.6  
     1.7 +/**
     1.8 + * Destroy the specified VM.  The VM is completely removed from the system.
     1.9 + * This function can only be called when the VM is in the Halted State.
    1.10 + */
    1.11 +extern bool
    1.12 +xen_vm_destroy(xen_session *session, xen_vm vm);
    1.13 +
    1.14 +
    1.15  #endif
     2.1 --- a/tools/libxen/src/xen_vm.c	Wed Nov 08 13:22:08 2006 +0000
     2.2 +++ b/tools/libxen/src/xen_vm.c	Tue Nov 07 18:14:16 2006 -0700
     2.3 @@ -1580,3 +1580,17 @@ xen_vm_get_uuid(xen_session *session, ch
     2.4      *result = session->ok ? xen_strdup_((char *)vm) : NULL;
     2.5      return session->ok;
     2.6  }
     2.7 +
     2.8 +
     2.9 +bool
    2.10 +xen_vm_destroy(xen_session *session, xen_vm vm)
    2.11 +{
    2.12 +    abstract_value param_values[] =
    2.13 +        {
    2.14 +            { .type = &abstract_type_string,
    2.15 +              .u.string_val = vm }
    2.16 +        };
    2.17 +
    2.18 +    xen_call_(session, "VM.destroy", param_values, 1, NULL, NULL);
    2.19 +    return session->ok;
    2.20 +}