Expanding a Virtualbox drive/disk with VBoxManage

# How do you expand a Virtualbox drive?

<img alt="Stack Overflow logo" border="0" class="zemanta-img-inserted zemanta-img-configured" height="84" src="http://upload.wikimedia.org/wikipedia/en/9/95/Stack_Overflow_website_logo.png" style="border: none; font-size: 0.8em;" width="257" />

As usual, [there's an article on stackoverflow][sof] that has the answer. Here's a somewhat abbreviated (you don't have to search through the answers) and somewhat expanded (gives procedures for other drive types) recipe.

First, remember a disk is not a drive. Once you resize the disk you're going to have to re-partition t
he drive. You can use your OS's partitioning tool or use something like a LiveCD to do it. Got it? Good.

If you've got a ```vdi``` drive it's easy:

    VBoxManage modifyhd "yourundersized.vdi" --resize 51200

Then repartition.

If you don't want to screw with your vdi file, you can try cloning it first:

    VBoxManage clonehd "yourundersized.vdi" "cloned.vdi" --format vdi
    VBoxManage modifyhd "cloned.vdi" --resize 51200

If you're using some other format, like vmdk (VMWare's format) then you have to do a roundtrip conversion:

    VBoxManage clonehd "yourundersized.vmdk" "cloned.vdi" --format vdi
    VBoxManage modifyhd "cloned.vdi" --resize 51200
    VBoxManage clonehd "cloned.vdi" "resized.vmdk" --format vmdk


[sof]: http://stackoverflow.com/questions/11659005/how-to-resize-a-virtualbox-vmdk-file "Stack Overflow Rules"

Enhanced by Zemanta

Comments

Popular Posts