RunProgramInGuest: A program could not run on the guest operating system

340 views
Skip to first unread message

Piotr Bogdański

unread,
May 21, 2015, 9:21:56 AM5/21/15
to vmwar...@googlegroups.com
I have a problem with running program using vmwaretasks and C#.


It fails on below command:

virtualMachine.RunProgramInGuest(TestFilePath, InstallArguments, 60*60);

with error: 

Test Name: xxx("ProjectTeams/Platon/win8x64en/win8x64en.vmx","OEM","en")
Test FullName: Vestris.VMWareLibSamples.VMWareVirtualHostSamples.xxx("ProjectTeams/Platon/win8x64en/win8x64en.vmx","OEM","en")
Test Source: d:\PerfProjects\Enigma-1.5\ClassLibrary1\ClassLibrary1\Class1.cs : line 32
Test Outcome: Failed
Test Duration: 0:00:22.637

Result Message:
System.Exception : Failed to run program in guest: guestProgramName="C:\TempFolder\xxx 3.2.0.788 Setup.exe" commandLineArgs="/debuglogC:\TempFolder\InstallLog.txt /s /v/qn"
  ----> Vestris.VMWareLib.VMWareException : A program could not run on the guest operating system
Result StackTrace:
at Vestris.VMWareLib.VMWareVirtualMachine.RunProgramInGuest(String guestProgramName, String commandLineArgs, Int32 options, Int32 timeoutInSeconds)
at Vestris.VMWareLib.VMWareVirtualMachine.RunProgramInGuest(String guestProgramName, String commandLineArgs, Int32 timeoutInSeconds)
at Vestris.VMWareLibSamples.VMWareVirtualHostSamples.RunTestApplicationInGuest(VMWareVirtualMachine virtualMachine, String TestFilePath) in d:\PerfProjects\Enigma-1.5\ClassLibrary1\ClassLibrary1\Class1.cs:line 128
at Vestris.VMWareLibSamples.VMWareVirtualHostSamples.xxxx(String VMPath, String SnapshotName, String LANG) in d:\PerfProjects\Enigma-1.5\ClassLibrary1\ClassLibrary1\Class1.cs:line 96
--VMWareException
at Vestris.VMWareLib.VMWareInterop.Check(UInt64 errCode)
at Vestris.VMWareLib.VMWareJob.Wait[T](Object[] properties)
at Vestris.VMWareLib.VMWareVirtualMachine.RunProgramInGuest(String guestProgramName, String commandLineArgs, Int32 options, Int32 timeoutInSeconds)


I have found out that when I have created user on guest with the same name as my local user(where visial studio is installed) then the same code runs as expected. But when I am trying to use guest account with different username as my local user, that it fails with above exception.

UAC and Firewall is turned of for both(same and different name) users.

This is my login command:

virtualMachine.LoginInGuest(UserId, Password, Interop.VixCOM.Constants.VIX_LOGIN_IN_GUEST_REQUIRE_INTERACTIVE_ENVIRONMENT,30);


Do you have any answer why this is happening? Is there any workaround for this issue? Please help

Daniel Doubrovkine

unread,
May 21, 2015, 2:26:28 PM5/21/15
to vmwar...@googlegroups.com
Is there anything in the guest's event log? It sounds like maybe the logon doesn't actually succeed (?). How is that EXE copied? Try running something else that is in say c:\windows, does that work?

--
You received this message because you are subscribed to the Google Groups "vmwaretasks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vmwaretasks...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages