jump to navigation

Migrate a virtualbox VM to a bigger virtual disk 2012-03-18

Posted by claudio in Uncategorized.
Tags: , , , ,
trackback

20180531: Adapted following @gojun077’s comment for newer Virtual Box releases.

From the CLI type:

VBoxManage modifyhd /path/to/<disk>.vdi --resize <size in megabytes>

e.g.:

VBoxManage modifyhd /home/me/VMs/Win7x86.vdi --resize 32000

In case you have snapshots you have to merge them first. The disk will be resized but the Operating System won’t see it yet. You need to expand it within the Guest OS.
In Windows you can go to “Computer Management – Storage – Disk Management” and extend your disk. On Linux, you need to boot from a live distribution and extend it with a tool like gparted.

Advertisements

Comments»

1. Christiaan Kras (@Htbaa) - 2012-03-18

There’s also a live cd with gparted on it, without having to boot into Ubuntu. This is a lot faster and works very well. http://gparted.sourceforge.net/livecd.php

2. Go Peter Jun (@gojun077) - 2012-03-20

Nowadays in Virtualbox 4.1.xx, you can use the CLI command ‘VBoxManage modifyhd’ to expand VM containers without copying the content from one and pasting it into a larger container. From the CLI if you enter:

VBoxManage modifyhd /path/to/VM/image XXX.vdi –resize 40000

It will resize your existing .vdi container to 40 GB. Beware, however, that the container expansion won’t work if you have any snapshots attached to the VM. Once you’ve expanded the .vdi, it will only show up in the Virtualbox manager; you’ve got to boot the VM into linux and use gparted (or a native WinXP partition mgr like EASEUS PM) to stretch the existing partition so it takes up all the extra space.

3. claudio - 2012-03-20

Good points (both of them). The methods are certainly faster. I wonder which of the three methods is the easiest for a casual user.

A plus point of the Ubuntu-cd method is that it exposes a potentially windows user to GNU/Linux…


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: