VMware {code} Community
Nasu
Contributor
Contributor

Getting Automatically Logged-In on Guest OS

I am using vmrun 6.5.2 to run a testing tool in the guest. Using vmrun I first start a VM and then the testing tool. When I start the VM I come to the login screen. Is there any way for WMware to get me logged in automatically (I do provide the user name and password), do I need some kind of startup script on my guest OS or what is the best way to get logged in? I have a feeling that the subsequent call to runProgramInGuest does run my test, but I would like to see it running

0 Kudos
4 Replies
Nasu
Contributor
Contributor

I have found in other discussions that using the COM API LoginInGuest can help me with this. However, I have a problem.

vm.LoginInGuest(myUserName, myPassword, 0, Nothing)

works but

vm.LoginInGuest(myUserName, myPassword, VixCOM.Constants.VIX_LOGIN_IN_GUEST_REQUIRE_INTERACTIVE_ENVIRONMENT, Nothing)

which I believe is supposed to log me in as if I did it manually (i.e. so that I can see what is going on when I later run a program in the guest) , does not. Does anyone know why?

0 Kudos
Nasu
Contributor
Contributor

OK, I misunderstood this. LoginInGuest does never log you in automatically from the login screen on the guest OS and REQUIRE_INTERACTIVE_ENVIRONMENT means that you will need to do just that manually first. The only way to actually see what is going on in the host OS (except for logging on manually) seems to be to configure it to log you in automatically on startup.

0 Kudos
lemke
VMware Employee
VMware Employee

You'll have to log in using something outside of Vix. Windows and Linux both have ways to do this.

0 Kudos
fixitchris
Hot Shot
Hot Shot

VMwareTasks Lib on CodePlex.com might have this capability.

0 Kudos