VMware Communities
Mark8it
Contributor
Contributor

Windows Server 2019 VM autostart without login

Hello professionals,

Setup:
- Windows Server 2019 Std. UptoDate
- VMware Workstation Pro current version

My Project:
After the server start, VMs should start automatically without a user/admin login. The commands are known, example batch run with "Administrator" under "Task planner":

 

PATH "%PROGRAMFILES%\VMware\VMware Workstation\"
START vmware.exe -x "G:\VMware\Nextcloud\Nextcloud.vmx"
START vmware.exe -x "G:\VMware\PiHole\PiHole.vmx"
START vmware.exe -x "G:\VMware\TimeCapsule\TimeCapsule.vmx"
START vmware.exe -x "G:\VMware\UniFiController\UniFiController.vmx"

 

or...

 

Start “C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe” -T ws start D:\VM-Machines\meineMaschine.vmx

 

... Is working.

My Problem:
After RDP login same (Administrator) i can no longer take over the running VMs, no Control. Shutdown via SSH and restart under VMware on Desktop is the only solution.

Question:
How do I start the VMs unattended and can also take over / control the VMs after an RDP login?

Thanks for the help

Reply
0 Kudos
3 Replies
wila
Immortal
Immortal

Hi,

There is no easy answer as you already have found out.
The other alternative to take back control from within RDP is to suspend/resume the VM.
I am not aware of any other solution to this issue as it is dictated by the security model of Windows. (An application that runs out of the context of a desktop before login, cannot get access to the desktop after login)

FWIW I have developed a product that does take care of this particular scenario: https://www.vimarun.com
In addition Vimarun also takes care of suspending the VMs on host shutdown.

--
Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
Mark8it
Contributor
Contributor

I almost thought so. I don't understand, service is started with the same ACC as RDP login, so why not controllable? General Windows crap ...!? Anyway, I'm working on a script that makes an automatic login and starts the services and then logs out again. So it should work. The only problem is, so far automatic login only with an unencrypted password. I don't like it yet ... Thanks for your answer :slightly_smiling_face:

Reply
0 Kudos
wila
Immortal
Immortal

It's not about the account.

This is a good link to learn more about how it works:
https://brianbondy.com/blog/100/understanding-windows-at-a-deeper-level-sessions-window-stations-and...

All very fun, enjoy!
--
Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos