VMware Cloud Community
simplysimon1
Contributor
Contributor

vRO 8 - Guest operations agent could not be contacted - possible timing issue?

I'm a bit of newbie to vRO and not a developer by today's standards.  I'm attempting to use the Run Program in Guest workflow.  I continue to get the error "The guest operations agent could not be contacted. (Workflow:Run program in guest / Scriptable task (itemt1)#16)."  I have verified the servers are  running VMware Tools 12.1 once built.  I can confirm that the guest operations are working appropriately since the previous workflow successfully add a security group to the local administrators group on a Windows 2016, 2019, and 2022 operating systems.  I've seen where other sites indicating this could be due to a timing issue.  Thought's on how I can add to the code below to address a timing issue would be appreciated.

Note:  when running the Run Program in Guest workflow by itself manually, it works.  

 

var host = vm.sdkConnection;

var guestOperationsManager = host.guestOperationsManager;
var guestAuth = new VcNamePasswordAuthentication();
guestAuth.username = vmUsername;
guestAuth.password = vmPassword;
guestAuth.interactiveSession = interactiveSession;

var guestProgramSpec = new VcGuestProgramSpec();
guestProgramSpec.programPath = programPath;
guestProgramSpec.arguments = arguments;
guestProgramSpec.workingDirectory = workingDirectory;
guestProgramSpec.envVariables = environment;

var processManager = guestOperationsManager.processManager;
result = processManager.startProgramInGuest(vm , guestAuth , guestProgramSpec);
Labels (1)
0 Kudos
1 Reply
scott28tt
VMware Employee
VMware Employee

As your post needs moving to the vRO area, I have reported it to the moderators.

 


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
0 Kudos