03 December, 2006
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.
Comments:
<< Home
This is a great article! Thanks a lot. I`m a QEMU user, too, but i couldn`t istall the latest version of QEMU with kqemu on Sarge.
I must say this is a great article i enjoyed reading it keep the good work.
Dell Inspiron 1150 battery
Dell Inspiron 1200 battery
Dell Inspiron 1300 battery
Dell Inspiron 1501 battery
Dell Inspiron 1520 battery
Dell Inspiron 1521 battery
Dell Inspiron 1525 battery
Dell Inspiron 1526 battery
Dell Inspiron 1720 battery
Dell Inspiron 1721 battery
Dell Inspiron 2100 battery
Dell Inspiron 2200 battery
Dell Inspiron 1150 battery
Dell Inspiron 1200 battery
Dell Inspiron 1300 battery
Dell Inspiron 1501 battery
Dell Inspiron 1520 battery
Dell Inspiron 1521 battery
Dell Inspiron 1525 battery
Dell Inspiron 1526 battery
Dell Inspiron 1720 battery
Dell Inspiron 1721 battery
Dell Inspiron 2100 battery
Dell Inspiron 2200 battery
Nice information, many thanks to the author. It is incomprehensible to me now, but in general, the usefulness and significance is overwhelming. Thanks again and good luck!!
Security Logo
Post a Comment
Security Logo
<< Home