CLONING A VIRTUAL MACHINE IN "ORACLE VM VIRTUALBOX"

CLONING A VIRTUAL MACHINE
IN "ORACLE VM VIRTUALBOX"
IN A MAC "OS X" HOST COMPUTER
HIGH-LEVEL EXECUTIVE SUMMARY:
When you run "Oracle VM VirtualBox" in a Mac "OS X" host computer:
You cannot copy a virtual machine by using the Finder or the cp command in a
"Terminal" window.
You cannot copy a virtual hard drive directly by using the Finder or the cp
command in a "Terminal" window..
In order to clone a virtual hard drive or a virtual machine, you have to use either
the "Clone" function in "Oracle VM VirtualBox Manager" or a command line utility
called "vboxmanage".
TECHNICAL DETAILS
If you use the Finder or the cp command in a Terminal window to copy a virtual
machine or a .vdi virtual hard drive, the "Oracle VM VirtualBox" program will
usually refuse to let you use the newly-created virtual machine or newly-created
virtual hard drive:
TWO METHODS TO CLONE A VIRTUAL MACHINE
There are two ways for methods for cloning a virtual machine. Let's call them
"Method 1" and "Method 2".
"Method 1" is a lot easier than "Method 2". We will show you the steps for these
two methods soon.
When you follow either "Method 1" or "Method 2" to clone a virtual machine, the
new virtual machine that you create will have a new, unique "UUID.BIOS" (=
"machine entry UUID" = "computer UUID"="motherboarbib xxx9).
"Method 1" creates a cloned virtual machine with a virtual hard drive that has the
same "harddrive UUID" as the virtual hard drive of the original virtual machine.
"Method 2" creates a cloned virtual machine with a virtual hard drive that has a
"harddrive UUID" that is different from the virtual hard drive of the original virtual
machine.
If you need to look at them, in "Oracle VM VirtualBox", all "machine entry UUID"s
(for all of the virtual machines) are listed in the VirtualBox.xml file in the
.VirtualBox folder in your Windows profile folder.
METHOD 1:
USING THE "CLONE" FUNCTION IN "ORACLE VM
VIRTUALBOX MANAGER":
To start the "Clone" function of the "Oracle VM VirtualBox Manager", you can
either use the right mouse button to click on a virtual machine or click on
"Machine" from the top menu bar:
When you use the right mouse button to click on any virtual machine, the pop-up
context menu has a "Clone.." selection it it:
*
When you click on a virtual machine to highlight it and then click on "Machine" in
the top menu bar, the pull-down menu has a "Clone.." selection in it:
"Method 1" works on version 4.1 of "Oracle VM VirtualBox".
"Method 1" does not work for any version of "Oracle VM VirtualBox" prior to
version 4.1.
When you follow either "Method 1" to clone a virtual machine, the new virtual
machine that you create will have a new, unique "UUID.BIOS" (= "machine entry
UUID" = "computer UUID"). However the new virtual hard drive of the newlcreated virtual machine will have a the same "harddrive UUID" as the original
virtual hard drive of the original, source virtual hard drive. Since both the original
and the cloned virtual hard drives have the same "harddrive UUID", you will not
be able to use these virtual drives in the same virtual machine at a future date.
When the original virtual machine and the cloned virtual machine have virtual
hard drives that have the same "harddrive UUID", this may cause problems in
situations when a duplicate "hard drive UUID" can cause trouble. See
http://k68.system74.net/index.php/article/printer/clone-hard-disk-in-virtualbox
In "Oracle VM VirtualBox", all "machine entry UUID"s (="BIOS UUID" = "System
UUID") (for all of the virtual machines) are listed in the VirtualBox.xml file in the
.VirtualBox folder in your Windows profile folder.
For a good, concise description of "Method 1", see
http://linux.putalin.com/2011/08/how-to-clone-a-virtual-machine-on-virtualbox/
"FULL CLONE" VERSUS "LINKED CLONE"
When using "Method 1", you can create either a "full clone" or a "linked clone".
A "full clone" is totally independent of the original virtual machine that you use to
create the cloned virtual machine. A "linked clone" will depend on the original
virtual machine that you used to create the cloned virtual machine so that
changes to configuration settings in the original virtual machine, the change
"cascades" to the cloned virtual machine.
See
http://www.theregister.co.uk/2011/07/19/oracle_virtualbox_4_1/
METHOD 2:
USING THE VBOXMANAGE COMMAND FROM A
WINDOWS "COMMAND PROMPT" TO CLONE A
VIRTUAL MACHINE IN "ORACLE VM VIRTUALBOX":
"Method 2" works in versions 3.x, 4.0, and 4.1 of "Oracle VM VirtualBox".
When you follow this procedure to clone a virtual machine, the new virtual
machine that you create will have a new, unique "UUID.BIOS" (= "machine entry
UUID" = "computer UUID" and the virtual hard drive of the new virtual machine
will have a new, unique "harddrive UUID".
Therefore, "Method 2" creates a cleaner, more unique virtual machine than the
easier "Method 1": When you use "Method 2" to clone a virtual machine, you can
use the original machine's hard drive file and the cloned machine's new hard
drive file in the same virtual machine at a future point in time.
In "Oracle VM VirtualBox", all "machine entry UUID"s (for all of the virtual
machines) are listed in the VirtualBox.xml file in the .VirtualBox folder in your
Windows profile folder.
SOME GREAT ADVICE FROM OTHERS ABOUT USING
"METHOD 2":
See
http://srackham.wordpress.com/cloning-and-copying-virtualbox-virtual-machines/
and
http://www.sysprobs.com/clone-virtual-machine-sun-virtualbox-simple-steps
and
http://geekozoid.blogspot.com/2009/05/how-to-duplicate-clone-virtualmachine.html
and
http://www.modhul.com/2009/06/17/how-to-clone-or-copy-a-virtualbox-virtualdisk/
and
http://lukehayler.com/2011/01/cloning-virtualbox-virtual-disk-images-vdi-files/
and
http://www.keithohudson.com/?p=385
and
http://www.my-guides.net/en/guides/general-software/155-how-to-copy-andtransfer-or-backup-a-virtualbox-virtual-machine-vdi
and
http://www.oracledistilled.com/virtualbox/cloning-a-virtualbox-vm/
and
http://joshuahoover.com/2010/04/01/cloning-virtualbox-images/
and
http://umairj.com/191/cloning-a-virtual-machine-in-virtualbox/
METHOD 2--STEP-BY-STEP:
Step 1:
To clone a hard drive file in "Oracle VM VirtualBox", you have to run the
"vboxmanage" command from a "terminal" window:
A better view of the process follows:
Last login: Sat Apr 2 10:14:49 on ttys000
lizorbans-Mac-mini:~ testuser$ pwd
/Users/testuser
lizorbans-Mac-mini:~ testuser$ ls
Desktop
Documents
Downloads
Library
Movies
Music
Pictures
Public
Shared Folder using Shared Folders Gateway
Sites
VirtualBox VMs
lizorbans-Mac-mini:~ testuser$ cd "VirtualBox VMs"
lizorbans-Mac-mini:VirtualBox VMs testuser$ ls
OSX 10.6 vm-01
Windows 7 Enterprise Trial 64-bit VM02
Windows 7 Enterprise Trial 64-bit Windows 7 Enterprise Trial vm01
lizorbans-Mac-mini:VirtualBox VMs testuser$ cd "Windows 7 Enterprise Trial 64-bit"
lizorbans-Mac-mini:Windows 7 Enterprise Trial 64-bit testuser$ ls
Logs
Windows 7 Enterprise Trial 64-bit VM-1.vdi
Windows 7 Enterprise Trial 64-bit.vbox
Windows 7 Enterprise Trial 64-bit.vbox-prev
lizorbans-Mac-mini:Windows 7 Enterprise Trial 64-bit testuser$ vboxmanage clonehd "Windows 7
Enterprise Trial 64-bit VM-1.vdi" "Windows 7 Enterprise Trial 64-bit VM02.vdi"
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VDI'. UUID: 92bd59ff-0337-437d-8a4e-ea7583edb538
lizorbans-Mac-mini:Windows 7 Enterprise Trial 64-bit testuser$ exit
logout
[Process completed]
Step 2:
Start the "Oracle VM VirtualBox" program.
The "Oracle VM VirtualBox Manager" window will be displayed:
Step 3:
Click on "Machine" in the Menu bar:
Step 4:
Click on "New" in the pull-down menu.
Step 5:
A "New Virtual Machine Wizard" box will be displayed.
Click on its "Continue" button:
Step 6:
A "VM Name and OS Type" form will be displayed:
Step 7:
Type in an descriptive name for the new virtual machine:
Step 8:
Select the operating system for the new virtual machine.
Step 9:
Select the version for the operating system for the new virtual machine.
Step 10:
Click on the "Continue" button:
Step 11:
A "Memory" form will be displayed:
Step 12:
Adjust the amount of RAM to allocate to the new virtual machine.
Click on the "Continue" button:
Step 13:
A "Virtual Hard Disk" form will be displayed:
Step 14:
Select the "Use existing hard disk" option:
Step 15:
Click on the "Folder icon" to the right of the hard drive name:
Step 16:
A "Chose a virtual hard disk file" box will be displayed:
Step 17:
Navigate to the virtual hard drive file that you created in an earlier step and click
on this virtual hard drive file to highlight it:
Step 18:
Click on the "Open" button.
Step 19:
Click on the "Continue" button of the virtual hard disk form:
Step 20:
Click on the "Done" button of the "Summary" box:
Step 21:
You should now be back at the "Oracle VM VirtualBox Manager" window.
Step 22:
Hold down the "Command" button of the keyboard.
Step 23:
Click on the new virtual machine.
Step 24:
Release the "Command" button of the keyboard.
Step 25:
Click on "Start" in the popup utility menu:
*
*
*
*
*
*
AN ADMISSION THAT WE DID NOT TELL YOU THE
ABSOLUTE TRUTH ABOVE!
We did not tell you the whole truth at the beginning of this "how-to"!
At the beginning of this article, we stated
(If you use "My Computer", "Computer", "Windows Explorer", or a
command prompt window to copy a virtual machine or a .vdi virtual hard
drive, the "Oracle VM VirtualBox" program will usually refuse to let you
use the newly-created virtual machine or newly-created virtual hard
drive.)
In "Oracle VM VirtualBox", you can copy a virtual hard drive directly by using
"My Computer", "Computer", "Windows Explorer", or a command prompt window
but when you copy a virtual hard disk file, you cannot use a file name that you
have already used for any virtual hard drive for any existing virtual machine in
"Oracle VM VirtualBox".
Problem 1:
If you use "My Computer", "Computer", "Windows Explorer", or a command
prompt window to copy a virtual machine or a .vdi virtual hard drive, and you
create a virtual hard disk file that with exactly the same name as a virtual hard
drive on any existing virtual machine in "Oracle VM VirtualBox", then the "Oracle
VM VirtualBox" program will refuse to let you use the newly-created virtual
machine or newly-created virtual hard drive. (See
http://www.modhul.com/2009/06/17/how-to-clone-or-copy-a-virtualbox-virtualdisk/.)
We believe that the two above-mentioned problem is too much of a pain for most
users of "Oracle VM VirtualBox" to tolerate.
See
http://mvirtualoffice.com/my-virtual-technologies/stay-safe-clone-that-virtualboxvdi-before-using-it/
APPENDIX 1
USING EXPORT/ IMPORT TO MOVE/COPY A VIRTUAL
MACHINE FROM ONE COMPUTER TO ANOTHER
IN "ORACLE VM VIRTUALBOX"
In "Oracle VM VirtualBox", you can copy a virtual machine from one computer to
another using the export/import feature.
See
http://www.virtualbox.org/manual/ch01.html#ovf
APPENDIX 2
" 'MICROSOFT VIRTUAL PC 7' FOR MAC"
-- A PIONEERING EFFORT FROM THE PAST
Only runs on old G3, G4, and G5 Macs with Motorola "PowerPC" processors.
Not a free product.
http://www.microsoft.com/australia/office/mac/virtualpc7/default.aspx
http://www.macupdate.com/app/mac/6078/virtual-pc
http://download.cnet.com/Microsoft-Virtual-PC/3000-2094_4-211267.html
http://virtual-pc.mac.findmysoft.com/
No one has posted a comment on Amazon since 2005:
http://www.amazon.com/gp/product/B0002NT16E/ref=olp_product_details?ie=UT
F8&me=&seller=