Posts tagged: virtualbox

VirtualBox – Cloning a VM and Hard drive

Cloning a VirtualBox VM+Drive

Step 1) Clone a Disk

in ~/Library/VirtualBox/HardDisks

VBoxManage clonevdi <existing drive> <new drive>

Example

Command

VBoxManage clonevdi WinXP-IE7.vdi WinXP-IE6.vdi

Output

Clone hard disk created in format 'VDI'. UUID: 327deab6-c228-4fdc-93cd-004a45c4fece

Step 2) Create and register an empty VM

The important element here is the ‘register’.

in ~/Library/VirtualBox/Machines

VBoxManage createvm -register -name <new name>

Example

Command:

VBoxManage createvm -register -name WinXP-IE6

Output:

UUID: c43cfacd-8c5f-46ac-9f5a-c6f8d84b6f10
Settings file: '/Users/tflynn/Library/VirtualBox/Machines/WinXP-IE6/WinXP-IE6.xml'

3) Copy the existing setup into the new setup

in ~/Library/VirtualBox/Machines

Example

cp ./WinXP-IE7/WinXP-IE7.xml ./WinXP-IE6/WinXP-IE6.xml

4) Edit the new configuration file

a) Change the Machine Name and UUID

Example

  <Machine uuid="{c43cfacd-8c5f-46ac-9f5a-c6f8d84b6f10}" name="WinXP-IE6" OSType="WindowsXP" lastStateChange="2009-06-25T19:29:04Z">

b) Remove the ‘existing’ hard disk

Example

Remove

<AttachedDevice type="HardDisk" port="0" device="0">
<Image uuid="{e3fb9c99-4c33-4c05-b26d-144c38404efa}"/>
</AttachedDevice>

5) Add the new hard disk as a resource

Command

GUI > File > Virtual Media Manager > Hard Disks > Add

Example

GUI > File > Virtual Media Manager > Hard Disks > Add

WinXP-IE6.vdi

6) Attach new disk to new VM.

GUI > [VM] > Settings > Storage > [Add]

Example:

GUI > [VM] > Settings > Storage > [Add]
IDE Primary Master > WinXP-IE6.vdi

7) Stop and Restart Virtual Box

8) You’re done! Start the new VM.

VirtualBox – Installing Windows XP

To install Windows XP from a CD when using VirtualBox:

  • Create a virtual machine for Windows XP but don’t start it.
  • Machine > Settings > Storage > CD/DVD-ROM
    • Mount CD/DVD-Drive
    • Select drive
    • Enable Passthrough
  • Machine > Settings > General > Advanced
    • Temporarily change the boot order to CD only
  • Start the virtual machine

Removing VirtualBox

(For OS X)

If you want to remove VirtualBox completely from your machine you need to do a couple of thngs in addition to running the ‘VirtualBox_Uninstall.tool’ script supplied in the distribution.

  • Remove ~/Library/Preferences/org.virtualbox.app.VirtualBox.plist
  • Reboot

WordPress Themes