Categories: , , ,
Posted by: bjb

X starts and promptly exits.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=646987

But only under the Xen Hypervisor.

This time the keyboard device is there even under the hypervisor, but xinit “cannot invoke xkbcomp” under the hypervisor. It’s there in /usr/bin/xkbcomp, but xinit cannot “invoke” it under the hypervisor while it can invoke it when it’s not running under the hypervisor. Mysterious.

Categories: ,
Posted by: bjb

I’d like to add a “restore” feature to xen-create-image to go alongside the “install disk”, “install lvm” etc options. It would take an existing disk, mount it and apply some “restore” scripts to it. It would skip over the “create the disk and put stuff on it” part.

The xen-create-image script (in xen-tools) is almost all the way there. It’s fairly modular. It calls other scripts to do parts of its work (like xt-create-xen-config). Those scripts get the (extensive) list of options by inheriting them in the environment.

That means xen-create-image exports the list of config options to its environment. It does this in the exportEnvironment function — except for the ip address list. That is done in runCustomisationHooks. Most unfortunte for me, because the main part of the script goes like this:

exportEnvironment();
if ( $CONFIG{'install'} ) {
    ...
    if ( $CONFIG{'hooks'} ) {
        runCustomisationHooks ();
    }
}

It’s that way in xen-tools 4.2 and in xen-tools 3.2.

Unfortunately, that means that not only are the ip variables not available if I’m not installing, but neither do the customisation hooks get run. I had been hoping to make a new “distro” called “restore” in which I could put scripts like “restore-database-from-dump” and “fix-up-networking-for-new-dom0-location” and suchlike.

I’ve subscribed to the xen-tools mailing list and submitted my comments, we’ll see what happens.

Categories: , , ,
Posted by: bjb

I’m trying to run xen 4.0 but it’s not working, It seems that the input devices (keyboard and mouse) are not being supplied to the linux kernel from the xen hypervisor.

 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=589373

I’m keeping this here for easy reference.

Categories: ,
Posted by: bjb

Another bug I want to keep track of:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=611407

This one refers to the breakage of the —ip=auto in xen-create-image from xen-tools 4.2-1. Some parameter checking was implemented, and the value if the —ip option is supposed to resemble an IPv4 address (but the literal string “auto” obviously doesn’t look like an IPv4 address).

UPDATE: fixed in 4.2.1-1. Yay! Unfortunately, it’s not in Debian squeeze, it’s in unstable. To get it, but still prefer stable packages for everything else:

echo 'deb http://debian.mirror.iweb.com/debian unstable main' >> /etc/apt/sources.list
echo 'APT::Default-Release "stable" >> /etc/apt/apt.conf
apt-get update
apt-get install -t unstable xen-tools
Categories:
Posted by: bjb

Using xen-create-image in a “restore from backup tgz” scenario.

xen-create-image  --dist option

can create your own distro (called option) hooks that might:

  • adjust the new ip address (add extra interfaces as on old machine)
  • restore the database from a proper dump

Don’t run the distro hooks (like lenny) that would destroy your carefully crafted old machine

Note that the --dist option is NOT ignored when you use --install tar option. You will need to make your own dist script set (on Debian, look in /usr/lib/xen-tools).

In addition, you can run extra scripts using the —role option. Roles can be combined: --role udev,pg_restore,etc

Note that the xen-create-image --config option takes a xen-tools config file, not a xen cfg file. Also, the —config option does not replace the “global” config file, it augments it.