Quantcast
Channel: VMware Communities : Popular Discussions - VIX API
Viewing all articles
Browse latest Browse all 34639

Property VixCOM.Constants.VIX_PROPERTY_VM_POWER_STATE returning 1032 or 1096

$
0
0

 

Hi there

 

 

Using Workstation 6.5 with VixCom 1.6.1.4558.

 

 

I am using the VixCom API via C# to automate a single VM as part of a larger Windows based automated testing framework.

 

 

The basic process involves powering on a VM, waiting for it to power up, waiting for VM tools to load and then waiting for an application to launch via the startup menu.

 

 

When the VM is shutdown (from inside it NOT using the VixCom but using something similar to PSShutdown), I then wait for it to power down, pause 5 seconds, and then power it back on again and this is repeated.

 

 

At different stages of the power on process, I poll for the current state using the following code snippet:-

 

 

========

 

 

UInt64 error = 0;

 

 

VixLibClass m_VixComlib = new VixLibClass();

 

 

error = ((VixCOM.IVixHandle)VirtualMachine).GetProperties(properyIDs, ref properties);

if (m_VixComlib.ErrorIndicatesFailure(error))

{

       Console.writeline( "Failed to retrieve the properties of the VM");

        return -1;

}

 

vmPowerState = (int)((object[])properties)[0]; // VixCOM.Constants.VIX_PROPERTY_VM_POWER_STATE

vmPathName = (string)((object[])properties)[1]; // VixCOM.Constants.VIX_PROPERTY_VM_VMX_PATHNAME

 

 

========

 

 

Now, during the VM power on stage, vmPowerState returns either 1032 or 1096 and I am unable to determine what power state the VM is in. Its clearly not one of the known states defined

 

 

in Vix.h but I am aware of the fact that it could be a combination of a few states but I have been unable to determine what these are.

 

 

Any help with this will be greatly appreciated.

 

 

AutoTestGuru.

 

 


Viewing all articles
Browse latest Browse all 34639

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>