A SERVICE OF

logo

CHAPTER 4 Operations on Virtual Machines
45
RC1
NULL); // clientData
err = VixJob_Wait(jobHandle, VIX_PROPERTY_NONE);
if (VIX_OK != err) {
// Handle the error...
goto abort;
}
Vix_ReleaseHandle(jobHandle);
// Create snapshot in powered-on state.
jobHandle = VixVM_CreateSnapshot(vmHandle,
NULL, // name
NULL, // description
0, // options
VIX_INVALID_HANDLE, // propertyListHandle
NULL, // callbackProc
NULL); // clientData
err = VixJob_Wait(jobHandle,
VIX_PROPERTY_JOB_RESULT_HANDLE,
&snapshotHandle,
VIX_PROPERTY_NONE);
if (VIX_OK != err) {
// Handle the error...
goto abort;
}
abort:
Vix_ReleaseHandle(jobHandle);
Vix_ReleaseHandle(snapshotHandle);
Vix_ReleaseHandle(vmHandle);
VixHost_Disconnect(hostHandle);