Moving Hyper-V machines to another physical host

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:

image

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):

image

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):

image

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:

image

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…”

image

and then you see:

image

then click Import, and the import starts:

image

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:

image

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!

Tagged with: ,
Posted in Infrastructure, Professional Development, Uncategorized
3 comments on “Moving Hyper-V machines to another physical host
  1. ap says:

    Curious since I haven’t done an export/import yet – during your process, you exported to a share on the target host, then pointed to that share to perform the import, but selected to copy and duplicate. Where do the files get copied and duplicated? Does it use directory defaults for this like SQL does? Was there a step where you specified the target for the copied server that we didn’t see? Thanks!

    Like

  2. Rob Seder says:

    @ap – I’m nearly certain there was an option, because I did import those to live on different drives, sorry I didn’t include the screenshot.

    Note too that if you click on “Hyper-V Settings…” in the “Actions” menu while in Hyper-V – it does default to that directory for machine files and virtual hard drives.

    I hope that helps!

    Like

  3. jean says:

    Good stuff!
    Thank you

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archives
Categories

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 2 other followers

%d bloggers like this: