How to Create Shortcut of Hyper-V Virtual Machine in Windows 8 and 10
There's nothing wrong in running the Hyper-V Manager and launch your virtual machines from there. However, creating a shortcut for each vm you have you can start them fast simply by double clicking a shortcut on Desktop.
If you want you can even set a vm to start every time you sign in to Windows. This tutorial will show you step by step how to do this.
Tip
I've added a new video to tutorial. Video is from Ten Forums Videos thread:
Video shows a more elegant method to create a Hyper-V VM shortcut than this tutorial. It shows how to create a single shortcut which when clicked, starts the VM, opens its VM Connection window, and when VM connection is closed, automatically shuts down the VM.
For this method, you will need one simple PowerShell script (extension .ps1), and one simple Visual Basic script (extension .vbs).
PowerShell script AnyName.ps1:
Code:Start-VM "VM_Name" C:\Windows\System32\vmconnect.exe localhost "VM_Name" | Out-Null Stop-VM "VM_Name"
Visual Basic script AnyName.vbs:
Code:command = "powershell.exe -nologo -command PathAndNameOfPowerShellScript.ps1" set shell = CreateObject("WScript.Shell") shell.Run command,0
1.1) Right click Desktop, select New > Shortcut:
1.2) Click Browse, find and select the standalone Virtual Machine Connection executable vmconnect.exe in folder C:\Windows\System32\, click OK:1.3) Add parameters to shortcut target path, in this case localhost (your Hyper-V host) followed by the name of the vm in quotes. In this example I create a shortcut for a Linux vm I have named as Cent OS 7 so I have to add localhost "Cent OS 7". Click Next:
1.4) Name the shortcut as you wish, click Finish:
2.1) The standalone Virtual Machine Connection must be run elevated, with built-in administrator rights. To do this right click your new shortcut and select Properties:
2.2) Select Shortcut tab, click Advanced:2.3) Select Run as administrator, click OK, save Shortcut Properties by clicking OK:
2.4) Repeating this procedure for each of your virtual machines you can launch any of them simply by double clicking respective shortcut:
2.5) When you have launched the vm, start (boot) it from the Start button:
Tip
For advanced users:
Because the shortcut is run with elevated admin rights, you get the UAC prompt every time you launch a vm from its shortcut:
To bypass UAC, see this tutorial on our sister site for creating an elevated task shortcut which runs the vm without UAC prompt: How to Create an Elevated Program Shortcut without a UAC Prompt in Windows.
Kari
Related Tutorials
- How to Setup and Use Hyper-V in Windows 10 for OS Virtualization
- How to Create and Use Hyper-V Checkpoints in Windows 10
- How to Create VHD of Windows 10 Installation and Use in Hyper-V
- How to Create a Hyper-V Manager shortcut in Windows 10
- How to Create a Hyper-V Virtual Machine Connection shortcut in Windows 10
- How to Rename Hyper-V Virtual Machine in Windows 10
- How to Delete Hyper-V Virtual Machine in Windows 10
- How to Move Hyper-V Virtual Machine in Windows 10
- How to Create Hyper-V virtual machine using free Windows XP Mode in Windows 10
- How to Add Hyper-V Manager to Control Panel in Windows 10