TWiki> DiyDice Web>DiyDICEVBInstall (revision 5)EditAttach

DIY DICE VirtualBox guest install

The following instructions are for setting-up a DIYDICE virtual machine ("the guest") on a real machine running VirtualBox ("the host"). This will typically be used for providing a DICE like environment on a self managed physical machine (eg a Mac or a Windows PC).

This page describes a configuration where the DIYDICE virtual machine expects the host machine to be connected to a static IP Informatics network wire (eg SM197); this is for DICE authentication and directory services. Further instructions for "roaming" DIYDICE virtual machines will be provided later...

1. Create the virtual machine

ALERT! Make sure that CPU Virtualisation Extensions (VT-X) are enabled in your machine's BIOS, if available (all 745s and newer). These are crucial for best performance of host and guest; their absence is implicated in some problems experienced on 745s.

VirtualBox is a disk I/O intensive application. If you are using a Linux machine with your home directory mounted using AFS (eg a DICE desktop), you should ensure that your ~/.VirtualBox is a symlink to a directory on a local disk partition. Similarly you should ensure that your virtual disk images are located on a local disk partition.

Run the VirtualBox command. Follow the GUI Wizard to create a new virtual host and virtual disk image.

OS type Linux
Version Redhat
New disk dynamically expanding storage, location under a local partition (eg /disk/scratch/)..., size 30Gb (minimum)

Once the VM is created, modify the following settings for your new VM :-

Network For adapter1, change "attached to" from NAT to Bridged Adapter
System For "Boot order", have only "Hard Disk" and "Network" ticked
Hard Disks Enable additional controller "SATA (AHCI)", and change the "slot" for your Hard disk to be "SATA Port 0"
Choose CDROM as install media (ignore the fact you don't have a CD installed - you're going to install off the network).

Now start the virtual machine; this should attempt to boot off the network. Take note of the CLIENT MAC ADDRESS (6 pairs of hex digits); you will need to provide Computing Support with this address before progressing further.

2. Computing support preparation

Ask Computing Support to configure the environment for your DIY DICE VM. Computing Support will:

  • Ensure that your host machine is on a network wire which supports DIY DICE
  • Add a dns entry for your machine (in the domain)
  • Create an lcfg stub profile
  • Create a DIY DICE directory for you on the LCFG server.

3. Prepare the LCFG profile for your machine

  1. If you haven't already done so, create the directory to store the source files for your DIY DICE machine profiles
    mkdir -p ~/LCFG/source
  2. Create an LCFG source profile for your machine (in the above directory). This is a text file with the same (shortened) name as your machine; eg for you would create a text file called diyvm.

    The following is an example source profile :-

    /* */
    #define _AUTH_USER      ascobie
    #define FIRST_INSTALL
    #include <diydice/os/sl5.h>
    #include <dice/hw/virtualbox.h>
    #include <dice/options/office.h>
    #include <dice/options/dhcp.h>
    /* eof */
    From this source profile, we can see that will be running SL5 (Scientific Linux 5) and ascobie will be the user.

  3. You will need to change the CPP definition _AUTH_USER to your DICE username.

  4. Submit the source profile using the diysubmit command.

  5. The profile should compile within a minute or so. Check the profile's status on the LCFG status web page at Click on the machine's name for further details. A red insect icon against your machine's name means that there are bugs in the LCFG profile. Edit the profile source to eliminate the bugs then diysubmit again, and repeat until all the bugs have been eliminated.

  6. Once the profile has compiled successfully, you are ready for the installation to begin.

4. Install your machine

  1. From within VirtualBox, start your VM. After 15-30 seconds you should see a menu similar to the following :-

    The following boot options are available
    sl5:- boot to the sl5 install system
    sl564:- boot to the sl5_64 install system
    fc6serial - boot to the fc6 install system with serial console
    ... other options ...

  2. For a Scientific Linux 5 install type sl5 at the boot: prompt. This will boot the Linux kernel and start the LCFG install system.

    boot: sl5
    Loading /kernel-pxe-install-sl5/vmlinux...............
    Loading /kernel-pxe-install-sl5/initrd.gz.............
    Linux version 2.6.18-53.1.13.el5.lcfg.2 ( (gcc 8
    BIOS-provided physical RAM map:
     BIOS-e820: 0000000000000000 - 00000000000a0000 (usable)
     BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
     BIOS-e820: 0000000000100000 - 000000003f686c00 (usable)
     BIOS-e820: 000000003f686c00 - 000000003f688c00 (ACPI NVS)
    ... more kernel output ...
    Listening on LPF/eth0/00:13:72:cf:65:b8
    Sending on   LPF/eth0/00:13:72:cf:65:b8
    Sending on   Socket/fallback
    DHCPDISCOVER on eth0 to port 67 interval 4
    DHCPOFFER from
    DHCPREQUEST on eth0 to port 67
    DHCPACK from
    bound to -- renewal in 361 seconds.
    Hostname is
    LCFG client: install                                    [OK]
    (I)nstall, (D)ebug, (S)hell, (P)atchup, (R)eboot : 

    If you don't see output similar to the above or the hostname is incorrect please contact Support.

  3. Up until this point, nothing has been installed on your machine. If you are happy for the install to go ahead type i at the above prompt, followed by y to confirm. The install process will now start to install DIY DICE on your machine.

    (I)nstall, (D)ebug, (S)hell, (P)atchup, (R)eboot : i
    Type Y to confirm, S for shell : y
    [INFO] install: Calling %oneshot% setctx install=true
    [INFO] install: Calling %oneshot% echo lcfg:x:980:980:LCFG user:/tmp:/bin/false >> /etc/passwd
    [INFO] install: Calling %oneshot% echo lcfg:x:980: >> /etc/group
    [INFO] install: Calling client install none:
    [OK] client: install
    [INFO] install: Calling %gettime% ntpdate
    Attempting ntpdate of (
    ... more output ...
    This process will install sufficient software packages (known as RPMs) for the machine to boot off its local disk. This set of ~350 RPMs is known as the "installbase". Once the "installbase" is installed, the machine will reboot off the local disk and continue installing the remaining ~2500 RPMs. This process will take between 1 and 2hrs depending on the speed of the machine. A final reboot is performed and the machine should then be ready for use.

  4. Remove the line #define FIRST_INSTALL from your machine's source profile.

-- AlastairScobie - 16 Apr 2009

Edit | Attach | Print version | History: r10 | r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r5 - 12 May 2011 - 09:53:53 - AlastairScobie
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
This Wiki uses Cookies