VMware Communities
kenny81
Contributor
Contributor

VixVM_WaitForToolsInGuest returns "vm needs to be powered on" error

Hi,

I created a snapshot and want to use the VIX API to start the virtual machine. Basically there are two steps performed for this task.

1. call the API VixVM_RevertToSnapshot() to start the virtual machine.

In this step, I got an error "The file is already in use" from this API function. I manually ignored this error and clicked the "Power on virtual machine" button of the VMWare Workstation Pro". The virtual machine was powered on and it seems to be recovered to the original state.

2. call the API VixVM_WaitForToolsInGuest() to create connection to the vmware tools.

In this step, I got an error "The virtual machine needs to be powered on". Then my program could not run further.

I heard that it may be related to the host machine version.

The following configuration is what I have:

Host:

CentOS 64bit: linux kernel version 2.6.18

Guest:

CentOS 64bit: linux kernel version 3.10.0

did anyone encounter a similar problem? Is there a solution for that?

Thanks.

/Kenny

0 Kudos
1 Reply
jpsider
Expert
Expert

I run into a similar problem when using vmrun.exe and executing things both manually and via vmrun. Any time that I perform a manual step, vmrun no longer is able to perform functions related to powering the machine on or off, wait for tools etc.

My work around was to just stop performing the manual pieces and script all of it.

0 Kudos