Automated D-I testing in VmWare

You'll find below some details about the way I'm currently testing Debian Installer automatically with VmWare.

My VmWare copy is version 4.5.2-build8848. 4.x versions have added the interesting ability of allowing virtual machines to boot from the network. I have made use of this for automatic testing of daily built D-I netboot images.

My VmWare virtual machines are setup with a NAT network adapters, that is vmnet8 on the host machine.

The setup for a netboot server allowing clients to boot D-I from the network is described on Debian Wiki. The only difference is: for allowing VmWare to make use of the host machine for netbooting, you need to configure VmWare's DHCP server. You indeed do NOT need another DHCP server.

Configure TFTP as described on Debian Wiki.

For VmWare DHCP server, assuming you use the default settings for VmWare virtual interfaces, you just need to add the following in /etc/vmware/vmnet8/dhcpd/dhcpd.conf:

subnet 192.168.7.0 netmask 255.255.255.0 {
    range 192.168.7.128 192.168.7.254;
    option broadcast-address 192.168.7.255;
    option domain-name-servers 192.168.7.2;
    option domain-name "localdomain";
    option routers 192.168.7.2;
  next-server 192.168.7.1; #tftp server
  filename "/pxelinux.0";
}

With this setup, I put the D-I daily built linux and initrd.gz images in /var/lib/tftpboot.

My /var/lib/tftpboot directory looks like this:

root@mykerinos:/var/lib/tftpboot# ls -lR
total 15685
-rw-r--r--  1 root root  2860649 2004-10-14 20:28 daily-initrd-24-i386.gz
-rw-r--r--  1 root root  3235084 2004-10-14 20:28 daily-initrd-26-i386.gz
-rw-r--r--  1 root root   812691 2004-10-14 20:28 daily-linux-24-i386
-rw-r--r--  1 root root  1089561 2004-10-14 20:28 daily-linux-26-i386
-rwxr-xr-x  1 root staff     743 2004-10-14 22:35 get-di.sh
-rw-r--r--  1 root root   812691 2004-10-14 22:43 my24
-rw-r--r--  1 root root  1089561 2004-10-14 22:43 my26
-rw-r--r--  1 root root  2837157 2004-10-14 22:43 myinitrd-24-i386.gz
-rw-r--r--  1 root root  3230406 2004-10-14 22:43 myinitrd-26-i386.gz
-rw-r--r--  1 root staff   11168 2004-06-24 16:54 pxelinux.0
drwxr-sr-x  2 root staff    1024 2004-10-14 22:31 pxelinux.cfg

./pxelinux.cfg:
total 2
-rw-r--r--  1 root staff 1761 2004-10-14 22:31 default

The get-di.sh script grabs daily built images from D-I daily builds and my home built images and kernels from my development tree:

#!/bin/sh -e
IMAGEHOSTI386=http://people.debian.org/~joeyh/d-i/images/daily/netboot/debian-installer/i386/
MYDI=/home/bubulle/src/debian/debian-installer/installer/build

cd /var/lib/tftpboot
wget $IMAGEHOSTI386/initrd.gz -O daily-initrd-24-i386.gz || true
wget $IMAGEHOSTI386/linux -O daily-linux-24-i386 || true
wget $IMAGEHOSTI386/2.6/initrd.gz -O daily-initrd-26-i386.gz || true
wget $IMAGEHOSTI386/2.6/linux -O daily-linux-26-i386 || true

cp $MYDI/dest/netboot/debian-installer/i386/linux my24 || true
cp $MYDI/dest/netboot/debian-installer/i386/2.6/linux my26 || true
cp $MYDI/dest/netboot/debian-installer/i386/initrd.gz myinitrd-24-i386.gz || true
cp $MYDI/dest/netboot/debian-installer/i386/2.6/initrd.gz myinitrd-26-i386.gz || true

Finally, the pxelinux.cfg/default file builds the menu I want to use:

prompt 1
default di24fr
say "Bienvenue sur le serveur de boot de Christian"
say "Choix possibles:"
say ""
say "di24     : Debian Installer daily built i386 kernel 2.4"
say "di26     : Debian Installer daily built i386 kernel 2.6"
say "24       : Debian Installer home built 2.4"
say "26       : Debian Installer home built 2.6"
say "di24fr   : Debian Installer i386 daily built 2.4 automatique en francais"
timeout 0
label di24
  kernel daily-linux-24-i386
    append vga=normal initrd=daily-initrd-24-i386.gz ramdisk_size=16384 root=/dev/rd/0 init=/linuxrc devfs=mount,dall rw
label di24fr-t
  kernel daily-linux-24-i386  
    append vga=normal initrd=daily-initrd-24-i386.gz ramdisk_size=16384 root=/dev/rd/0 init=/linuxrc devfs=mount,dall rw languagechooser/language-name=French countrychooser/shortlist=FR DEBCONF_PRIORITY=critical preseed/url=http://192.168.7.1/~bubulle/preseed/testing.cfg    
label di24fr-u
  kernel daily-linux-24-i386  
    append vga=normal initrd=daily-initrd-24-i386.gz ramdisk_size=16384 root=/dev/rd/0 init=/linuxrc devfs=mount,dall rw languagechooser/language-name=French countrychooser/shortlist=FR DEBCONF_PRIORITY=critical preseed/url=http://192.168.7.1/~bubulle/preseed/unstable.cfg    
label di26
  kernel daily-linux-26-i386
    append vga=normal initrd=daily-initrd-26-i386.gz ramdisk_size=16384 root=/dev/rd/0 init=/linuxrc devfs=mount,dall rw
label di26fr-t
  kernel daily-linux-26-i386
    append vga=normal initrd=daily-initrd-24-i386.gz ramdisk_size=16384 root=/dev/rd/0 init=/linuxrc devfs=mount,dall rw languagechooser/language-name=French countrychooser/shortlist=FR DEBCONF_PRIORITY=critical preseed/url=http://192.168.7.1/~bubulle/preseed/testing.cfg    
label di26fr-u
  kernel daily-linux-26-i386
    append vga=normal initrd=daily-initrd-24-i386.gz ramdisk_size=16384 root=/dev/rd/0 init=/linuxrc devfs=mount,dall rw languagechooser/language-name=French countrychooser/shortlist=FR DEBCONF_PRIORITY=critical preseed/url=http://192.168.7.1/~bubulle/preseed/unstable.cfg    
label 24
  kernel my24
    append vga=normal initrd=myinitrd-24-i386.gz ramdisk_size=8192 root=/dev/rd/0 init=/linuxrc devfs=mount,dall rw
label 26
  kernel my26
    append vga=normal initrd=myinitrd-26-i386.gz ramdisk_size=8192 root=/dev/rd/0 init=/linuxrc devfs=mount,dall rw

The most interesting part are the di24fr-t / di24fr-u / di26fr-t / di26fr-u entries: