HOWTO: Clone a VirtualBox 1.5.0 Virtual Disk

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
burggraf2
Posts: 23
Joined: Sat 18 Aug 2007, 21:39

HOWTO: Clone a VirtualBox 1.5.0 Virtual Disk

#1 Post by burggraf2 »

Here's what I want to do:

1. Create a basic installation of XP under VirtualBox.
2. Apply all patches and updates, plus apply basic apps like antivirus
3. Copy that installation to another disk file so I can have 2 different VM's, say, one for development and another for testing

Easy right? VBoxManage clonevdi is designed to do this. Only it doesn't work -- it's a well-documented bug.

Here's the easy fix:

cp disk1.vdi disk2.vdi
VBoxManage internalcommands setvdiuuid disk2.vdi

You could have figured out the first command -- just copy the disk file, right? But when you try to register the 2nd disk with VirtualBox, will complain that a disk with the same UUID is already registered. The second undocumented command will assign a new UUID to the disk file, and voila! You have a new copy of your disk!

Post Reply