How to properly move a VM to another physical server

Hi folks,

I have two Dell R-170 servers both running Server 2008 R2 and Hyper -V, each with two VM's installed and running.  One of the physical servers is beginning to run low on disk space.  I would like to move one of my VM's (about a 200Gb .vhd) from one server to another, so I will havce 3 VM's on one server and only one on the other at least temporarily.  Likely I will move a smaller one from the one machine to the other later on to balance them out.

Anyway, the VM I want to move is a SBS 2008 server, which is running Exchange and is the DC for the domain.  Any special considerations based upon that information?

I want to make sure I do the right steps to properly move that VM from one physical server to the other and have it come back online smoothly.  Can someone point me to the proper steps to take?  Here is what I think they are, but I'm not 100% sure.

Shutdown the VM on the current physical server.

Copy the VM's .vhd file to either an external drive or network copy to the new physical server.

Create the VM in Hyper-V on the new server, get the network configured  (Can you copy the settings from the old host?)

Boot the VM on the new server and it should work now?

Tell the VM on the old server to not restart except manually, then after verifying all is working well on the new host, delete the VM and the .vhd file to recapture disk space.

Can someone point me in the right direction to do this properly.  Since it's my DC and my Exchange server I really want to do this right the first time.

Thanks!

April 21st, 2013 7:26pm

Hi,

you are quite near. Hyper-V has a Feature buildin to Export the VM with its configuration. So the right steps would be:

1. Shutdown the VM on the current physical Server

2. Export the VM to an external drive

3. Copy to the new physical Server

4. Import the VM in Hyper-V on the new Server

5. Boot the VM on the new Server

6. After testing the VM on the new Server delete the VM on the old Server

Free Windows Admin Tool Kit Click here and download it now
April 21st, 2013 7:59pm

IMPORTANT - Do you have any other DC's?

Regards

J

April 21st, 2013 8:09pm

No, that is part of why I am asking?  Is it bad if I have no other DC's in place first?

Thanks!


Free Windows Admin Tool Kit Click here and download it now
April 21st, 2013 10:31pm

Hello,

Since this is a DC, there are some considerations that you have to take into effect. The best way to move the VM is using live migration.

http://www.microsoft.com/en-us/download/details.aspx?id=12601

April 21st, 2013 10:41pm

Hi,

Is this a production environment or a lab environment?

If this is a production environment, install and deploy a new virtual machine in the second Hyper-V host server and then promote it as domain controller, then transfer all DC roles from the first DC and demote it.

And for a production environment, we always recommend you have at least one additional DC run as backup domain controller.

If this is lab environment, you can try Carstens solution.

Windows Server 2012 has new feature which we can import VM without export it, but in Windows Server 2008 and Windows Server 2008R2 we still need to export VM first, then we can import it in other host server.

As you mentioned, you can just copy the VHD and mount it in a new VM, but I think Carstens steps is better.

Thanks Miguel provide us the useful article Virtual Domain Controller Considerations, which it mentioned Do not clone, export, copy or use a VHD file to seed a new virtual domain controller. This will create problems in USN and possibly lead to a damaged AD database. This is correct, but you are moving a DC not create a new one, so its not suitable for your scenario.

Also, as Miguel mentioned, use live migration is also recommend option, but in Windows Server 2008 R2, live migration is only available in Hyper-V cluster.

For more information please refer to following MS articles:

Hyper-V - Export & Import
http://blogs.msdn.com/b/virtual_pc_guy/archive/2008/08/26/hyper-v-export-import-part-1.aspx

Hyper-V R2 Import/Export Part 1 The Case for New Import/Export Functionality
http://blogs.technet.com/b/virtualization/archive/2009/05/20/hyper-v-r2-import-export-part-1-the-case-for-new-import-export-functionality.aspx

Hope this helps!

TechNet Subscriber Support

If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.

 

 

Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2013 6:07am

Lawrence and all,

Thanks for the reply.  This is a production environment, and since the server I want to move is a SBS 2008 box, which makes it my main DC and my Exchange Server, I want to be particularly careful to do this properly.  I do suppose if it seemed easier, I could move the other VM and leave the SBS VM alone if moving a DC causing major concerns.  The other VM is a Windows 2008 Server, but not a DC, mainly a file server, and would ultimately accomplish the same goal of allowing me to move a machine to free up space.

Actually I don't know what I'm thinking, but I do have a 2nd DC on the network, it's on separate hardware, but I do have the SBS 2008 box and a separate Server 2008 acting as a DC.

thanks!

April 22nd, 2013 12:24pm

Folks,

Let me describe my scenario a bit better, as I haven't done a great job with it.

So, I have two Dell R710's both with 6 300Gb drives in a raid 10 configuration (recommended by Dell)  That gives me 836Gb of usable space.  Both servers are running Server 2008 R2 Standard with SP1.  Both are running Hyper -V Manger 6.1.7601.17514.  I have two more drive slots in the machine, but Dell is now telling me that adding more drives really won't help, so I have to do something else to clear up some space issues on server 1.

On Server 1 I have two VM (SBS 2008 and Server 2008 R2 Standard) and the C drive shows 55.3Gb of free space out of 836Gb.  If I go to /users/public/public documents/hyper -v/virtual hard disks, I see my two VM's listed, one at 308Gb (SBS 2008) and one at 436Gb (Server 2008 R2 Standard).

On Server 2 I have two VM's (Server 2008 R2 Standard and one for future Terminal Server Replacement that isn't turned on at persent - Server 2008 Standard) and I have 546Gb of free space out of 836Gb.  If I go to /users/public/public documents/hyper -v/virtual hard disks I see my two VM's listed, one 214Gb (Server 2008 R2 Standard, and 20Gb (the future TS replacement).

As I mentioned in my previous post, I do have a 2nd DC on separate hardware, but it does make me nervous about moving my main DC.  Should I just try to move the other server? That should still give me about 100Gb of free space on the server I move it to, and that VM still has some space built in for it to grow, so hopefully that might alleviate my concerns for a while.  What do you think is my best move?

Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2013 2:13pm

Hello,

If your Dell has dual channel RAID, you should be able to add a mirror with 2 drives in the two drive slots and move the VHD to there. You should not have any problem moving the DC as long as you don't export the file then wait 2 weeks before importing it. If nervous about USN problems, just turn off both DC's, then export and import the SBS from one server to another and fire 'em up again.

April 22nd, 2013 2:28pm

Ive just done an sbs2011 with 2nd dc, RDS server and a few other from xenserver to hyper-v migration. I used disk2vhd physical to virtual conversion in the end and cloned the DC's. You could use this tool to clone your 2nd DC first THEN clone/migrate the SBS LAST. Then leave your live domain alone running...

Import them both onto a laptop or whatever and keep them isolated from the network (I used client hyper-v on windows 8). Then check for problems, make sure they replicate, check certificate services, exchange and sharepoint functionality (if you use it) etc. Its probably a good idea to leave them running for a few days and keep an eye on the logs, In case the sbs2008 migrate/clone doesn't work you could mess up that other physical DC so its best if you try it first.

If it all goes smooth and you're confident then switch the live DC's off and then import the DC's back onto the required server(s). At this point since your 2nd DC is virtualized you might as well leave it that way and install hyper-v on that separate hardware, and import it back there. If it doesn't work your live servers are untouched.

I found that sharepoint needed restoring from a backup once cloned, and because the cloned exchange wasn't receiving mail for a few days I restored that from a backup too. You will probably need to re-activate since hardware has been changed on disk2vhd DC. The SBS if exported/imported shouldn't need activating if the correct import option is picked http://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/68aa2cbc-3386-44f5-aa87-b53c395d4b6c/

I know all this isn't supported but done correctly just works.

Regards

J


Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2013 3:56pm

Hi,

RAID 10 is the best option for Operating System and Hyper-V data. But I have one question, does the Hyper-V host server only have one partition?

As best practice, its better to separate OS and user data into different physical disk, at least into different partition. As Miguel mentioned, if the RAID controller support dual channel, its better to create a 2 disk2 raid1 for OS and then 4 disks RAID 10 for user data.

And according to your description, the SBS 2008 guest VM is Domain Controller, and its size is 308 GB. It is too large than our normal DC, so what data in the DC. It is not recommended to install any other applications or services which are not related to directory service in a domain controller.

Also a question, does the guest VM use dynamic VHD? Dynamic virtual hard disks are not recommended for virtual machines that run server workloads in a production environment.

Back to your questions, I agree with Miguel, if possible add two drivers in current Hyper-V host and move VHD to there. Since after move one VM to second Hyper-V host server, the host will meet same low disk space problem soon.

If you persist want to move a VM, I think our above process is okay, shutdown the virtual domain controller and then export and import. But note that, view the current operations mater role of the DC to evaluate the possible effect of shutdown action; make sure the DC is not the only Global Catalog server.

I think you can refer to this article to prepare the guest DC move work:

Preparing an Existing Domain Controller for Shipping and Long-Term Disconnection
http://technet.microsoft.com/en-us/library/cc816924(v=WS.10).aspx

For more information please refer to following MS articles:

Decommissioning a Domain Controller
http://technet.microsoft.com/en-us/library/cc755937(v=ws.10).aspx
6 Best Practices for Physical Servers Hosting Hyper-V Roles
http://technet.microsoft.com/en-us/magazine/dd744830.aspx

Hope this helps!

TechNet Subscriber Support

If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.

April 23rd, 2013 7:18am

Lawrence,

Yes, the entire box is one raid 10, that was the configuration that Dell recommended to me, so that is what we did.

The SBS 2008 VM has a .vhd file size of 308Mb.  That is two partitions, a C drive for the OS which is 100Mb, and a Data partition which is 200Mb, used for the Exchange server data.  Other than items related to the SBS box, there is nothing additional installed on that machine.

No, we are not using dynamic VHD.

I'm going to call Dell back and discuss my options.  My original goal was to just add more disk space, but they implied I could not do that and add space to any VM's from it.  That would prevent me from needing to move anything.

Thanks for all the advice everyone!

Free Windows Admin Tool Kit Click here and download it now
April 23rd, 2013 12:05pm

Hi,

As this thread has been quiet for a while, we assume that the issue has been resolved. At this time, we will mark it as 'Answered' as the previous steps should be helpful for many similar scenarios.

If the issue still persists and you want to return to this question, please reply this post directly so we will be notified to follow it up. You can also choose to unmark the answer as you wish.

In addition, we'd love to hear your feedback about the solution. By sharing your experience you can help other community members facing similar problems.

Thanks!

May 2nd, 2013 2:16am

don't you have to allocate Ethernet ports on the new VM host?

Free Windows Admin Tool Kit Click here and download it now
March 23rd, 2014 6:23pm

Thank you very much.
February 5th, 2015 5:20pm

Would there be any implications, if the export and VHD are not from the same date? Say, I make an export and keep it on external drive. Every night I make backups of the VHD. 6 months from now, the server dies. I spin up another machine with Hyper-V and import the 6-month-old VM with last night's VHD. Will that work?
Free Windows Admin Tool Kit Click here and download it now
May 21st, 2015 9:14pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics