Currently, the VM images are built from a 32 bit Debian Lenny Beta 2 CD image, which is available on itlab-vin2 and itlab-vin3:
/vmfs/volumes/san0/ISO/debian-LennyBeta2-i386-netinst.iso
(We should probably start using the RC1 images)
Create a New Virtual Machine
Create a new 32 bit Linux virtual machine with at least 512MB RAM, no floppy, one IDE CD-ROM, a BusLogic SCSI adapter, and an 8GB SCSI hard drive. Connect the network interface to the VM Public Network, and connect the ISO image to the CD-ROM (and make sure the drive is connected at startup).
On itlab-vin3, create the VM in the COmanage Pool resource pool.
Boot the VM and do a minimal install - when you reach the list of system types to build, de-select everything.
Log in to the VM, and edit /etc/apt/sources.list to look like this:
deb http://ftp.us.debian.org/debian/ lenny main contrib non-free deb-src http://ftp.us.debian.org/debian/ lenny main contrib non-free deb http://security.debian.org/ lenny/updates main contrib non-free deb-src http://security.debian.org/ lenny/updates main contrib non-free # the repository for COmanage test packages deb http://comanage-dev.stanford.edu/debian lenny main contrib non-free
Create /etc/apt/apt.conf containing the following settings, to minimize the installation of extraneous packages.
APT::Install-Recommends "false"; APT::Install-Suggests "false";
Run apt-get update, then manually install the following packages:
- postfix
- sun-java5-bin
- sun-java5-jre
- sun-java5-jdk
- dhcp3-client
- co-base
- co-setup
- co-federations
Next, clean up the users
- remove the user you created during the installation process
- check that you can login as the comanage user (password is in /etc/comanage/setup/vasetup.txt)
- check that you can sudo to root as the comanage user
- set root's password to x in /etc/passwd to prevent root logins
Creating an ESX Distribution Tarball
- Shutdown the virtual machine.
- Create a new tarball from the VM directory. If the directory is /vmfs/volumes/san0/comanage, use the following:
# cd /vmfs/volumes/san0 # tar cjf comanage-`date +%Y%m%d`.tar.bz2 ./comanage/comanage.{vmx,vmxf,vmdk} ./comanage/comanage-flat.vmdk # scp comanage-`date +%Y%m%d`.tar.bz2 me@comanage-dev.stanford.edu:/srv/vm
ESX ONLY
The virtual machine image created in this process can only be used on VMware ESX servers
Creating a Virtual Appliance
Requirements
You'll need access to a Windows system with the free VMware vCenter Converter
- Shutdown the virtual machine.
- Start vCenter Converter and connect to the ESX server hosting the VM.
- Click on the Convert Machine button
- Click through the intro panels
- Set the source type to VMware Infrastructure Virtual Machine
- Enter the ESX server name and your username and password
- Pick the VM from the list
- Ignore the warning Cannot configure source image
- Select Convert all disks and maintain size
- Set the destination type to Virtual Appliance
- Call the Virtual Appliance COmanage, and select an appropriate location on your local machine
- Fill in the Virtual Appliance details
- Set the distribution format to Folder of Files
- Set the NIC to connect at power on
- Click finish
After the virtual appliance has been created on your local system, zip it up and copy it to comanage_dev.stanford.edu:/srv/vm
A Faster Alternative for Creating a Virtual Appliance
Availability
Until I get itlab-vin2 upgraded, this mechanism is currently only available for VMs hosted on itlab-vin3.
- Shutdown the virtual machine
- Remove all snapshots (if there are snapshots that you need, clone the VM first, then create an appliance from the clone)
- Select the virtual machine from the tree in the left panel
- Select File > Virtual Appliance > Export...
- Select an export directory - on itlab-vc use C:\COmanage
- Click OK, then wait for the export to complete
After the virtual appliance has been created on your local system, zip it up and copy it to comanage_dev.stanford.edu:/srv/vm