DICE on VMware on DICE

(See also Tim's VirtualBox solution.)

This page says how to install SL5 and FC6 DICE on virtual machines using VMware running on a DICE machine.

On the host machine

Some requirements:
  • If you want to run a 64 bit OS in a virtual machine, you must run a 64 bit OS on the host machine. sl5_64 is currently (August 08) the obvious choice.
  • Also necessary for a 64 bit OS, edit the BIOS settings to Enable Virtualization Technology in the Processor > Virtualization section.
  • Several tens of GB of local disk space.
  • You'll need a licence for VMware Workstation.
  • #include <dice/options/vmware-workstation.h>
  • For DICE machines it's best to turn off VMware's NAT networking as DICE machines will need bridged networking: !vmwarews.nat mSET(no)

After a reboot the vmwarews component should start up and configure things appropriately. See florence for an example of a VMware host.

On each virtual machine

A DICE machine running as a virtual machine will still need the things a normal DICE machine needs - a profile and a DNS address. The machine's hardware should be declared as dice/hw/vmware_ws6.h. If the host machine doesn't have large amounts of spare disk space you may want to give the virtual machine a smaller disk than normal to save space. Do this by putting #define _MINROOTSIZE 15000 before the headers and !profile.packages mADD(@lcfg_sl5_removeinternational.rpms) (or use lcfg_fc6_removeinternational.rpms for an FC6 machine).

For examples of VMware-hosted virtual DICE machines see the profiles for bee, wasp and cleg.

Next, start up vmware & on the host machine.

For convenience, edit the preferences in vmware and set Default Location for Teams and Virtual Machines to wherever your large amounts of local disk space are.

Create a virtual machine container:

  1. In vmware choose File > New > Virtual Machine. The New Virtual Machine Wizard will start. Next.
  2. Choosing Typical will create a machine with a normal range of devices available. Next.
  3. Set the Guest Operating System to Linux and choose "Red Hat Enterprise Linux 5" for an sl5 virtual machine or "Red Hat Enterprise Linux 5 64-bit" for sl5_64. If the machine is going to run a 64 bit OS you must choose the 64 bit version here. Next.
  4. Change the Name to the name of the virtual DICE host and check the Location of the file. Next.
  5. Keep "Use bridged networking" as you want the virtual machine to appear on the network as a normal machine. Next.
  6. The disk size had better be increased from the default 8GB. 20GB seems a reasonable number. Keep "Allocate all disk space now" unticked to save space on the host machine's disk. Finish.

Once created you can "Power On" the virtual machine. The first thing the virtual machine does, after popping up various warnings, is to attempt a network boot. Pay attention here because the machine will tell you its MAC address at this point (just like a real DICE install). Note the MAC address down and enter it in dhclient.mac in the virtual machine's own LCFG file. Wait a few minutes for the change to percolate to the DHCP servers. While waiting, power the virtual machine off again.

A few minutes later, power the virtual machine on again. This time you should be able to do a normal PXE install of DICE onto the virtual machine.

Once installation is complete and the virtual DICE machine is up and running, you'll need to install VMware Tools:

  • Login to the virtual DICE machine then choose VM > Install VMware Tools. This puts a (virtual) CD onto your (virtual) desktop, containing an RPM and a tarball of the VMware Tools package. Install the RPM as root with rpm -i.
  • (This step will be unnecessary after the 14 August 2008 stable release.) The virtual machine will need to have an entry for this package added to its profile.packages resource to stop updaterpms from uninstalling it again. To find the installed name of the package do rpm -qa | grep VMware. For example,
[wasp+]cc: rpm -qa|grep VMware
VMwareTools-7241-93057.i386
[wasp+]cc: 
The following resource would protect this from updaterpms:
!profile.packages   mADD(+VMwareTools-7241-93057/i386:i)
  • Complete the VMware Tools installation: login to the virtual machine, nsu to root; then run /usr/bin/vmware-config-tools.pl. It's generally OK to accept the default answers to these questions. Choose a convenient screen resolution when prompted.
  • Reboot the virtual machine once again.

-- ChrisCooke - 06 Aug 2008

Topic revision: r3 - 07 Aug 2008 - 11:01:49 - ChrisCooke
 
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