Link to home
Start Free TrialLog in
Avatar of April33
April33

asked on

Expanding a Partition on OS drive within VM

We are running a server with a couple Hyper-V VMs.  When I created one of the VM I allocated too small of a space to the OS partition thinking I can Expand it later........  Seems I was wrong!  Extend Partition is not an option for the C: Partition.

I tried moving the Page File to the D: Partition and still could not Extend C:.

I downloaded EaseUS Partition Master and tried using it without success.  

The VM Drive is a MBR type running 2012 Server R2 and when I created the VM I did a Gen1, IDE Drive, if that info helps.

I attached a screen shot for Disk Management.

Thanks for you help!
Avatar of CompProbSolv
CompProbSolv
Flag of United States of America image

The common advice is to not partition a VM VHD drive.  Can you create another VHD for the data partition (I'm assuming you have an OS and a Data partition), copy the data there, delete the data partition on the existing VM, and then expand C: into that space?
Avatar of April33
April33

ASKER

CompProbSolv, thanks for the fast response!
You are right on the layout C: OS  and D: Data+programs

I have a couple gotcha's:

1. I installed some programs like SQL 2014 with 3 DB's on the D: partitions since the space was too small on the C:

2. I am running 2012 Server R2 Std which gives a license for 2 VM's and that's what I am currently running.  I don't want to give more money to Microsoft.
I'm not talking about adding VMs, just VHDs.  Those don't require extra licenses.  Have one for the OS and one for Data.
You should be able to do a backup of the Data drive and restore it to the new VHD.
Hi April,

You can use: http://gparted.org/ to expand the VM disk after the Hyper-V disk is extended.
Avatar of April33

ASKER

ohhhh, I understand what you are saying.  I will think on this and maybe try it tonight.
Avatar of April33

ASKER

ITSystemEngineer,

Have you used gparted within a VM to expand the OS drive successfully before?

Are there an caveat's I should be made aware?
April,
Yes I have.

As long as you have extend the Hyper-V disk before and then you can can mount the .ISO  (bootable) and then boot into it.

Note, this is was during the Windows server 2003 VM era where on the fly extend is not possible.
Another solution is to use: http://www.dell.com/support/home/us/en/04/Drivers/DriversDetails?driverid=R64398
This is no different from the built-in Windows Disk Management functionality ... you still have to have Unpartitioned Space directly to the right of the partition you wish to extend. This utility was designed for 2003, which did not have Extend functionality built in.
ASKER CERTIFIED SOLUTION
Avatar of Philip Elder
Philip Elder
Flag of Canada 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 April33

ASKER

You guys gave me a lot of suggestions.  I'm not sure which one would work best for my situation?

I will be away for a week and a half, so I think I will limp along until I return and then over the weekend try one of the proposed solutions.

I just started implementing Veeam backups last night.  I also want to test these out before moving forward incase thing go sideways.

Thanks guys!
SOLUTION
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 April33

ASKER

Thanks for your input CompProbSolv.
Veeam is good stuff. You can rest assured that your VMs are backed up.

Depending on edition the host would need to be set up and Veeam installed in order to restore the VMs. It just works.
Avatar of April33

ASKER

I am new to Veeam so I am still learning their software.  I am making the switch from StorageCraft.  Veeam software seems to be really good.
We do both. For smaller deployments we run with ShadowProtect. For larger deployments and cluster settings we run with Veeam since it is host based.
Avatar of April33

ASKER

So I ended up creating another Vhdx as you suggested and attached as IDE drive within the VM.  I used a RoboCopy script to copy the data from one partition to the other.

I had to disable the PageFile (reboot), which was located on the D: drive and disable SQL and Other Services that were running on the D: drive.  Then I was able the flip flop the drive letters of the old D and new Z drives.

Rebooted the VM and tested SQL and other Apps that are now running on their own Vhdx.
Once they checked out good, I deleted the old partition and then was able to Expand the C: drive to 140GB!

I believe this is mission accomplished.

Thanks for everyone's input and help!
Avatar of April33

ASKER

Thanks!
Avatar of April33

ASKER

Thanks, I thought was closed a long time ago.  Sorry for the delay