As the first step in moving my automated d-i install testing away from the dilab and over to emulation, I've added support to the d-i regression tester (digress) to use qemu for serial-console based CDROM installation tests. It was fairly straightforward to do that, since digress already supported bochs and hercules.

I don't currently have an enourmous fast machine I can run qemu on. Actually, all of my servers, including my only amd64 server, have xen on them, which isn't ideal in combination with qemu (no kqemu..). So I thought I'd put this out as a howto, in the hope that lots of people will set up their own automated tests. If you do, please mail me and let me know, and I will aggregate all the tests together into a nice status page.

Here's how to set it up:

  • sudo apt-get install qemu subversion libexpect-perl expect lockfile-progs
  • sudo apt-get install kqemu-modules-2.6.18-4-686 # or similar, using unstable
  • sudo modprobe kqemu
  • svn co svn+ssh://svn.debian.org/d-i/trunk/scripts/digress
  • Now edit digress/schemes/qemu/common, and set ISO to point to the CD image you want to test. You may also want to tune QEMU_DISK_SIZE, QEMU_EXTRA_PARAMS, STAGE_1_MAX_TIME, STAGE_2_MAX_TIME, and USER_PASSWORD. digress's README has more details about all the config options.
  • Also edit digress/schemes/qemu/d-i, and change "url=kodama" to control where d-i will download its preseed file from. Until qemu bug #414342 is fixed, it can't support colons or slashes in the url to the preseed file, so the example is taking advantage of the default url guessing in d-i, which will look in eg http://kodama/d-i/etch/./preseed.cfg. Put in your hostname and set up a preseed file. digress/preseed.cfg is a reasonable starting point.
  • To start a test, run ./test-harness qemu d-i
  • The test will proceed automatically; digress will hit Enter at any prompts. Your preseed file should take care of any other choices.
  • To cron the test, run cd ~/digress; ./daily-tests qemu d-i (be sure to update the CD image too). This will drop logs into digress/logs, and if you put that directory up on the web, I can produce a nice status page.

(Wonder if I should make a package of digress?)

A few ideas for things to test:

  • netinst iso
  • businesscard iso
  • netboot mini iso
  • true netboot (qemu -boot n)
  • gnome desktop install
  • kde desktop install
  • xfce desktop install
  • web server install
  • lvm
  • raid
  • small disk
  • lowmem
  • amd64
  • lilo
  • all kinds of fun combos of the above, like lowmem gnome+web server install on lvm