Sunday, April 10, 2011

Moving/Copying Virtual hard disk for Virtualbox

As described on this post I installed Windows XP on Virtualbox on Ubuntu 10.04. For creating virtual hard drive I used the default settings of Virtualbox which created it in hidden .virtualbox/harddisks folder on home.

Since I did not think about running Windows inside Ubuntu the /home was not very large. After a few months Ubuntu started complaining about low disk space and when I examined it the largest space was occupied by the virtual hard drive.

I copied the Windows.vdi file on another partition and tried to attach it but Virtualbox complained of same uuid already registered and refused to attach the copy.

Then I opened the terminal and typed following command after changing directory to that partition.
VBoxManage internalcommands sethduuid Windows.vdi

The uuid was changed and I could attach and use the copy of .vdi file.

After testing that everything was fine I deleted the original .vdi file.

Now I have enough space on home and Windows XP running in Virtualbox as before.

Post a Comment