For my home infrastructure, I am continually trying to simplify. Recently I picked up another couple more Dell PowerEdge’s to host some VM’s because I hit the memory limit on the other servers. But now, between the loud sound and cost of running all those power supplies – this was not ideal. All I really wanted was one server, with gobs of memory, and I’d like to host all my VM’s there. Although there is some risk to hosting EVERYTHING on one physical device, I’m ok with that, because disk-wise, everything is backed up.
So, I picked up a new 1U server with 2 quad core CPU’s and 48GB of RAM on the cheap:
I got that up and running, but now I need to move all my virtual machines to this new server. I know from previous experience that you can’t just copy the machine definition and the hard drive. So, how DO you move Hyper-V machines to another host?
Export the VM from the old server:
The first thing you have to do is shut down the server in Hyper-V. Note by the way, that this can get a little complicated if you have an Active Directory domain. If you shutdown your domain controllers and then try to connect to a file share with no domain controllers up, you can get some authentication errors. So, I took down one domain controller – exported it, brought that server back up, then did the second server.
So, once you shutdown the system, right-click on it and choose “Export…” (note this menu item isn’t present if the machine is running):
Choose the path of where you want to export. In this case, I moved all my drives to the new server (tolvmhost01), so I set up a share there for all the exported VM’s (note, do not include the machine name in the path, it automatically creates it):
When you click Export, the screen goes away and back on the main Hyper-V display, you’ll see that it starts exporting the VM:
Note: this could take 5-20 minutes. Also, there is no notification when done – so you need to babysit it to see when it’s done. At this point, you will have a new directory in the export directory that has the machine definition and hard drive(s).
Import the VM into the new server:
At this point, you can import this machine into the new Hyper-V server. To do that, from the Hyper-V interface, click “Import Virtual Machine…”
and then you see:
then click Import, and the import starts:
Note this import can take 30-60 minutes or longer, depending on the size of the VM, presumably. When done, I’ve gotten a “warning” each time:
but that only turns out to be that the network card was changed.
Sure enough, when I go into the settings of the VM, no network card is assigned. I assign it, right-click and “Start” and voila, the server is up on the new Hyper-V host!