Hyper-V Disk Resize

One of the cool features with Hyper-V 3 and Windows Server 2012 R2 is the ability to resize virtual hard disks without the need to shutdown the virtual machine, use diskpart and WinPE etc...

You just have to open up Hyper-V Manager and use the edit wizard on the hard disk that needs more space.

The more "cool" way to do this is to use powershell of course! You can use the following command on the parent partition (this is the Hyper-V host) to extend the hard disk:

Get-VM "WindowsServer2012" | Get-VMHardDiskDrive -ControllerType SCSI | Resize-VHD -SizeBytes 100GB


There are some limitations though... You won't be able to use the edit hard disk wizard when the virtual machine has snapshots. This is also supported only on VHDX virtual disks connected to SCSI adapters.

I can't say I haven't resized the virtual hard disk of a snapshot with the above command but you should not do this because you will break the chain. You shouldn't have snapshots anyway!

Great article on MSDN by Ben Armstrong: http://blogs.msdn.com/b/virtual_pc_guy/archive/2014/01/28/online-vhdx-resize-in-windows-server-2012-r2-windows-8-1.aspx

Popular posts from this blog

Domain Controller Machine Password Reset

Configuring a Certificate on Exchange Receive Connector

Running Multiple NGINX Ingress Controllers in AKS