I use VixVM_PowerOff function as suggested by API reference, then it gives me an error. The code is this:
// Assume this virtual machine is already running.
jobHandle = VixVM_PowerOff(vmHandle,
0, // powerOffOptions,
NULL, // callbackProc,
NULL); // clientData
err = VixJob_Wait(jobHandle,
VIX_PROPERTY_JOB_RESULT_HANDLE,
&vmHandle,
VIX_PROPERTY_NONE);
The error is 6000 (unrecognized property). Then I changed the second call to this:
err = VixJob_Wait(jobHandle,
VIX_PROPERTY_NONE);
Then it is OK without error. So is the example in the reference wrong? Then it is better to change it.
Sorry, that is a typo in the documentation. There is no virtual machine handle returned from the VixVM_PowerOff job, so you should not try to get it.
The documentation will be fixed soon.
Thank you for bringing this to our attention.
Sorry, that is a typo in the documentation. There is no virtual machine handle returned from the VixVM_PowerOff job, so you should not try to get it.
The documentation will be fixed soon.
Thank you for bringing this to our attention.