Tycoon provides the flexibility for users to use their own file system images when creating virtual machines. This allows users to reduce the amount of configuration they have to do after creating host accounts. This section covers two topics: how to modify an existing Tycoon file system image and the requirements for a Tycoon file system image. For information on how to use the image once it is created, see the reference for the tycoon host create_account command.
Download and decompress the image that you want to modify. The base image is at http://tycoon.hpl.hp.com/~tycoon/dl/images/centos.5-0.ext3.bz2.
$ wget http://tycoon.hpl.hp.com/~tycoon/dl/images/centos.5-0.ext3.bz2 $ bunzip2 centos.5-0.ext3.bz2
Mount the image file using the loop back device:
$ mkdir /mnt/tycoon_fs_image $ mount -o loop centos.5-0.ext3 /mnt/tycoon_fs_image
Configure the image. If you are going to use yum to
install packages, you at least need to copy in a
resolv.conf file, and may also need to
set a network proxy:
$ cp /etc/resolv.conf /mnt/tycoon_fs_image/etc
Change root. You must do this if you are going to use yum or rpm.
$ chroot /mnt/tycoon_fs_image
Mount proc file system. You must do this for yum and rpm.
$ mount /proc
Modify the image as you like.
$ yum install ...
Reverse the mounting process:
$ umount /proc $ exit $ rm -f /mnt/tycoon_fs_image/etc/resolv.conf $ umount /mnt/tycoon_fs_image $ rm -fr /mnt/tycoon_fs_image
Recompress and upload the image to a web server:
$ bzip2 centos.5-0.ext3 $ scp centos.5-0.ext3.bz2 ...
Modify the auctioneer configuration to allow the new file
system url. See the AllowedFileSystemImageRegexs setting
in /etc/tycoon/tycoon_aucd.conf.
Tycoon auctioneers have several requirements to configure file system images correctly. In general, images based on RedHat Enterprise Linux or Fedora should work, while others probably will have limited or no functionality. The requirements are as follows, in order of importance:
The file must be an ext3 file system image. It can be compressed with bzip2, zip, or gzip. This is the absolute minimum for functionality.
OpenSSH must be installed, the server must be configured
to be started, and its configuration must be in
/etc/ssh/sshd_config. If this does
not work, users will not be able to log in.
User accounts must be in /home
This is necessary to create the user's home directory.
The network interface configuration must be in
/etc/sysconfig/network-scripts/ifcfg-eth0,
/etc/sysconfig/network-scripts/ifcfg-eth1,
/etc/sysconfig/network, and
/etc/hosts.
Consoles must be configured through
/etc/inittab> and
/etc/securetty. This is necessary to
access the console.
Passwords must be stored in
/etc/shadow. This is necessary so
"root"'s password can be reset.
Consoles must be configured through
/etc/inittab> and
/etc/securetty. This is necessary to
access the console.
The loader must support the file
/etc/ld.so.conf.d/libc6-xen.conf. This
is necessary to improve the performance of Xen.