Resizing a Fixed Virtual Machine VHD (VirtualBox)

Resizing a Fixed disk

Resizing can only be done on dynamically allocated disks. So one must first convert the disk to dynamic then resize.

In reality there is no way to change between Fixed-size and dynamic disks. However one may clone the existing Virtual Machine form one format to the other. This works with VHD (Virtual Hard Disk) format

The tool one needs for the said conversion and resizing is VBoxManage.exe and this can be found in:

C:\Program Files\Oracle\VirtualBox

Dynamic to fixed Cloning

VBoxManage clonehd [Current_VHD] [New-VHD] –variant Fixed

 

Fixed to Dynamic Cloning

VBoxManage clonehd [Current_VHD] [New-VHD] –variant Standard

 

Resizing

VBoxManage modifyhd [New-VHD] –resize [megabytes]

 

Note that resizing only works with increasing the size

1

Open a Command Prompt near the VHD (using Shift + Right Click)

2

C:\Program Files\Oracle\VirtualBox\VBoxManage clonehd Win7.vhd Win7D.vhd –variant Standard

3

And wait for it to finish.

4

“C:\Program Files\Oracle\VirtualBox\VboxManage” modifyhd Win7D.vhd –resize 40000

5

 

Importing the new Virtual Machine

6

7

8

9

Locate the new VM and Create and Power it up

10

The VM will still show the old size

11 12 13 14 15 16 17 18

That’s everything that is required

 

Please like & share:

Leave a Reply