Archive for February, 2009

Upgrading Xensource Debian Etch guests to Lenny

Sunday, February 15th, 2009 by Steve

Debian Lenny has been released, so I’ve started upgrading some of my Xen virtual servers.  For Etch, Xensource shipped their own modified PV kernel package (2.6.18 based).  With Lenny the same kernel can be used, or the standard Debian xen kernel (2.6.26 based) can be used instead.

Upgrading the userland is identical to a physical server – instructions are contained within the Debian Lenny release notes.

To use the Debian packaged 2.6.26 kernel, several minor changes have to be made as per this form post:

  1. Install the linux-image-2.6-xen-686 package (which depends on the latest xen kernel)
  2. Re-order the kernels in /boot/grub/menu.lst so the Debian 2.6.26 kernel is the first (and therefore the default)
  3. Add “console=hvc0″ to the end of the 2.6.26 kernel line in /boot/grub/menu.lst, so it reads “kernel /boot/vmlinuz-2.6.26-1-xen-686 root=/dev/xvda1 ro console=hvc0
  4. edit /etc/inittab, find the line that looks like “1:2345:respawn:/sbin/getty 38400 tty1″ and add another line: “0:2345:respawn:/sbin/getty 38400 hvc0″

Then reboot the system, it should boot the new kernel.

Xensource doesn’t display the grub menu, it just seems to boot straight into the default option (even though I have “timeout 10″ specified in the config).  There must be a secret keypress or something to make it show the menu, but I don’t know what it is because the last step just worked for me!

Edit: Theoretically you shouldn’t need to use the -xen kernel variant, as the -686-bigmem kernel also supports running paravirtualised in domU.  With Xensource 5.0 this boots fine, but Xensource’s xen-tools refuse to start so XenCenter reports the status as “unknown”.  With the -xen kernel xen-tools start fine.

Windows Vista Complete Backup

Thursday, February 12th, 2009 by Steve

I just discovered the Complete PC Backup feature of Vista, and I’m very impressed!  This is included in the  Business, Enterprise and Ultimate editions (not the home editions).  It takes full drive image backups which can be restored by booting a standard Vista install DVD.

There’s a simple GUI to kick a backup off (backup and restore center), but unfortunately it’s rather restrictive.  It only lets you backup to a directly attached hard disk (e.g. USB) or to DVDs.  Fortunately the underlying engine DOES support backing up to a network file share.

To kick off a one-off backup, start an elevated command prompt (Start menu, Accessories, right click “command prompt” and select “Run as Administrator”) and type the following:

wbadmin start backup -allCritical -backupTarget:\\SERVER\SHARE -include:C: -vssFull

replacing \\SERVER\SHARE with the path to your network share location.  It’ll ask if you’re sure and then display its backup progress.  When it’s finished you should see it’s created a folder called WindowsImageBackup\MachineName on your backup share.  If you dig under this folder you can find it stores the entire backup in a .vhd file (virtual hard disk, also used by Microsoft’s virtualisation products).

You can schedule backups to run regularly using the task scheduler to call the command above, and adding “-quiet” to stop it prompting.  There’s a full guide to scheduling complete pc backups here.

EDIT: Apparently this is all fixed in Windows 7.