Solved

autostart a VM in Windows 10

Posted on 2016-09-05
17
158 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.
0
Comment
Question by:lineonecorp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
  • 5
17 Comments
 
LVL 54

Expert Comment

by:McKnife
ID: 41785614
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.
0
 

Author Comment

by:lineonecorp
ID: 41785618
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?
0
 
LVL 54

Expert Comment

by:McKnife
ID: 41785629
Right.
0
Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

 
LVL 2

Expert Comment

by:kapsionu
ID: 41785638
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.
0
 
LVL 54

Expert Comment

by:McKnife
ID: 41785645
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.
0
 
LVL 2

Expert Comment

by:kapsionu
ID: 41785673
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".
0
 

Author Comment

by:lineonecorp
ID: 41791034
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.
0
 

Author Comment

by:lineonecorp
ID: 41791037
Perhaps Powershell?
0
 
LVL 54

Expert Comment

by:McKnife
ID: 41791077
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.
0
 

Author Comment

by:lineonecorp
ID: 41797214
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?
0
 
LVL 2

Expert Comment

by:kapsionu
ID: 41797364
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 :).
0
 
LVL 54

Expert Comment

by:McKnife
ID: 41797579
"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.
0
 
LVL 2

Expert Comment

by:kapsionu
ID: 41797629
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.
0
 
LVL 54

Accepted Solution

by:
McKnife earned 500 total points
ID: 41797633
"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?" - I asked you to please look at mstsc /? to familiarize with the command line tool for remote desktop. mstsc can open connection files (.rdp files with saved logon settings), so that a script can be used to autoconnect to a vm. 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.

lineonecorp, what you could do with such a script: you could have it start right after logon to win10. So you could place it in autostart (%appdata%\Microsoft\Windows\Start Menu\Programs\Startup) as a batch file. Content would be a one liner like this:
mstsc c:\test\test.rdp

Open in new window

You get the idea?
Now about kapsionu's smart "Let's hope Your win10 hyper-v environment is faster than autologon not to see "cannot connect" on autologon :)." which is true, I advice you to test it. If too slow, just add another line to your batch beginning:
timeout 10
(for 10 seconds).
1
 
LVL 54

Expert Comment

by:McKnife
ID: 41797683
"Pretty long lunch - from 6th of september 2016. I love those experts :)." - september 6th? I wrote that today, what are you loving?
0
 
LVL 2

Expert Comment

by:kapsionu
ID: 41798635
"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 :).
1
 

Author Comment

by:lineonecorp
ID: 41800972
McKnife:

Thanks. I think I got the idea.
0

Featured Post

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question