About This Site

I'm a Tech Guy for over 30 Years Knowledge of Computers, Networks, PC Gadgets. This site is to be used to share some of my knowledge and reviews

Copy Hyper-V Drive

I have a client that is using Server 2016 Standard and is using Hyper-V. The Hyper-V client is a Windows 2008 R2 server running RDP. The Hyper-V was slow for the remote people so I decided to copy the Hyper-V drive to a set of SSD drives to make things faster. Googling I see there is an option to move the drive but for me being paranoid I wanted to copy the drive. Then create a new Hyper-V with the same specs and then after creating the new Hyper-V attach the copied drive on the SSDs. I have tried this in the past and there is one step you need to do for this to work. There is a permissions issue with the drive. MS has setup a hidden permissions for each Hyper-V drive configuration that you create and you have to give permissions on the drive. When you create a new Hyper-V and have it create a new drive during the configuration then its fine. Its when you want to attach an existing drive to the Hyper-V that you need to give permissions.

So these are the 2 sites I found online that helped me do this. The first one has made a mistake so the second link help me figure out the issue and corrected it:

Link 1

Link 2

So these are the steps I used to make it work:

  1. Shutdown the existing Hyper-V
  2. Copy the .vhdx drive to the new location
  3. Create a new Hyper-V setup with the same specs as the original BUT select attach drive later
  4. On a Powershell command (Make sure you run as administrator or it won’t work) type the following:
  5. Get-VM ‘New Virtual Machine’ | Select-Object VMID      (Where New Virtual Machine is the name of the new Hyper-V that you created)
  6. It will display a long SID. You need to copy this SID (Easily in Powershell is highlight the SID and then click on the top bar and select Edit and then copy.
  7. Now this is where link 1 makes a mistake. For me I started a Command Prompt with administrator and went to the folder where the new copy of the .vhdx was. For example the .vhdx file is called server.vhdx. I then typed this command:
  8. icacls “c:\drive\server.vhdx” /grant “NT VIRTUAL MACHINE\{SID}”:(F) where {SID} is the pasted SID. Don’t include {}
  9. Now go into the new Hyper-V settings and attach the .vhdx. It should then start (first time takes a bit).
  10. Once it is loaded I then went in and changed the network IP to what it was on the original. Check Windows activation. It should be OK. If you have MS Office you might need to reactivate it but should not give you problems. For me I also had to duplicate the MAC address of the network card. Each time you create a new Hyper-V it creates a new MAC address (So they don’t conflict if you were running both Hyper-Vs at once). For me I shutdown the new Hyper-V. Go into the settings and expand the network adapter and select the Advanced features and then change the MAC address as the same as the original. For me the client has special TSPrint and TSScan software that check the drive and network device for activation. Changing the MAC address is easier then deactivating and reactivating the software.

I have done this twice on the same server and it has worked for me each time. If you make a backup copy of the .vhdx drive and have to restore likely you will need to run these same steps to get it working.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>