Difference between revisions of "Amahi on VirtualBox"

From Amahi Wiki
Jump to: navigation, search
(Created page with '= Why do this? = If you want to test Amahi without upsetting your existing network configuration, one of the easiest ways of doing so is using a virtual machine. The following …')
(No difference)

Revision as of 18:39, 25 October 2010

Why do this?

If you want to test Amahi without upsetting your existing network configuration, one of the easiest ways of doing so is using a virtual machine. The following description applies to VirtualBox, version 3.2.10. It results in a functioning Amahi install that can be accessed both from the host machine and other VMs, including PXE-booting VM.

Prerequisites

  • A working installation of VirtualBox
  • An express CD image (this was tested with Amahi-5.4-Express-2.6-Beta-i386.iso)
  • A desire to do this!

The catch

The process is fractionally more complex than a standard Amahi install, because we need to tweak the VM network configuration part-way through.

You will also need to know the IP address range that your version of VirtualBox uses for its "Host only" network type. Check the network configuration of the host system on Mac OS (and I expect Linux) there's an interface called "vboxnet0". At the time of writing, the default on Mac OS is 192.168.56.1.

Configure the hda

First, configure your amahi install in the usual way at the control panel. You must use the IP address of the VirtualBox "Host only" interface as your gateway. Make a note of the install code indicated.

Create the VM

Create a fresh VM in the usual VirtualBox way:

  • Name it as you see fit ("Amahi-test")
  • Select "Linux" and "Fedora" as the OS and version
  • Create a virtual disk for the installation: 8GB, dynamically sized should be sufficient

Once you've created the VM, go to the settings window and do the following:

  • Check that the first network interface is configured as NAT
  • Under storage, attach the Express CD image as a CD

Run the installation

Start your VM and it will boot from the CD image. Work through the installer in the usual way, entering the install code that the amahi control panel gave created earlier. You may be asked to reboot a couple of times during the process. (Note that if you get the initial CD install menu back, you need to disconnect the ISO image and then reboot again.)

Eventually, the console should show a text login prompt. At which point you should shut down the VM (either by sending the shutdown signal from VirtualBox or log in and issue the command).

Altering the VM network config

Read this piece carefully as we are going to configure *two* network interfaces. Open the VirtualBox network settings window for your VM. Configure the first two adapters thus:

  • Adapter 1: Enabled, Attached to: Host-only Adapter, Name: vboxnet0
  • Adapter 2: Enabled, Attached to: NAT

Reconfiguring the system

Boot the VM and wait for the login prompt. Login as admin (default password: admin) and use su to become root. Using your favourite editor, create the file:

/etc/sysconfig/network-scripts/ifcfg-eth1

with the contents:

DEVICE=eth1 BOOTPROTO=dhcp ONBOOT=yes

Now execute (still as root):