Link to home
Start Free TrialLog in
Avatar of sglee
sglee

asked on

Moving existing VMs in Hyper-V

Hi,
 
 I have a new server that runs Windows 2012R2 Hyper-V and there is an existing server that runs Windows 2012 Hyper-V with 4 VMs (SBS2011, two Windows 2008 Servers, Windows 7).
 I created two VMs - 1. SBS2011 and 2. single Windows 2012 Server (combined the role of two Windows 2008 Servers into one)  and was planning on exporting Win7 VM from old server and import into new server.
 As you can imagine in server migration, there are a ton of things to set up (workstation setup with respect to domain joining, outlook/exchange, network printers, ... etc)
 In the mist of doing all these, I started thinking "what if I export existing VMs and import into the new server",  the task would be very simple.
 My original thought was that since this is brand new server with different hardware, I thought it would be the best to create these VMs from the scratch for best performance experience (for the users).
 What is your opinion on "exporting and importing VMs" in my situation? Is this method safe? Would these imported VMs run as well right out of the gate on a new server (on a different hardware)?

 I have another question.
 When setting up a VM in Hyper-V, you enter HD size like 500GB. Once the VM is setup, how can I check the size of the hard drive on existing VM from EDIT SETTINGS window? I can't find it.
 The reason for this is that I like to know if the new server has enough hard drive space on the new server to import these VMs.

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sglee
sglee

ASKER

User generated imageAs seen on the screenshot, DC1 (which is SBS2011) has disk size of 204GB and I know for sure that I allocated much more than 204GB when I set it up a few years ago (probably 1TB or close to it). Also TS1 shows 115GB, but I think I allocated probably 200GB or more. The old server had 1.8TB of space (SATA) and I had more liberty with HD space.

But the new server has 1.1TB of space (SAS).

If I export these 4 VMs and import into the new server, my concern is that it may try to find the originally allocated space on the new server and if that is the case, the new server won't have enough space.
Now if each VM, when imported, only requires HD space as shown (204GB, 115GB, ... etc), then yes it will be ok.  Fyi the actual user data, as it accumulated over the years, is less than 70GB in total and it includes Exchange data. So data growth rate was not what I expected and will be very moderate in the future too.
When you export, you get essentially a copy of the VM and all files.  So what you see is what you can expect.

BE CAREFUL over committing hard drive space - if it ever fills it will pause the VM and prevent you from resuming it until you free space - but if the only think occupying space is the VM, this can be REALLY difficult!  I like to create a few large files which increases the likelihood of a problem but also acts as a warning AND gives you something to delete to regain space in the event of an issue, buying you time to expand the drive.  (I use FSUTIL to create dummy files of 50 GB each - 3 to 5 of them).

If you don't have experience with this, you NEED to get some - setup a test system and export that so you understand what to expect.
Also note: sometimes, dynamic drives grow beyond where you expect them - temporary file created by an app can grow the VHD and then more data gets written "far out" on the disk so that even when the temporary file is deleted, the drive is now MANY GB larger than what's actually stored!
Avatar of sglee

ASKER

I really don't understand ... "BE CAREFUL over committing hard drive space - if it ever fills it will pause the VM and prevent you from resuming it until you free space - but if the only think occupying space is the VM, this can be REALLY difficult!  I like to create a few large files which increases the likelihood of a problem but also acts as a warning AND gives you something to delete to regain space in the event of an issue, buying you time to expand the drive.  (I use FSUTIL to create dummy files of 50 GB each - 3 to 5 of them)."
Simple typo:
BE CAREFUL over committing hard drive space - if it ever fills it will pause the VM and prevent you from resuming it until you free space - but if the only thing occupying space is the VM, this can be REALLY difficult!

If you confused about anything else, please explain in detail what confuses.
Avatar of sglee

ASKER

I was not referring to typo. I simply did not understand what you were trying to explain with respect to importing VMs.
I wasn't referring to importing the VMs - I was warning "BE CAREFUL over committing hard drive space"

You're moving the server from more space to less... and your VHDs are Dynamic - which means they grow as needed.  This puts you at risk of the machines going offline due to hard drive utilization.

Dynamic VHDs do NOT shrink - they only expand... as needed.

Experiment - setup a VM and us FSUTIL to create temp files in the VM and watch the VHD Grow in size... then delete them - the VHD does NOT shrink.  Then as another experiment, create temp files that expand the VHD to fill all usable space on the physical disk - see what happens to the VM - and how you have to fix it.

Let me repeat though - EXPERIMENT - NOT WITH PRODUCTION SYSTEMS!

If you're managing VMs, you need to understand the issues you're going to potentially face if you don't do things right or provide the resources you really need.
Avatar of sglee

ASKER

Ah .. now I understand what you are trying to explain . Thanks.