Freigeben über


Online VHDX Resize with SCVMM 2012 R2

Yesterday I discussed how to expand the size of a virtual hard disk on a running virtual machine.  You can also do this with System Center Virtual Machine Manager 2012 R2.  To do this you need to:

  1. Open Properties on the virtual machine in question
  2. Go to Hardware Configuration
  3. Locate the disk you want to resize
  4. Select Expand virtual hard disk (GB): and enter the new size that you want
  5. Click OK

image

You can also use SCVMM PowerShell to do the same thing:

Get-SCVirtualMachine "Windows Server - Resize" | Get-SCVirtualDiskDrive | ?{$_.VirtualHardDisk -like "Windows Server - Resize_disk_1"} | Expand-SCVirtualDiskDrive -VirtualHardDiskSizeGB 140

Note, just like I discussed yesterday:

  • You can only do this for .VHDX files attached to SCSI controllers
  • After doing this you will need to login to the guest operating system and do something to take advantage of the new space

Cheers,
Ben

Comments

  • Anonymous
    January 29, 2014
    Hi Ben, why only expand and not shrink available in the VMM ?  It would be beneficial to show on a gen2 VM where you can do this on a system drive also :-) vniklas.djungeln.se/.../my-experience-on-the-newly-released-vmm-2012-r2-rtm regards Niklas

  • Anonymous
    February 06, 2014
    After expanding with SCVMM don't forget to extend the disk with the Disk Management MMC in Windows :-)

  • Anonymous
    February 10, 2015
    Hi Ben, I am using SCVMM R2, but Hyper-V is still on 2012 and unable to expand online. It is fair to assume that we must upgrade Hyper-V to 2012 R2 before this will work? Please advise. Thanks, Ron

  • Anonymous
    February 10, 2015
    Ron - Correct, you need to have Hyper-V 2012 R2 in order to do this. Cheers, Ben

  • Anonymous
    March 02, 2015
    Is it possible to shrink a virtual hard drive (.vhdx) using VMM 2012 and Windows Server 2012 (both are not R2) with the VM not running?