Andree Leidenfrost: Upgrade Testing with QEMU
I have been really busy until two weeks ago [Shameless plug: If you need a (technical) project manager and/or hands-on Basis person to get your SAP R/3 system upgraded to ECC6, get in touch.]. Which means I've been a bit slack - so slack in fact that Andreas Barth had to resolve an RC bug in one of my packages - mea culpa.
Ridden by guilt I decided to finally do what I've been wanting to for some time: Putting the steps together to do a Debian test upgrade using QEMU. I chose QEMU because it is free and readily comes with Debian. It is slower than VMware, at least without the non-free kernel module, but still usable on somewhat reasonable hardware. The actual upgrade steps given below are independent of the virtualisation technology used, so they will apply to VMware as well.
Without further ado, here goes:
Robert Collins made some interesting remarks about the challenges of upgrades last week when we had dinner with Martin Krafft and a number of other great people. It looks like the Ubuntu folks are working on improving update-manager but also the underlying infrastructure to smooth out the upgrade process. Maybe there could be an opportunity to work together on this and achieve a situation where upgrades become as smooth as installs are now due to the fantastic work of the d-i people.
Ridden by guilt I decided to finally do what I've been wanting to for some time: Putting the steps together to do a Debian test upgrade using QEMU. I chose QEMU because it is free and readily comes with Debian. It is slower than VMware, at least without the non-free kernel module, but still usable on somewhat reasonable hardware. The actual upgrade steps given below are independent of the virtualisation technology used, so they will apply to VMware as well.
Without further ado, here goes:
- install the qemu package
- optionally install the kqemu module:
- install the kqemu-source package (from 'non-free')
- run 'module-assistant prepare'
- run 'module-assistant auto-build kqemu' (Daniel, in case you read this: This may be easier than running make-kpkg as suggested in the README.)
- install built package with 'dpkg -i kqemu-modules-[kernel version]'
- possibly change permisisons/ownership of '/dev/kqemu' to allow non-root users
- run 'depmod -a' and 'modprobe kqemu' to load module
- create a disk image (Using qcow means we are not using a sparse file, so compressing and decompressing does not inflate the file.): qemu-img create -f qcow hda_40GB_sarge.qcow 40G
- get a sarge install CD, e.g. 31r4 netinst
- install the initial sarge system:
- start qemu e.g. like this: qemu -m 512 -hda ./hda_40GB_sarge.qcow -cdrom ./sarge-31r4-i386-netinst.iso -boot d
- start the installer and go through the normal motions
- restart qemu like this: qemu -m 512 -hda ./hda_40GB_sarge.qcow
- finish the installation:
- select a mirror (Note that DNS is not setup - fix this or use IP addresses for repositories. Also, something like apt-proxy comes in quite handy.)
- choose 'manual package selection' in the installer
- update the packages as suggested by aptitude
- quit aptitude and finish the installation
- now would be a good time to take a copy of the fresh sarge install before continuing:
- halt the (qemu) system
- copy the image file, e.g.: cp hda_40GB_sarge.qcow hda_40GB_sarge_pristine.qcow
- compress the copy (The uncompressed image is ~ 1GB, the bzip'ed one ~ 100MB.)
- install X:
- start aptitude, select 'x-window-system-core' and install
- leave all X config settings standard, except:
- mouse device: /dev/psaux
- mouse type: PS/2
- screen size: 1024x768 (or similar)
- install Gnome (That's just what I use, KDE or others are equally fine.):
- start aptitude and select the following packages and install:
- 'gnome-desktop-environment'
- 'xscreensaver'
- 'gdm'
- 'gdm-thmes'
- 'synaptic'
- 'menu'
- 'menu-xdg'
- quit aptitude
- restart gdm: invoke-rc.d gdm restart
- now might be a good time to take another copy of the sarge install before continuing:
- halt the (qemu) system
- copy the image file, e.g.: cp hda_40GB_sarge.qcow hda_40GB_sarge_gnome.qcow
- compress the new copy (The uncompressed image is now ~ 2GB, the bzip'ed one ~ 540MB.)
- install other software as desired that you want test the upgrade with, e.g.:
- 'mondo'
- 'mondo-doc'
- perform the upgrade (following the preliminary Release Notes):
- get to the command line in the qemu system, e.g. by running 'invoke-rc.d gdm stop' in a gnome-terminal
- change apt source from sarge to etch
- run 'apt-get update'
- upgrade the kernel by running 'aptitude install linux-image-2.6-486' (This is not what the Release Notes say but it works for me.) (Say 'Yes' to removing the running kernel.)
- upgrade aptitude by running 'aptitude update aptitude'
- upgrade the system by running 'aptitude -f --with-recommends dist-upgrade'
- if applicable, rerun and keep rejecting offerings to resolve conflicts until the one upgrading mondo is offered (I'll have to look into this.)
- run 'aptitude -f --with-recommends install gnome-desktop-environment' to reinstall Gnome
Robert Collins made some interesting remarks about the challenges of upgrades last week when we had dinner with Martin Krafft and a number of other great people. It looks like the Ubuntu folks are working on improving update-manager but also the underlying infrastructure to smooth out the upgrade process. Maybe there could be an opportunity to work together on this and achieve a situation where upgrades become as smooth as installs are now due to the fantastic work of the d-i people.
I’m visiting my parents’ house in Vermont, where they finally got cable after the provider agreed to dig up the ground and run a mile or so of cable to their house in return for a two year subscription agreement. (I think after two years the cable company will almost have broken even on the cost of the installation).
Having been absent myself from the cable world for some time, I am impressed by the variety of interactive and “on demand” options. My parents’ low-end package includes dozens of free on-demand movies and music videos, as well as built-in easy-to-use tivo-like functionality. The on-demand music videos show one brief ad before the video — it seems the tradeoff is that if you are really going to watch the ad, they can get more money and show you fewer ads. (Or, maybe I’m wrong — if it’s one ad per video, I suppose that would be more ads, but it feels like fewer because of the “on demand” nature. I guess it’s a perceptual trick.)
Anyway, getting to the title of this entry. Anybody in the field of intellectual property these days has got to find