VMware Cloud Community
Czernobog
Expert
Expert

vRO 7.3 - checking guest OS guest operations readiness

I have to run a few guest operations on a VM, right after it is provisioned.

Until now, I have used a simple sleep value of 60 seconds, during which the vRO workflow execution is halted, before the guest operations are executed. This almost exclusively affects Windows servers since the readiness on Linux systems is given almost instantly.

The sleep method works fine, however now I want to query the exact status of the guest operation readiness, instead of a sleep timer, to save some time and get an accurate status of the guest operations.

So far I have used following approaches, without success (vm = target vCenter VM):

- vm.guest.guestOperationsReady - this returns true, right after a vm comes online and VMTools initialize, however even though it returns "true", guest operations fail with error: The guest operations agent could not be contacted. I still have to wait some time, before executing guest operations.

- vm.guest.isInteractiveGuestOperationsReady(); - this always returns "false", even when checking a vm that has been running for some time and where manualy executing a guest operation workflow works.

What would be a reliable method to check the guest operations availability?

Reply
0 Kudos
2 Replies
hawks76
Enthusiast
Enthusiast

Here is what i use:

return System.getModule("com.vmware.pso.GuestOps").testVmToolsForGuestOps(vm);

Not sure if that module is part of the stock install with vRO though.  Looks like it may be something from VMWare's PSO team.  I put this in a loop prior to running code, and let it check several times before proceeding.

Reply
0 Kudos
iiliev
VMware Employee
VMware Employee

What the action System.getModule("com.vmware.pso.GuestOps").testVmToolsForGuestOps(vm) does is simply return vm.guest.guestOperationsReady (which apparently doesn't work reliably for Czernobog​​ case).

BTW, this action is available in Guest Script Manager package.

Reply
0 Kudos