Link to home
Start Free TrialLog in
Avatar of Line One
Line One

asked on

autostart a VM in Windows 10

I would like to create a Windows 7 VM that runs in Windows 10 HyperV and starts up automatically so that when I startup Windows 10/turn on the system I eventually get a prompt to log me into the Win 7 VM.  Any tips are appreciated.
Avatar of McKnife
Flag of Germany image

Hyper-v will by default suspend all running guest machines when the host ist shutdown and will resume them when your host restarts, so no need for action.
Avatar of Line One
Line One


Thanks for the quick reply.  So if I am in a Windows 7 VM that is domain joined and I log out of the Win 7 session so I am left at the login screen of the VM to log back into the domain when I reboot the host I will be taken back to the login screen?
What about host system login? Auto login? PS! Hyper-V guest won’t open automatically; it needs to be activated first from host system's HV manager. There is no good way to show instantaneously Guest Win7 login screen with Hyper-V.
We need to be precise. All that we want can be achieved. Not only will the vm resume on its own, but also to see it right away full screen would be possible using a script that uses mstsc.exe or vmconnect.exe to connect to it.
If this is a end-user environment, host OS auto login must be secured accordingly (with guest permission template or something similar) or there is a security issue. In any case, there is maybe better VM solutions as Hyper-V for this scenario and "better end-user experience than RDP".
Sorry. I don't understand either answer.  Can you please elaborate with the necessary steps in my scenario -Win 7 VM running on Windows 10 HyperV. Not interested in any other scenario.  Thanks in advance.
Perhaps Powershell?
vmconnect.exe and mstsc.exe are command line programs, built-into windows. They can be used to achieve what you want. open a command shell and type
vmconnect /?
mstsc /?
for usage hints.
Thanks. Are you saying I can make a script with mstsc so that when the VM starts up it will take people to a RDP prompt?
As I can see no good answers provided. Let’s try to help or add few thoughts :).
Assume, that You have some kind of domain involved.
Make one account to domain for win10 PC to log in exclusively on those PC’s that need this Remote desktop connection. Password never expires needed also for this account (if it is not restricted from GPO). Also if You want to protect this environment, make a list of domain computers within this account can log on to.
Now add to this domain account “properties” – “environment” – “start the following program at logon” value something like this “mstsc /v:your rdp server ip address /f /prompt” full path maybe needed for mstsc.exe try this out for Yourself.
Now You can verify, is the connection popup for login will open when You log to win10 pc with this dedicated login account in domain. If it does and RDP connection is made You are in the final step:
You need to log on automatically to those PC’s with win10 and with dedicated account.
Log to win10 with administrative privileges and follow steps from this page example (in domain environment it’s little bit tricky):
Finally You got Win10 domain PC, that has auto logon to domain and domain pushes this account to open only RDP connection to certain RDP server. You are done and users can log in to whatever domain rdp server.
If you do not join your win10 PC to domain, it’s more simple to configure just guest account (or what you ever like) without special permissions and add rdp connection string to startup - Your choice. Best of luck!
Let's hope Your win10 hyper-v environment is faster than autologon not to see "cannot connect" on autologon :).
"As I can see no good answers provided" - sorry, what is wrong? As soon as I find the time after lunch, I will comment on this.
Pretty long lunch - from 6th of september 2016. I love those experts :). This is the reason I keep my mouth shut from the registration time and better keep myself as reader. Pointless arguing.
Avatar of McKnife
Flag of Germany image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
"Pretty long lunch - from 6th of september 2016. I love those experts :)." - september 6th? I wrote that today, what are you loving?
"By the way, concerning "In any case, there is maybe better VM solutions as Hyper-V for this scenario and "better end-user experience than RDP" - I don't see what you are missing. RDP is the default for connecting to hyper-v VMs. He uses hyper-V, there is no other way."

In this kind of environment where there is ~30PC's involved, I looked a little bit out of the box, banned PC's local storage for guest hdd images and local hyper-v forever. Guests running with virtualbox full boost memory+cpu and 2D+3D gpu acceleration and vm guests hdd's are mapped from storage server 2+GB of raid controller cache and r10 with snapshot and backup to slower storage. 1Gbit of LAN for PC's and trunck 4Gbits for storage server it is just perfect how it performs. If some kind of local PC dies, it needs just whatever host system and remap of guest hdd and off we go. Under development environment is also tested w2016tp5 with hyper-v mode dedupe - works very nice and storage deduplication ratio is amazing, cant wait for retail of w2016. That's my few points about this "end-user experience" issue. RDP unfortunately not comparable with this kind of solution and hyper-v and UNC path mapped guest hdd is bunch of headache. I use RDP only for server management or remote connection through limited bandwidth :).

Thanks. I think I got the idea.