VMware {code} Community
accessory
Contributor
Contributor
Jump to solution

Question about VixVM_PowerOff

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.

0 Kudos
1 Solution

Accepted Solutions
admin
Immortal
Immortal
Jump to solution

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.

View solution in original post

0 Kudos
1 Reply
admin
Immortal
Immortal
Jump to solution

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.

0 Kudos