Professional Documents
Culture Documents
How To Setup and Use Hyper
How To Setup and Use Hyper
How To Setup and Use Hyper
for OS Virtualization
Table of contents:
1 INTRODUCTION.................................................................................................................................. 3
2 SOME VOCABULARY........................................................................................................................... 4
3 HOW TO ENABLE AND SET UP HYPER-V VIRTUALIZATION....................................................................5
4 HOW TO CREATE AND USE VIRTUAL SWITCHES TO CONNECT VIRTUAL MACHINES TO NETWORK......10
4.1 UNDERSTANDING VIRTUAL SWITCHES..........................................................................................................10
4.2 CREATE A VIRTUAL SWITCH.......................................................................................................................11
4.3 CONNECT A VIRTUAL MACHINE TO A VIRTUAL SWITCH (WINDOWS VISTA SP2 AND LATER).................................18
4.4 CONNECT A VIRTUAL MACHINE TO A VIRTUAL SWITCH (PRE WINDOWS VISTA SP2 OR LINUX)..............................19
5 CREATE A VIRTUAL MACHINE............................................................................................................ 24
5.1 CREATE A WINDOWS VIRTUAL MACHINE (WINDOWS 7 OR LATER)....................................................................24
5.2 CREATE A LEGACY WINDOWS VIRTUAL MACHINE (WINDOWS VISTA OR EARLIER).................................................31
5.3 CREATE A LINUX VIRTUAL MACHINE.............................................................................................................36
5.4 INSTALL OPENSUSE 12.1 GUEST ON HYPER-V.............................................................................................37
5.4.1.1 CREATE A VIRTUAL PRIVATE NETWORK SWITCH...................................................................................37
5.4.2 Install Ubuntu 11.10 guest on Hyper-V......................................................................................50
5.5 HOW TO CREATE AND USE HYPER-V CHECKPOINTS IN WINDOWS 10...............................................................64
5.5.1 Create a Checkpoint...................................................................................................................65
5.5.2 Apply (restore) a checkpoint......................................................................................................69
5.5.3 Checkpoint settings....................................................................................................................71
5.6 HOW TO ADD OR REMOVE A PHYSICAL HARD DISK FOR HYPER-V VIRTUAL MACHINE..........................................73
5.6.1 To Add Physical Hard Disk to Hyper-V Virtual Machine............................................................74
5.6.2 To Remove Physical Hard Disk from Hyper-V Virtual Machine.................................................79
5.7 HOW TO SEE IF HYPER-V VIRTUAL MACHINE IS GENERATION 1 OR GENERATION 2.............................................85
5.7.1 To See Generation of Hyper-V Virtual Machine in Hyper-V Manager.......................................86
5.7.2 To See Generation of All Hyper-V Virtual Machines in PowerShell...........................................88
5.8 HOW TO CREATE A HYPER-V MANAGER SHORTCUT IN WINDOWS 10...............................................................89
5.8.1 To Download a Hyper-V Manager Shortcut...............................................................................91
5.8.2 To Manually Create a Hyper-V Manager Shortcut....................................................................91
5.9 HOW TO CREATE SHORTCUT OF HYPER-V VIRTUAL MACHINE IN WINDOWS 8 AND 10........................................95
5.9.1 Create the Shortcut....................................................................................................................96
5.9.2 Elevate the Shortcut...................................................................................................................99
5.10 HOW TO CREATE A HYPER-V VIRTUAL MACHINE CONNECTION SHORTCUT IN WINDOWS 10..........................103
5.10.1 To Download a Hyper-V Virtual Machine Connection Shortcut..............................................104
5.10.2 To Manually Create a Hyper-V Virtual Machine Connection Shortcut....................................105
5.11 HOW TO IMPORT HYPER-V VIRTUAL MACHINES....................................................................................108
5.11.1 To Import Hyper-V Virtual Machine using Hyper-V Manager.................................................109
5.11.2 To Import Hyper-V Virtual Machine using PowerShell............................................................117
5.12 HOW TO EXPORT HYPER-V VIRTUAL MACHINES IN WINDOWS 10............................................................121
5.12.1 To Export Hyper-V Virtual Machine(s) using Hyper-V Manager..............................................122
5.12.2 To Export All Hyper-V Virtual Machines using PowerShell......................................................125
5.12.3 To Export a Single Hyper-V Virtual Machine using PowerShell...............................................125
5.13 HOW TO CREATE A HYPER-V "REMOTE FILE BROWSER" SHORTCUT IN WINDOWS 8 AND 8.1........................128
5.13.1 To Download a "Hyper-V Remote File Browser" Shortcut.......................................................129
5.13.2 To Manually Create a "Hyper-V Remote File Browser" Shortcut.............................................130
5.14 MIGRATING YOUR VIRTUAL MACHINES TO WINDOWS SERVER 2012 R2 HYPER-V......................................134
5.14.1 Enabling Live Migration and Migrating VMs using PowerShell..............................................139
5.14.2 Configure Constrained Delegation to Authenticate Live Migrations.......................................140
1 Introduction
Information
Windows 10 Pro, Education and Enterprise editions come with a built-in
hypervisor client Hyper-V allowing users to create and run other operating
systems on a virtual machine. Although Hyper-V is mainly designed to run
Windows guests it can also be used to virtually install other operating systems
like various Linux versions.
In this tutorial we will enable and setup Hyper-V, create virtual switches to
allow our virtual machines to communicate with network and Internet, and
finally create some sample virtual machines.
Although starting from the basics this tutorial might give some tips to the more
advanced users, too.
Note
Please notice:
Hyper-V is only available in Windows 10 Pro, Education, and
Enterprise editions. It is not available in Windows 10 Home.
2 Some vocabulary
A short list of some terms worth to know.
Hypervisor
Hypervisor or virtual machine monitor (VMM) is a piece of computer software,
firmware or hardware that creates and runs virtual machines (Wikipedia)
Hyper-V
Hyper-V is a native hypervisor; it can create virtual machines on x86-64
systems. Starting with Windows 8, Hyper-V supersedes Windows Virtual PC as
the hardware virtualization component of the client editions of Windows
(Wikipedia)
Virtual Machine (vm)
A virtual machine (VM) is an emulation of a particular computer system. Virtual
machines operate based on the computer architecture and functions of a real
or hypothetical computer, and their implementations may involve specialized
hardware, software, or a combination of both (Wikipedia)
Host or Host System, Host OS
Host is the computer and operating system running the virtualization platform
(in this case Hyper-V in Windows 10 host) to host your virtual machines
(guests)
Guest or Guest System, Guest VM
A virtual machine, a guest operating system installed on a vm and stored on a
Virtual Hard Disk (vhd)
Virtual Hard Disk (vhd)
A vhd file emulates a physical hard disk. It can contain a full operating system
on a virtual machine, or it can be used to store files as any physical hard disk
Virtual Switch
A virtual switch emulates a physical network adapter. A Hyper-V vm cannot
directly connect and use the network adapters on your host, it needs a virtual
switch in between. The vm sees and treats the virtual switch as a network
adapter and uses it to communicate with the physical host network adapter,
which then forwards all communications further to network
3 How to enable and set up Hyper-V virtualization
By default the Hyper-V is disabled. To start we need to enable it as follows:
Windows will now install the required components. You have to reboot
to let Windows finalize the installation:
After the reboot launch Hyper-V Manager:
Hyper-V should automatically connect to your host (left pane) and show
the menu on right pane:
If the left pane shows no Hyper-V servers to connect (your local host
computer), click Connect to server on the right pane, select Local
computer in the dialog that follows and click OK:
If you want to change the location where your virtual machines will be
saved, click Hyper-V Settings and change the location:
4 How to create and use Virtual Switches to connect
Virtual Machines to Network
Information
I will try to make this tutorial as simple and easy to understand as possible.
Therefore some examples used might seem to you fellow geeks too simple.
Name the switch as you wish, select which of host NICs it will be
connected to. Please check that the option Allow management
operating system to share this network adapter is selected, otherwise
you might lose all connectivity:
Also important to notice that to get two separate public IPs the external
switch must not be shared, and host needs to be connected not only
with another NIC but with another router and subscriber line. If both
NICS belong to the same subnet and are using the same router/line they
always share the public IP
Before clicking OK to save new switch you just created check that you have no
active network connections used to anything important at the moment, for
instance unfinished downloads or backups to a network location; when you
click Apply or OK the network connection of your host is disconnected shortly
before a new connection is created. Hyper-V will now create the switch.
Screenshot below shows typical available network connections when all types
of virtual switches have been created:
(Physical host NICS highlighted
with yellow, virtual switches
with red.)
Notice that external virtual switch connected to host WLAN (vEthernet
(AGMnet External WLAN) in this example) is not connected, showing red X.
This is because of the WLAN NIC of host is disconnected (greyed out in
screenshot); a virtual machine using this virtual switch would have no
connectivity at the moment.
You might have also noticed that although the virtual switch vEthernet
(AGMnet External WLAN) is connected to (is using) host’s WLAN NIC it is
however showing an Ethernet LAN symbol (connector of a LAN cable) and
presented under LAN connections. This has a simple explanation: all Hyper-V
network connections are Ethernet (LAN) connections; Hyper-V does not
support WiFi so even when a virtual switch is connected to a wireless NIC,
Hyper-V presents it as Ethernet connection to the virtual machine i.e. the
virtual NIC on vm “thinks” it is connected with an Ethernet cable.
This also means that when we are using an external virtual switch connected to
a WLAN NIC, we need an extra network bridge on the host. The virtual NIC
connects to a virtual switch, virtual switch in its turn connects to a host
network bridge which creates (as its name says) a bridge between our virtual
Ethernet connection and host WLAN N NIC’s connection to the router:
A "real life" situation from my computer. Virtual machine sees the connection
as an Ethernet connection, connecting its Virtual NIC to External Virtual
Switch, which in its turn is connected to a Network Bridge on host and further
to WLAN NIC on host. Sounds complicated, is simple:
When creating a new VM select the correct virtual switch for your purposes.
To connect VM to other computers and to Internet select an external switch
which is connected to a host NIC currently enabled, connected, and online:
2. Click Next:
3. Name your VM as you wish, click Next (if you want to save the VM in
other than default location, select Store the virtual machine in a different
location):
Select the VM generation. Generation 2 (GPT / UEFI) can only be used
for 64 bit Windows 8 or later respective Windows Server 2012 or later
guest operating systems. For all other guest systems use Generation 1
(MBR / BIOS). Click Next:
4. Assign RAM to vm, select Use Dynamic Memory for this virtual machine,
click Next:
The RAM assigned to a vm is taken from your host RAM; if you assign 1 GB
to a vm, when it's run your host is missing this 1 GB. I recommend you try
first following values if your host has 4 GB RAM or less:
Selecting the Dynamic memory lets Hyper-V to be flexible, use only the
amount of RAM needed at any given moment. In Windows virtual
machines, Hyper-V uses the amount you gave it at startup of the vm but
then when it's not needed, it releases some of it back to host, getting
again more when it needs it.
7. Select the install media for your vm. If you install from a CD or DVD disk on
your host CD/DVD drive, select Physical CD/DVD drive and from drop
down list select the correct drive. In this example I chose to use an ISO file
containing Windows 7 Ultimate installation files. Click Next to continue:
Notice that a 2nd Generation vm can only be installed from an ISO
image, therefore if you selected 2nd Generation in step 4.4 the option to
use a DVD drive is not available.
7. Now you can launch the vm as told in Step 10 in Create a Windows virtual
machine (Windows 7 or later) and start installing your OS.
Information
Although best when running Windows guests, Windows 8 built-in Microsoft
Hyper-V can also be used to run Linux guests. Officially Hyper-V only supports
SUSE and Red Hat enterprise server distributions but with a few simple tricks
any Linux distro can be installed.
In this tutorial we will install both OpenSUSE 12.1 and Ubuntu 11.10 distros.
Please notice that I have still not found how to get sound working on Hyper-V
Linux guests. Also changing the resolution seems to be extremely tricky,
following this tutorial you can set OpenSUSE display resolution freely during
the installation procedure but it cannot be changed later on. For Ubuntu I have
only managed 800 * 600 resolution.
Forgetting the missing sound and restricted resolution, Hyper-V Linux guests
are fully functional operating systems, ideal for getting to know and practise
Linux and virtualization.
Tips from other users regarding sound and resolution issues welcome!
.
New Virtual Machine Wizard opens. Click Next
.
.
Specify the name of the virtual machine and where it should be saved. Click Next
.
.
Assign RAM. Notice that the RAM assigned to a virtual machine is taken from the total of
RAM on your host PC; to run virtual machine well you need to balance between the RAM
of your host and virtual machine. For OpenSUSE I recommend using 1 GB (1024 MB); if
less you can have issues with GUI, more does not add speed or benefit in other way.
OpenSUSE runs well with 1 GB. Click Next
.
.
In Network Configuration at this point select Connection: Not Connected. We will
add virtual switch later
.
.
Specify name, location and size of the virtual hard disk. For OpenSUSE 8 GB is enough
to install and run, here I added some more for storage space. Click Next
.
.
Specify the location of install media, an ISO file or CD/DVD. Click Next
.
.
Click Finish
.
For how to create a private virtual switch, create Ubuntu virtual machine and
add Private Legacy Network Adapter and making Ubuntu installation to use it,
follow the steps 1.1., 1.2. and 1.3. as described above (Install OpenSUSE on
Hyper-V).
2.1. Install Ubuntu
Connect and start vm as described above (Install OpenSUSE) on 1.4.1 and 1.4.2
For Ubuntu (and all Debian family distros) to work on Hyper-V we need to
disable Advanced Configuration and Power Interface (ACPI). When ACPI is
enabled, Ubuntu does not support Legacy Network Driver needed to install
and run it on Hyper-V. Press F6 to select installation options, select acpi=off,
press Spacebar to select it, press ESC to exit Options menu
.
.
Select Install Ubuntu, press Enter
Select the installation language
.
.
Select Install this third party software to add MPEG support, click Continue
.
.
Select Erase and Install, click Continue
.
.
Click Install Now
.
.
Select your Time Zone, click Continue
.
.
8. Select your preferred keyboard layout, click Continue
.
.
Set your user credentials
.
.
Let Ubuntu install
.
.
When installation is completed click Restart Now
.
.
When Ubuntu reboots and stops telling Please remove installation media,
click Stop to stop and close vm. This ejects the installation media
.
.
Restart vm, log in
.
.
Click an empty spot on desktop, press CTRL+ALT+t to open Terminal (about the same
as Command Prompt in Windows). To move to Root (about the same as in Windows an
elevated Command Prompt), type sudo –i and press Enter. Enter your password to
confirm, press Enter again
.
.
Now we need to edit Initramfs to add modules which offer support for Hyper-V
integration components. We need to manually add modules for bus (= traffic between
host and guest), storage and network. To do this, open Initramfs using your preferred
editor. I use Nano in this example:
Type nano /etc/initramfs-tools/modules and hit Enter to open Initramfs in Nano
editor
.
.
Add these four lines at the end of the file
hv_vmbus
hv_storvsc
hv_blkvsc
hv_netvsc
.
.
Press CTRL+X to end editing, press Y to save changes. Press Enter to finally accept old
Initramfs to be overwritten
.
.
Update Initramfs: type update-initramfs –u, press Enter
.
.
Type exit and press Enter to exit root (admin mode), type exit and press Enter to close
Terminal
.
.
Shut down vm
See step 1.4.15. (Install OpenSUSE) above to switch Legacy Network
Adapter to External Switch
Start vm, login and you are ready to go
.
.
Note
Checkpoint is a powerful Hyper-V feature to easily undo all changes on a virtual
machine. You can play with virtual machines testing apps, changing settings, editing
registry and so on as if "sandboxing" and when needed, discard all changes and restore
an earlier Checkpoint in a few clicks and seconds.
A standard checkpoint stores virtual machine state exactly as it is (see Part Three in this
tutorial for difference between a production and a standard checkpoint). Whereas a
Windows Restore Point only stores and restores the Windows system state but does not
store the app state and restore or remove user files, a standard Hyper-V checkpoint
stores and restores the complete system including app state and user files. A checkpoint
can rather be compared with a system image than a restore point although even that
comparison is not accurate.
You can create as many Checkpoints as you want to. Creating a checkpoint only takes a
few seconds. Testing for instance sysprepping Windows 10 Technical Preview in Audit
Mode you can create a checkpoint before entering the Audit Mode after installation has
finished and Windows boots to OOBE / Welcome Mode, second checkpoint when signed
in as built-in administrator in Audit Mode and third before sysprepping with your answer
file. Now when something does not work as you'd expected, simply return to any of your
earlier checkpoints instead of starting from scratch.
In the Windows 10 Creators update you can now take checkpoints and saved states
on virtual machines that are acting as nested Hyper-V hosts.
For this tutorial you will need Hyper-V enabled and setup as told in this tutorial, and at
least one working virtual machine.
1.5) You can see all your checkpoints in Hyper-V Manager. Select a vm to see its
checkpoints, Now is the current state:
5.4.2 Apply (restore) a checkpoint
2.3) To apply any existing checkpoint, select your vm in Hyper-V Manager and double
click a checkpoint, alternatively right click a checkpoint and select Apply:
2.4) The selected checkpoint will now be applied and vm turned off. Hyper-V notifies
you of success (#1), start (boot) the vm to checkpoint you had selected by clicking
the Start button (#2):
5.4.3 Checkpoint settings
3.1) In vm settings you can select what type of checkpoints you will use:
Production checkpoints
A Production Checkpoint stores the machine state but considers all apps being closed; if
you have let's say an Excel workbook open but you have not saved your work, applying
this checkpoint will restore the state of the vm as it was when you had saved your work
last time. When a production checkpoint is applied Windows boots as in cold boot, to
Welcome screen and empty desktop after sign in with no running apps.
Standard checkpoints
A Standard Checkpoint stores the machine state with app state; all open apps and
unsaved work will be saved in checkpoint, if you have PowerPoint with an unsaved
presentation open when checkpoint is created, it will be open and and your unsaved
work there when the checkpoint is applied. This causes a minor security risk, though: as
a standard checkpoint when applied bypasses Welcome / Sign In and enters directly to
desktop as it was when checkpoint was saved, anyone having access to your vm can
see your files and use your access rights.
That's about it! Do not hesitate to post your questions and concerns in this thread.
Kari
Information
Hyper-V enables running virtualized computer systems on top of a physical host. These
virtualized systems (aka: guests) can be used and managed just as if they were physical
computer systems, however they exist in a virtualized and isolated environment.
Your Hyper-V virtual machines can also be connected to physical hard disks from the
host computer—not just to virtual hard disks. (This is sometimes referred to as having a
“pass-through” disk connected to a virtual machine.)
This tutorial will show you how to add and remove physical hard disks to access from
a Hyper-V virtual machine in Windows 8 and Windows 10.
Note
Hyper-V is only available in the Window 8 Pro, Windows 8 Enterprise, Windows 10 Pro,
Windows 10 Enterprise, and Windows 10 Education editions.
You can add hard drives (ex: HDD and SSD) and removable USB hard drives, but you
will not be able to add removable media (ex: USB flash drive) to a Hyper-V virtual
machine.
While you have a physical hard disk added to a Hyper-V virtual machine, you will not be
able to create a checkpoint for the virtual machine.
CONTENTS:
1. Open Disk Management (diskmgmt.msc).
2. Right click on the online disk (ex: Disk 3 - "Internal HDD") you want to add to the
VM, and click/tap on Offline. (see screenshot below)
Note
It's required that the physical hard disk be in an offline state on the host computer to be
able to add to the VM.
3. Once the disk is offline, you can close Disk Management if you like.
4. Open the settings of the Hyper-V virtual machine you want to add the disk to. (see
screenshots below)
Note
It doesn't matter if you currently have the virtual machine off or running.
5. In the VM's settings, click/tap on SCSI Controller in the left navigation pane,
select Hard Drive on the right side, and click/tap on the Add button. (see screenshot
below)
6. Select (dot) Physical hard disk on the right side, select the disk you want to add in
the drop down menu, and click/tap on OK. (see screenshot below)
7. The disk will now be available to access in the virtual machine. (see screenshot
below)
5.5.2 To Remove Physical Hard Disk from Hyper-V Virtual Machine
1. Open the settings of the Hyper-V virtual machine you want to remove the disk from.
(see screenshots below)
Note
It doesn't matter if you currently have the virtual machine off or running.
2. In the VM's settings, select the disk you want to remove under SCSI Controller in
the left navigation pane, and click/tap on the Remove button on the right side. (see
screenshot below)
6. Right click on the offline disk (ex: Disk 3 - "Internal HDD") you removed from the VM,
and click/tap on Online. (see screenshot below)
Note
You will need to set the disk back to an online state to be able to access it from your
host computer again.
7. Once the disk is back online, you can close Disk Management if you like.
That's it,
Shawn
5.6 How to See if Hyper-V Virtual Machine is Generation 1
or Generation 2
Information
Hyper-V enables running virtualized computer systems on top of a physical host. These
virtualized systems (aka: guests) can be used and managed just as if they were physical
computer systems, however they exist in a virtualized and isolated environment.
When you create a new virtual machine (VM) in Hyper-V, you must choose the
generation of this VM to be either generation 1 or generation 2.
Once a virtual machine has been created, you cannot change its generation.
This tutorial will show you how to quickly see if your Hyper-V virtual machines are
generation 1 or generation 2.
CONTENTS:
1. Open Hyper-V Manager.
2. Select a Hyper-V virtual machine at the top of the middle pane you want to see what
generation it is. (see screenshots below)
Note
3. You will now see what generation this Hyper-V virtual machine is at the bottom of
the middle pane.
5.6.2 To See Generation of All Hyper-V Virtual Machines in
PowerShell
2. Copy and paste the command below into the elevated PowerShell, and press Enter.
(see screenshot below)
That's it,
Shawn
Information
The Windows 10 Pro, Enterprise, and Education editions include the Hyper-
V virtualization technology. Hyper-V enables running virtualized computer systems on
top of a physical host. These virtualized systems can be used and managed just as if
they were physical computer systems, however they exist in virtualized and isolated
environment. Special software called a hypervisor manages access between the virtual
systems and the physical hardware resources. Virtualization enables quick deployment
of computer systems, a way to quickly restore systems to a previously known good
state, and the ability to migrate systems between physical hosts.
Hyper-V Manager is an in-box tool for diagnosing and managing your local Hyper-V
host and a small number of remote hosts. Hyper-V Manager is available
through Programs and Features as Hyper-V Management Tools on any Windows
OS with Hyper-V included. Hyper-V Platform does not need to be enabled in order to
manage remote hosts.
This tutorial will show you how to create or download a Hyper-V Manager shortcut
in Windows 10.
CONTENTS:
EXAMPLE: Hyper-V Manager
OPTION ONE
5.7.1 To Download a Hyper-V Manager Shortcut
Hyper-V_Manager_shortcut.zip
2. Save the .zip file to your desktop.
1. Right click or press and hold on an empty area on your desktop, and click/tap
on New and Shortcut.
2. Copy and paste the location below into the location area, and click/tap on Next. (see
screenshot below)
%windir%\System32\mmc.exe virtmgmt.msc
3. Type Hyper-V Manager for the name, and click/tap on the Finish button. (see
screenshot below)
NOTE: You could name this shortcut anything you would like though.
4. Right click or press and hold on the new Hyper-V Manager shortcut, and click/tap
on Properties.
%ProgramFiles%\Hyper-V\SnapInAbout.dll
7. Select the icon highlighted in blue above, and click/tap on OK. (see screenshot
above)
NOTE: You could use any icon that you would like instead though .
That's it,
Shawn
5.8 How to Create Shortcut of Hyper-V Virtual Machine in
Windows 8 and 10
Note
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.
2.5) When you have launched the vm, start (boot) it from the Start button:
Tip
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
Information
The Windows 10 Pro, Enterprise, and Education editions include the Hyper-
V virtualization technology. Hyper-V enables running virtualized computer systems on
top of a physical host. These virtualized systems can be used and managed just as if
they were physical computer systems, however they exist in virtualized and isolated
environment. Special software called a hypervisor manages access between the virtual
systems and the physical hardware resources. Virtualization enables quick deployment
of computer systems, a way to quickly restore systems to a previously known good
state, and the ability to migrate systems between physical hosts.
This tutorial will show you how to create or download a Hyper-V Virtual Machine
Connection shortcut in Windows 10.
CONTENTS:
Option One: To Download a Hyper-V Virtual Machine Connection Shortcut
Option Two: To Manually Create a Hyper-V Virtual Machine Connection Shortcut
Hyper-V_VM_Connection_shortcut.zip
2. Save the .zip file to your desktop.
1. Right click or press and hold on an empty area on your desktop, and click/tap
on New and Shortcut.
You could name this shortcut anything you would like though.
4. Right click or press and hold on the new Hyper-V VM Connection shortcut, and
click/tap on Properties.
Information
Hyper-V enables running virtualized computer systems on top of a physical host. These
virtualized systems (aka: guests) can be used and managed just as if they were physical
computer systems, however they exist in a virtualized and isolated environment.
Import allows you to restore virtual machines. You don't need to export a virtual
machine to be able to import it. Import will try to recreate the virtual machine from
whatever is available. Importing a virtual machine registers the virtual machine with the
Hyper-V host. A virtual machine export can be imported back into the host from which it
was derived or new host.
This tutorial will show you how to import a Hyper-V virtual machine (guest) on
your Windows 10 PC (host).
Note
Hyper-V is only available in the Windows 10 Pro, Windows 10 Enterprise, and Windows
10 Education editions.
CONTENTS:
5.10.1 To Import Hyper-V Virtual Machine using Hyper-V
Manager
1. Open Hyper-V Manager.
2. Select the Hyper-V host (ex: "BRINK-DESKTOP") in the left pane you want to import
a virtual machine to, and click/tap on Import Virtual Machine in the
right Actions pane. (see screenshot below)
3. Click/tap on Next on the "Before you Begin" screen. (see screenshot below)
4. Click/tap on Browse, navigate to and select the folder (ex: "Windows 7 Ultimate")
that contains the virtual machine (.vmcx file) you want to import, click/tap Select
Folder, and click/tap on Next. (see screenshots below)
5. Select the virtual machine (ex: "Windows 7 Ultimate") you want to import, and
click/tap on Next. (see screenshots below)
6. Select (dot) an import type you want to perform, click/tap on Next, and go to step
7 or step 8 below depending on what import type you selected. (see screenshot below)
Register the The current location of the Export files is where the virtual machine will be run fr
virtual machine virtual machine has the same ID as it did at the time of export. Because of this, If the
in-place registered with Hyper-V it needs to be deleted before the import will work. When the
export files become the running state files and cannot be removed.
Restore the You are given an option to store the VM files in a specific location or use the locat
virtual machine This import type creates a copy of the exported file and moves them to the selected loc
virtual machine has the same ID as it did at the time of export. Because of this, if the
running in Hyper-V it needs to be deleted before the import can be completed. When
the exported files remain untouched and can be removed and / or imported again.
Copy the virtual This import type is similar to the Restore type in that you select a location for the V
machine that when imported the virtual machine has a new unique ID. This allows for the Virtua
into the same host multiple time.
7. If you selected to "Register the virtual machine in-place"
A) If you like, you can specify new or use existing folders to store the virtual machine
files. When finished, click/tap on Next. (see screenshot below)
B) Browse to and select the folder where you want to store the imported virtual hard
disks (.vhdx file) for this virtual machine, and click/tap on Next. (see screenshot below)
C) Click/tap on Finish on the "Summary" screen, and go to step 9 below. (see
screenshot below)
Note
This may take a while to finish copying the virtual machine files and hard disk to the
selected folder location(s).
9. The Hyper-V virtual machine (ex: "Windows 7 Ultimate") has now been imported to
the selected Hyper-V host (ex: "BRINK-DESKTOP"). (see screenshot below)
10. When finished, you can close Hyper-V Manager if you like.
Note
3. To "Register the virtual machine in-place (use the existing unique ID)"
Note
The current location of the Export files is where the virtual machine will be run from.
When imported, the virtual machine has the same ID as it did at the time of export.
Because of this, If the virtual machine is already registered with Hyper-V it needs to be
deleted before the import will work. When the import has completed, the export files
become the running state files and cannot be removed.
A) Type the command below into the elevated PowerShell, press Enter, and go to step
6 below. (see screenshot below)
Substitute Full path of virtual machine .vmcx file in the command above with the
actual full path of where the virtual machine .vmcx file you want to import is located.
For example:
Code:
Import-VM -Path 'D:\Vitual Machines\Windows 7 Ultimate\Virtual Machines\7BEDECF9-
E91F-4115-9E86-BBFEE136D881.vmcx'
4. To "Restore the virtual machine (use the existing unique ID)"
Note
You have the option to store the VM files in a specific location or use the locations
default to Hyper-V. This import type creates a copy of the exported file and moves
them to the selected location. When imported, the virtual machine has the same ID as it
did at the time of export. Because of this, if the virtual machine is already running in
Hyper-V it needs to be deleted before the import can be completed. When the import
has completed the exported files remain untouched and can be removed and / or
imported again.
A) Type the command below you want to use into the elevated PowerShell, press Enter,
and go to step 6 below. (see screenshot below)
(To use default Hyper-V folders to import and copy virtual machine .vmcx and virtual
hard disk .vhdx files)
Import-VM -Path 'Full path of .vmcx file' -Copy
OR
(To specify Hyper-V folders to import and copy virtual machine .vmcx and virtual hard
disk .vhdx files)
Code:
Import-VM -Path 'Full path of .vmcx file' -Copy -VhdDestinationPath 'Full path of
folder to copy .vhdx file' -VirtualMachinePath 'Full path of folder to copy .vmcx
file'
Note
Substitute Full path of .vmcx file in the commands above with the actual full path of
where the virtual machine .vmcx file you want to import is located.
Substitute Full path of folder to copy .vhdx file in the second command above with
the actual folder path where you want to copy the virtual hard disk .vhdx file of the
virtual machine you want to import.
Substitute Full path of folder to copy .vhdx file in the second command above with
the actual folder path where you want to copy the virtual machine .vmcx file of the
virtual machine you want to import.
For example:
Code:
Import-VM -Path 'D:\Vitual Machines\Windows 7 Ultimate\Virtual Machines\7BEDECF9-
E91F-4115-9E86-BBFEE136D881.vmcx' -Copy -VhdDestinationPath 'D:\Vitual
Machines\Windows 7 Ultimate - Copy' -VirtualMachinePath 'D:\Vitual Machines\Windows
7 Ultimate - Copy'
Note
This import type is similar to the Restore type in that you select a location for the VM
files. The difference is that when imported the virtual machine has a new unique ID.
This allows for the Virtual Machine to be imported into the same host multiple time.
A) Type the command below you want to use into the elevated PowerShell, press Enter,
and go to step 6 below. (see screenshot below)
(To use default Hyper-V folders to import and copy virtual machine .vmcx and virtual
hard disk .vhdx files)
Import-VM -Path 'Full path of .vmcx file' -Copy -GenerateNewId
OR
(To specify Hyper-V folders to import and copy virtual machine .vmcx and virtual hard
disk .vhdx files)
Code:
Import-VM -Path 'Full path of .vmcx file' -Copy -VhdDestinationPath 'Full path of
folder to copy .vhdx file' -VirtualMachinePath 'Full path of folder to copy .vmcx
file' -GenerateNewId
Note
Substitute Full path of .vmcx file in the commands above with the actual full path of
where the virtual machine .vmcx file you want to import is located.
Substitute Full path of folder to copy .vhdx file in the second command above with
the actual folder path where you want to copy the virtual hard disk .vhdx file of the
virtual machine you want to import.
Substitute Full path of folder to copy .vhdx file in the second command above with
the actual folder path where you want to copy the virtual machine .vmcx file of the
virtual machine you want to import.
For example:
Code:
Import-VM -Path 'D:\Vitual Machines\Windows 7 Ultimate\Virtual Machines\7BEDECF9-
E91F-4115-9E86-BBFEE136D881.vmcx' -Copy -VhdDestinationPath 'D:\Vitual
Machines\Windows 7 Ultimate - Copy' -VirtualMachinePath 'D:\Vitual Machines\Windows
7 Ultimate - Copy' -GenerateNewId
This may take a while to finish copying the virtual machine files and hard disk to the
selected folder location(s).
That's it,
Shawn
Information
Hyper-V enables running virtualized computer systems on top of a physical host. These
virtualized systems (aka: guests) can be used and managed just as if they were physical
computer systems, however they exist in a virtualized and isolated environment.
Import allows you to restore virtual machines. You don't need to export a virtual
machine to be able to import it.
When creating an export of a virtual machine, all associated files are bundled in the
export. This includes configuration files, hard drive files, and any existing checkpoint
files.
This tutorial will show you how to export a single or all Hyper-V virtual machines
(guests) on your Windows 10 PC (host).
1. Open Hyper-V Manager.
2. Select the Hyper-V host (ex: "BRINK-DESKTOP") in the left pane you want to export
a virtual machine from, select one or more virtual machine(s) in the middle pane to
export, and click/tap on Export in the right Actions pane. (see screenshot below)
Note
You can press and hold the Ctrl key and click/tap on any virtual machine(s) to select
them to export, then release the Ctrl key when finished selecting.
3. Click/tap on Browse, navigate to and select the folder (ex: "My Virtual Machines")
that you want to export to, click/tap Select Folder, and click/tap on Export. (see
screenshots below)
4. The virtual machine(s) will now be exported. It may take a while to finish. (see
screenshots below)
5. When finished, you can close Hyper-V Manager if you like.
Note
For more details about the Export-VM command used in this option, see: Export-VM
2. Copy and paste the command below into the elevated PowerShell, and press Enter.
Note
Substitute Full path of folder to export to in the command above with the actual full
path of the folder location you want to export the virtual machines' files to.
Note
For more details about the Export-VM command used in this option, see: Export-VM
2. Type the command below into the elevated PowerShell, press Enter, and make note
of the name (ex: "w10 build 14379") of the virtual machine you want to export. (see
screenshot below)
get-vm
3. Type the command below into the elevated PowerShell, and press Enter. (see
screenshot below)
Substitute Name of virtual machine in the command above with the name of the
virtual machine from step 2 above.
Substitute Full path of folder to export to in the command above with the actual full
path of the folder you want to export the virtual machine to.
4. The virtual machine will now be exported. It may take a while to finish. (see
screenshots below)
5. When finished, you can close PowerShell if you like.
5.12 How to Create a Hyper-V "Remote File Browser"
Shortcut in Windows 8 and 8.1
Information
Hyper-V Remote File Browsing is a shell namespace extension implemented
by Hyper-V that provides a way to browse the folders/files on a remote Hyper-V server
without requiring the server to open an extra shell over the network you are managing.
The benefit of the "Remote File Browsing" is you don't have to use the normal network
share to access any location on that Hyper-V server. If you want to create a new folder,
you may need to add the folder name at the end of the export path.
This tutorial will show how to create or download a "Hyper-V Remote File
Browser" shortcut in Windows 8.
Hyper-V_Remote_File_Browser_Shortcut.zip
2. Save the .zip file to the desktop.
3. Open the .zip file and extract (drag and drop) the Hyper-V Remote File
Browser shortcut to the desktop.
5. If you like, you can Pin to Taskbar on desktop, Pin to Start screen, add to Quick
Launch, assign a keyboard shortcut to it, or move this shortcut to where you like for
easy use.
6. When finished, you can delete the downloaded .zip file on the desktop if you like, or
save it to use again.
1. Right click or press and hold on a empty area of the desktop, and click/tap
on New and Shortcut.
2. Copy and paste the command below into the location area, and click/tap on
the Next button. (see screenshot below)
%windir%\explorer.exe shell:::{0907616E-F5E6-48D8-9D61-A91C3D28106D}
3. Type Hyper-V Remote File Browser for the name, and click/tap on
the Finish button. (see screenshot below)
NOTE: You can name this shortcut anything you would like though.
4. Right click or press and hold on the new Hyper-V Remote File Browser shortcut,
and click/tap on Properties.
RemoteFileBrowse.dll
7. Select the icon highlighted in blue above, and click/tap on OK. (see screenshot
above)
NOTE: You can use any icon that you would like instead though.
9. If you like, you can Pin to Taskbar on desktop, Pin to Start screen, add to Quick
Launch, assign a keyboard shortcut to it, or move this shortcut to where you like for
easy use.
And then comes the time to migrate your old servers with Windows Server 2012 to Windows Server 2012 R2
Hyper-V with all the joys and headaches of upgrading your old servers. In most environments nowadays, the only
physical servers are the virtualization hosts, which makes the migration very important. Microsoft made the
migration much easier in the new Hyper-V version, where we can simply move virtual machines from a Windows
Server 2012 host to a Windows Server 2012 R2, without any downtime and as simple as a normal Live Migration
of virtual machines. Actually, that’s how the migration can be done, by simple doing a Shared Nothing Live
Migration in your virtual machines to the new host.
There are other options to migrate VMs in offline mode by exporting them. Another interesting feature available in
Windows Server 2012 R2 is the option to export a running VM. Given the VM is still running during the exporting
process and being changed, this is not an option for migration, but it’s perfect if you want to duplicate your virtual
servers or troubleshoot a problem.
In this recipe you will see how to migrate your virtual machines without downtime to a new Windows Server 2012
R2 using Live Migration and the offline migration exporting VMs to the new server.
To migrate your virtual machines using Shared Nothing Live Migration, make sure the source and destination
servers are on the same network. You will also improve the migration if you create a dedicated network to be
used for migrations only.
To export and import your virtual machines, you will need available storage on the local server or a shared folder
on the network.
You will now see how to migrate a virtual machine using Shared Nothing Live Migration from Windows Server
2012 to Windows Server 2012 R2 and how to export and import a virtual machine.
1. To enable Live Migrations on the destination server with Windows Server 2012 R2, open Hyper-V
Manager and click on Hyper-V Settings on the right column.
2. In Hyper-V Settings, click on Live Migrations and select the Enable incoming and outgoing live
migrations checkbox.
3. Under Simultaneous live migrations, specify the number of concurrent live migrations that will be allowed.
4. In Incoming live migrations, specify a particular network for live migration by selecting Use these IP
addresses for live migration or select Use any available network for live migration to use any local network
adapter available to move the VMs. The following screenshot shows an example of the existing options
described in the previous steps. When finished, click OK.
11. In Specify Destination Computer, type the Windows Server 2012 R2 host that you want to move your VM
and click Next.
12. In Choose Move Options, select Move the virtual machine’s data to a single location to move all
configuration files and virtual disks to the same location, Move the virtual machine’s data by selecting where
to move the items to select the location of each item to be moved or Move only the virtual machine to move
the VM only and keep the VHD files on the same location and click Next, as shown in the following screenshot.
13. In Choose a new location for virtual machine, select the destination folder where the VM will be moved
and click Next.
14. In the Summary page, verify the selected options and click Finish to start the moving process. Wait until the
completion and check the virtual machine on the destination host.
15. The other option to migrate VMs is the Export feature. To export a virtual machine to another server, open
the Start screen, and select Hyper-V Manager.
16. Select the virtual machines you want to export, right click on them, and select Export, as you can see in the
following screenshot:
17. In the Export Virtual Machine window, enter the path you want to export the virtual machines to and click
on Export.
18. Copy the exported virtual machine files to the destination host.
Note: You can also import and export VMs using the PowerShell commands Import-VM and Export-
VM respectively. For more information, open PowerShell and type Help Import-VM for import and Help Export-
VM for export.
19. Open Hyper-V Manager on the destination host and select Import Virtual Machine from the right pane.
20. In the Before You Begin screen click on Next.
21. In the Locate Folder screen, specify the folder with the virtual machine files you want to import and
click Next.
22. In the Select Virtual Machine window, select the virtual machines to be imported and click Next.
23. In the Choose Import Type window, select the type of import, as shown in the next screenshot, and
click Next.
24. If the source virtual machine has different virtual switches attached to it or different configuration that the
destination host will not support, new windows can be displayed asking you to address the problem. The next
screenshot shows an example of a VM with a different virtual switch name. Address all problems or conflicts that
the VM may have and click Next.
25. If prompted, specify the folders to store the virtual machine files and disks and click Next.
26. Click on Finish when it is done and you will see the imported virtual machine in the Hyper-V console.
As described during the steps, there are two options to migrate your virtual machines to a new server. The first
one, which is using Shared Nothing Live Migration, allows you to move your VM without any downtime, but it
requires the source host to be Windows Server 2012. With the second option, you can move VMs from any
Hyper-V version, but it’s an offline method.
Starting with the Export/Import option, the process to export the Virtual Machine collects its entire configuration
file, snapshots, the Virtual Hard Drive and puts all of them together within a new folder with the virtual machine
name in the specified path during the export process. It’s also possible to select more than one virtual machine
and export in just one go in case you are migrating from old Hyper-V versions.
Note: Since Windows Server 2012 a VM can be imported without requiring the export process. You can copy all
the virtual machine files to a new host and during the importation, you just need to select the VM configuration file
(xml) and continue the steps as shown above.
Windows Server 2012 R2 also introduces a new option to export VMs that are running, but this option is not
recommended for migration purpose, given the VM is still being updated during the export process, however it’s
very handy to copy your VMs into a lab or just for troubleshooting.
During the wizard, you specify the folders where the virtual machine files sit. It doesn’t matter if the virtual
machines were exported or not. You can simply copy and paste the VM files and the result will be the same.
After that, the wizard shows a list of virtual machines you want to import. The good news here is that Hyper-V list
the VMs per name and not using the Global Unique Identifier (GUID) as previous versions. It makes the process
even easier.
The wizard provides three different types of import. The first one Register the virtual machine in-place (use
the existing unique ID) assumes that all files of the imported VM are in a single place and just register the VM.
It can be used to register VMs in a new host using the same VM path. The second one, Restore the virtual
machine (use the existing unique ID) is almost the same as the previous option, but it allows you to specify the
VM files path and it copy the files to the new destination path. The last option Copy the virtual machine (create
a new unique ID) create new VMs with new IDs and can be very helpful when you just want to use the VM files
as a template to create new VMs.
Another problem from previous versions of Hyper-V is when the VM has different configurations in the source
host. For example, if the VM has a different virtual switch or a hardware setting that is not present in the
destination host the import process would fail. Now the import is clever enough to identify whether the VM has
conflicted or different settings. Memory, processor, disk, networks and file paths are checked and in case of
problems the wizard will prompt you to changed based on the destination limits and configuration.
When finished, your virtual machine will be ready to be started on the new server, making your migration much
simpler.
The first option used in this recipe was Shared Nothing Live Migration that has an easy and intuitive wizard to
move your VMs across your host servers. Although the article described how to move a VM from a single host
with Windows Server 2012 to a new host with Windows Server 2012 R2, you can still do the same process within
a cluster as well.
Different of Storage Migration, by default live migrations are disabled on Hyper-V. To enable it you must specify
some options such as authentication protocol, simultaneous live migration and incoming live migration.
The first configuration, authentication protocol, let you choose two options to specify the way Hyper-V will
authenticate to start the live migrations. By selecting Credential Security Support Provider (CredSSP) you can
live migrate virtual machines only if you are logged on to the source computer to start it so that CredSSP can be
used to authenticate the migration. This option doesn’t require any pre-requisites, but you will not be allowed to
perform a live migration using other remote management tools like Hyper-V Manager from another server or
PowerShell sessions. The migration will be initiated only when you are logged on the source server.
If you also want to start live migrations using these remote management tools you can select to use
Kerberos for authentication. When starting a live migration, either locally on the server or remotely, a
constrained delegation will be used to authenticate and start the migration. This is the best option due the
flexibility to start the migration also from remote tools, but it requires pre-configuration in Active Directory.
Kerberos authentication will be demonstrated at the end of the article.
The next option provides a field to specify the number of simultaneous live migrations that Hyper-V will support.
In this option the only limit is the hardware and the network connection between the servers.
The Incoming live migrations option allows you to configure which network will be used for live migrations. For
better performance and resilience is recommended to use a specific network for live migration, but if you have
only one network adapter on the host computer or doesn’t have a particular adapter for live migration you can
also use any available network. After enabling live migrations and setting up these three options you are ready to
move your VMs.
Under Performance options, there are three new options available. TCP/IP will move the VM memory over a
TCP/IP Connection, Compression can compress the VM memory before copying the VM to the new server
using TCP/IP connection and SMB copies the VM memory through a SMB connection, which can use Remote
Direct memory Access (RDMA) if both servers support it.
The wizard is launched with a simple right click on the VM. Shared Nothing Live Migration and Storage Migration
use the same wizard, which improves the user experience and reduce the number of windows and options on
Hyper-V. The first window, Choose Move Type, has the Shared Nothing Live Migration option (Move the
virtual Machine) and the Storage Migration option (Move the virtual machine’s storage). After selecting to
move the VM and specifying the destination server where the VM will be moved, you can select one of the three
move options to move VMs to a single location, select different locations per VM item or move only the VM. The
option to move only the VM works when you are storing the VM in a shared folder on the network or any other
type of shared storage.
When the migration starts, Hyper-V authenticates the connection on the destination host and starts the process
by migrating the VM disks. After moving all disk data, it migrates the virtual machine memory.
When finished, your VM will be up and running on the destination host and all the migration process happens
with no downtime.
Click Ok to close the computer properties window and repeat the same process on the destination server
computer account.
After that you can change the live migration authentication type to use Kerberos.
That’s all guys, hope this help in some way.
Leandro Carvalho
Set up:
Host: Windows 10 Enterprise
Guest: Windows 10 Professional
Hypervisor: Hyper-V
Aim:
Create a shared folder between Host and Guest via an internal network to
exchange files
The workaround is to do the following: