A SERVICE OF

logo

www.vmware.com
46
C API Reference Guide
RC1
VixVM_Delete
Function Signature
VixHandle
VixVM_Delete(VixHandle vmHandle,
int deleteOptions,
VixEventProc *callbackProc,
void *clientData);
Parameters
Results
A job handle that describes the state of this asynchronous call.
Notes
This function permanently deletes a virtual machine from your host system. You
can accomplish the same effect by deleting all virtual machine files using the
host’s file system. This function simplifies the task by deleting all VMware files in a
single function call. This function does not delete other user files in the virtual
machine folder.
This function is asynchronous. It uses a job handle to report when it is complete.
Example
VixError err = VIX_OK;
VixHandle hostHandle = VIX_INVALID_HANDLE;
VixHandle jobHandle = VIX_INVALID_HANDLE;
VixHandle vmHandle = VIX_INVALID_HANDLE;
jobHandle = VixHost_Connect(VIX_API_VERSION,
VIX_SERVICEPROVIDER_VMWARE_SERVER,
NULL, // hostName
0, // hostPort
vmHandle Identifies a virtual machine. Call VixVM_Open() to create a virtual
machine handle.
deleteOptions Must be 0.
callbackProc A callback function that will be invoked when the operation
completes.
clientData A parameter that will be passed to the callbackProc function.