Posts Tagged ‘VirtualBox’

Static IP address for a VirtualBox Debian Lenny

Wednesday, May 6th, 2009

In order to give a static adress instead of the DHCP assigned one, You can chose bridge network in the mail VirtualBox Control panel for You host (in settings -> Network).

If during the boot You see the error

SIOCSIFADDR: no such device
eth0 ERROR …. etc….

maybe You have a wrong MAC address in your file /etc/udev/rules.d/70-persistent-net.rules matching the eth0 interface. So verify

  • the MAC address assigned by VirtualBox from the VirtualBox console,
  • the MAC showed by /sbin/ifconfig and
  • the /etc/udev/rules.d/70-persistent-net.rules file one assigned to eth0.

Obviously the MAC address for this interface have to be the same!

Cloning a VirtualBox host

Wednesday, May 6th, 2009

VirtualBox is a very nice GPL alternative to vmWare if You are looking for a general-purpose x86 hardware virtualizer.

The VirtualBox Installation is very easy: in many case You have only to download the righ file (.rpm, .deb, etc…) and install it as a normal software package.

If You need to clone quickly a virtual host, stop this, then cd where your system are storing your virtual box hard disk and issue the command VBoxManage specifying the action (clonehd), the input file name (the virtual hard disk file), and the output file. E.G.

cd ~/.VirtualBox/HardDisks
VBoxManage clonehd vbox-lenny1.vdi vbox-lenny2.vdi

This command duplicates a registered virtual hard disk image to a new image file with
a new unique identifier (UUID), that will be shown at the end of the copy output:

VirtualBox Command Line Management Interface Version 2.2.2
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%
Clone hard disk created in format ‘VDI’. UUID: 42bf1adb-e7f7-4993-b8e8-739aca77e092

Then, from Your VirtualBox main console, start the new host wizard, followin the defaults just to the point to specify Your hard disk. Here check for “Use existing hard disk” and browse to look for the file You have just created with the VBoxManage clonehd command.
Remember You have to click on the “Add” icon to see and import your new hard disk file.

vbox-hd-clone

Then, just end the wizard and start your new virtual host.