====== Upgrade_Xen_on_dom0 ====== = dist-upgrade dom0 = cat /etc/apt/sources.list deb http://ftp.ie.debian.org/debian/ stable main deb-src http://ftp.ie.debian.org/debian/ stable main apt-get dist-upgrade The upgrade itself went very well. There were the usual prompts and questions about whether to keep default configs, which I accepted. Make sure you have sufficient room on /boot also for the new kernels! If not, then apt-get remove some of the older unused kernels. What did the dist-upgrade install: * Latest Kernel and Xen Kernel: linux-image-2.6.26-1-xen-686 * Kept Xen3.0!: xen-hypervisor-3.0.3-1-i386-pae * Kept xen-utils-3.0.3-1. I checked the grub entry after the dist-upgrade ( vi /boot/grub/menu.lst ). As I had everything with grub and the defaults sorted before as in [[Install_and_Config_Base_OS#dom0_mem_Automatic_setting|dom0_mem_Automatic_setting]]. ====== Default Xen Kernel Grub Entry after dist-upgrade ====== title Xen 3.0.3-1-i386-pae / Debian GNU/Linux, kernel 2.6.26-1-xen-686 root (hd0,0) kernel /xen-3.0.3-1-i386-pae.gz dom0_mem=128000 module /vmlinuz-2.6.26-1-xen-686 root=/dev/mapper/hexvg-root ro acpi=off console=tty0 module /initrd.img-2.6.26-1-xen-686 Unfortunately, the server did not come up after reboot :-/ I added "noreboot" to the following line to prevent the automatic reboot (as it was rebooting continuously trying to boot the kernel): kernel /xen-3.0.3-1-i386-pae.gz dom0_mem=128000 noreboot Luckily, there was someone to hand (moonpie) who rebooted the server, chose the old Xen kernel entry in the Grub Boot list: "title Xen 3.0.3-1-i386-pae / Debian GNU/Linux, kernel 2.6.18-6-xen-686" = Upgrade to Xen3.2 to get dom0 to boot = So with "kernel 2.6.26-1-xen-686" and "Xen 3.0.3-1-i386-pae" the server did not want to start, nor did it give a reason. I decided to upgrade to Xen3.2. dpkg -l | grep hyper #This showed I had the pae version ( xen-hypervisor-3.0.3-1-i386-pae ) apt-cache search xen | grep hyper #This showed both xen-hypervisor-3.2-1-i386 and xen-hypervisor-3.2-1-i386-nonpae apt-get install xen-hypervisor-3.2-1-i386 #This pulled down all other packages it needed :-) After installing, grub kicked in and updated the menu.lst. The boot list was as follows: title Xen 3.0.3-1-i386-pae / Debian GNU/Linux, kernel 2.6.26-1-xen-686 root (hd0,0) kernel /xen-3.0.3-1-i386-pae.gz dom0_mem=128000 module /vmlinuz-2.6.26-1-xen-686 root=/dev/mapper/hexvg-root ro acpi=off console=tty0 module /initrd.img-2.6.26-1-xen-686 title Xen 3.2-1-i386 / Debian GNU/Linux, kernel 2.6.26-1-xen-686 root (hd0,0) kernel /xen-3.2-1-i386.gz dom0_mem=128000 noreboot module /vmlinuz-2.6.26-1-xen-686 root=/dev/mapper/hexvg-root ro acpi=off console=tty0 module /initrd.img-2.6.26-1-xen-686 title Xen 3.0.3-1-i386-pae / Debian GNU/Linux, kernel 2.6.18-6-xen-686 root (hd0,0) kernel /xen-3.0.3-1-i386-pae.gz dom0_mem=128000 module /vmlinuz-2.6.18-6-xen-686 root=/dev/mapper/hexvg-root ro acpi=off console=tty0 module /initrd.img-2.6.18-6-xen-686 title Xen 3.2-1-i386 / Debian GNU/Linux, kernel 2.6.18-6-xen-686 root (hd0,0) kernel /xen-3.2-1-i386.gz dom0_mem=128000 module /vmlinuz-2.6.18-6-xen-686 root=/dev/mapper/hexvg-root ro acpi=off console=tty0 module /initrd.img-2.6.18-6-xen-686 **Note: Xen 3.2-1-i386 was #2** * Option 1: apt-get remove xen-hypervisor-3.0.3-1-i386-pae * Option 2: vi /boot/grub/menu.lst #default 0 default 1 #Note. It starts at 0, so 1 is the second on the list (as shown above). This should be fine. Running a "update grub" will not affect this setting. Reboot and see. = Update domU configs = While dist-upgrading dom0, I didn't bother powering off the domU's. I also simply done a reboot of dom0 after the dist-upgrade. Anyways, to overcome the issues outlined in [[Upgrade_domU_to_Lenny]] I wanted domU's to use the latest kernel. vi /etc/xen/auto/hex-vm06.cfg #replace .18 kernel with .26. ====== Problems with domU and Xen3.2 ====== - xm create hex-vm06 -c (-c = console) The console froze. - trying to ssh to the server resulted in "stdin: is not a tty" After some googling, this seemed to be a common problem! Specifically it was due to udev not been installed on domU (which is default for xen-tools and debootstrap). After much more googling and attempts the following was used: vi /etc/xen/hex-vm06.cfg extra = 'xencons=tty' mount /dev/mapper/hexvg-hex--vm06--disk /mnt/ chroot /mnt/ apt-get install udev #will see the following, but can ignore: Setting up udev (0.105-4) ... /sys/class/net/ is not available, persistent interface names not saved. A chroot environment has been detected, udev not started. vi /etc/udev/persistent-net-generator.rules #see below for explanation. #change: SUBSYSTEMS=="xen", \ ENV{COMMENT}="Xen virtual device" #to: SUBSYSTEMS=="xen", \ ENV{COMMENT}="Xen virtual device", GOTO="persistent_net_generator_end" exit #exit the chroot cp -a /lib/modules/2.6.26-1-xen-686/ /mnt/lib/modules/ umount /mnt/ As for "/etc/udev/persistent-net-generator.rules". Well, with udev now installed, I hit a previous problem I had identified [[Moving_from_Xen_Backports_to_Debian_Etch_Xen_Packages_-_Attempt1#Problems_with_incrementing_eth0.3B_changing_mac_address.2C_udev.2C_xen_and_etch|here]] A while ago, I received a kind email from a Timo Stripf, who had another solution, instead of hardcoding a mac address into each xen domU config. =============== I've found a different solution to fix the udev problem. You can modify the udev rules to ignore xen network interfaces. In /etc/udev/persistent-net-generator.rules simple add a GOTO directive behind SUBSYSTEM="xen": SUBSYSTEMS=="xen", \ ENV{COMMENT}="Xen virtual device", GOTO="persistent_net_generator_end" Best regards Timo Stripf Timo Stripf =============== And it worked a treat. Several poweroff's and xm shutdowns, eth0 was not incremented. This was extremely useful on one of my xen servers which I use xen-tools to create vms quickly. ====== More problems with domU and Xen3.2 ====== ===== Problem with time ===== Errors found were: [[12643.026674]] clocksource/0: Time went backwards: ret=1c3b2d1b78d delta=-682679425641319 shadow=1c379987303 offset=393a051b [[12643.026678]] __ratelimit: 1259 messages suppressed [[12643.026678]] clocksource/0: Time went backwards: ret=1c4dcda5d9d delta=-682674425464151 shadow=1c4a39f7f65 offset=393bad45 ===== Solution to time ===== vi /etc/xen/hex-vm06.cfg extra = 'xencons=tty clocksource=jiffies' The "clocksource=jiffies" is to overcome the time problems on domU's. ---- Finally, the end. Not least of all, the references: - http://romjethoughts.blogspot.com/2008/12/xen-321-on-debian-lenny.html - http://wiki.phys.ethz.ch/readme/how_to_setup_a_xen-domu_with_lenny - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502798 - https://systemausfall.org/wikis/howto/XenUpgrade3.2 - http://lists.alioth.debian.org/pipermail/pkg-xen-devel/2008-October/002109.html - http://etbe.coker.com.au/2008/10/22/upgrading-a-server-to-64bit-xen/ - http://wiki.debian.org/Xen