We help IT Professionals succeed at work.

autostart a VM in Windows 10

1,435 Views
Last Modified: 2016-09-15
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.
Comment
Watch Question

CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
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.

Author

Commented:
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?
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Right.
Tarmo KabonenIT&Helpdesk Manager
CERTIFIED EXPERT

Commented:
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.
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
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.
Tarmo KabonenIT&Helpdesk Manager
CERTIFIED EXPERT

Commented:
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".

Author

Commented:
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.

Author

Commented:
Perhaps Powershell?
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
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.

Author

Commented:
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?
Tarmo KabonenIT&Helpdesk Manager
CERTIFIED EXPERT

Commented:
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): http://www.tenforums.com/tutorials/3539-sign-user-account-automatically-windows-10-startup.html.
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 :).
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
"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.
Tarmo KabonenIT&Helpdesk Manager
CERTIFIED EXPERT

Commented:
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.
CERTIFIED EXPERT
Distinguished Expert 2019
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
"Pretty long lunch - from 6th of september 2016. I love those experts :)." - september 6th? I wrote that today, what are you loving?
Tarmo KabonenIT&Helpdesk Manager
CERTIFIED EXPERT

Commented:
"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 :).

Author

Commented:
McKnife:

Thanks. I think I got the idea.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.