Exporting Hyper-V VMs Over the Network

I received a comment via e-mail that it can take 2-3 times as long to move a VM from one Hyper-V host to another host, when compared to VMware or Virtual Server.  I do not think that the person mentioning this was super familiar with Hyper-V export, but their comment did make a good point about the portability of VMs between hosts.  Their goal was to efficiently migrate VMs from one host to another as part of an upgrade, and they were concerned about downtime.

You can copy a VHD from one host to another, but the configuration must be re-created.  It’s very hard to replicate a VMs configuration (MAC addresses for NICs, memory configuration, other virtual hardware attributes) simply by moving a VHD.  Hyper-V includes an export / import feature to encapsulate the configuration with associated VHDs for reuse.  Exporting a VM duplicates the (sometimes) large VHD files from the source VM to another location.

The e-mail comment made it clear that the person had not considered exporting a virtual machine over the network to a new host, rather than to local disk on the source.  They also didn’t know that SCVMM has a fantastic capability to move VMs from one host to another (similar to export and import), without the requirement of block level shared storage.  I’m not going to talk about SCVMM here, since it’s really easy (point and click) to relocate a VM using SCVMM (check it out!).

I am going to detail how to export a Hyper-V VM over the network, since I don’t see it covered anywhere else (I Binged hard, I swear!).

In order to export a VM to a network share (on the ultimate Hyper-V target host) a network share must be created with the appropriate rights granted to the exporting Hyper-V host. 
This may not be entirely intuitive, since you as the administrator are actually kicking off the export.  To put it simply Hyper-V is doing the export, so it needs rights to the remote share, not you! 

I just did this in my lab using two systems Hypernode1 (new host) and Hypernode2 (old host from which I want to export).  Here are the steps I followed (FYI, I blanked out the domain name in all the screen shots):

  1. Create share on Hypernode1 – I shared out C:\VMs – creating the \\Hypernode1\VMs share

  2. I granted rights on the share to the Hypernode2 system.  This can be a little tricky, since the “Select Users, Computers, Service Accounts, or Groups” dialog does default to searching for computers. 
    You have to remember to search for “Computer” objects rather than the typical Users or Groups.  You have to change the Object Types to easily find a system (shown below):


  3. Once the “Object Types” are squared away, you can enter your host name, and grant it rights to the share: 


  4. You will want to grant sufficient share permissions to the host as well – not just READ:


  5. You will also need to ensure that the exporting host has sufficient NTFS permissions – changing the “Select” is again something to do.  The permissions I used are as follows:


Once I granted the exporting host rights to the share and the folder (NTFS), I was able to export my VM over the network in one step from Hypernode2, and then import the VM on Hypernode1:


Let me know if you have any questions or comment!