[Solved] Upgrade to Xen 4.3 no longer boots DomU

Help with issues regarding installation of Debian

[Solved] Upgrade to Xen 4.3 no longer boots DomU

Postby Geoff 42 » 2013-10-31 16:44

There is a quick summary of this thread below at :-
http://forums.debian.net/viewtopic.php?f=17&t=108672#p517822

As part of a dist-upgrade on Jessie, Xen seems to have been updated to 4.3.

When I try and boot up a DomU, prepared under Xen 4.1, using Xen-tools 4.4beta1, it now fails thus :-

Code: Select all
# xm create jessie.cfg -c
Using config file "./jessie.cfg".
Error: 'NoneType' object has no attribute 'rfind'


I think that this error looks Pythonesque and so I assume that it is coming from pygrub. I have updated the line in the cfg file
Code: Select all
bootloader = '/usr/lib/xen-4.1/bin/pygrub

so that it points to 4.3, but still get the same error message.

I see that since 4.2 the command 'xl' is now preferred to 'xm' and that 'xend' should be disabled, so I will try that.

Geoff
edited to mention that Dom0 is Jessie!
Last edited by Geoff 42 on 2013-11-11 09:51, edited 3 times in total.
Geoff 42
 
Posts: 50
Joined: 2012-05-24 08:13

Re: Upgrade to Xen 4.3 no longer boots DomU

Postby Geoff 42 » 2013-10-31 17:09

I have closed down the Xen daemon and have added 'xl' to /etc/default/xen to give the line :-
Code: Select all
TOOLSTACK=xl

This then gave some results, so that "xl info" would give some output, but when I have rebooted it just gives the error message :-
Code: Select all
# xl info
xc: error: Could not obtain handle on privileged command interface (2 = No such file or directory): Internal error
libxl: error: libxl.c:87:libxl_ctx_alloc: cannot open libxc handle: No such file or directory
cannot init xl context


Geoff
Geoff 42
 
Posts: 50
Joined: 2012-05-24 08:13

Re: Upgrade to Xen 4.3 no longer boots DomU

Postby Geoff 42 » 2013-11-01 11:08

I think I got the shuting down of xend wrong! I used BUM to disable the 'xen' service. I have now re-enabled it and "xl info" now gives sensible output.

The next step was to try an run up a DomU. so I gave the command :-
Code: Select all
xl create /etc/xen/jessie.cfg -c

This then proceeds to give me a choice of kernels a la grub. On selecting the kernel at the top of the list I get errrors :-
Code: Select all
libxl: error: libxl_dm.c:1142:libxl__spawn_local_dm: device model
      /usr/lib/xen-4.3/bin/qemu-dm is not executable: No such file or directory
libxl: error: libxl_dm.c:1275:device_model_spawn_outcome: (null): spawn failed (rc=-3)
libxl: error: libxl_create.c:1075:domcreate_devmodel_started: device model did not start: -3

Indeed, qemu-dm is not there, although it does exist in the 4.1 directory, as I think that it was installed by default under 4.1

I tried installing 'qemu', but it does not put anything in /usr/lib/xen-4.3/bin and the "xl create" still fails with the same error.
Also, I thought that the standard Jessie kernel runs as PV and should not need qemu.

Geoff
Geoff 42
 
Posts: 50
Joined: 2012-05-24 08:13

Re: Upgrade to Xen 4.3 no longer boots DomU

Postby Geoff 42 » 2013-11-01 16:19

I have now found a report in the bugs db :-
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=688311
which seems to say that qemu-dm has gone since 4.2 and that qemu is not yet ready. But it goes on to say that it is fixed in the current version.

I have tried selecting Xen 4.1 at the Grub menu, which still works. Having setting the toolkit to be 'xl' it now works with 'xl' and not 'xm' and will boot the DomU.

Geoff
Geoff 42
 
Posts: 50
Joined: 2012-05-24 08:13

Re: Upgrade to Xen 4.3 no longer boots DomU

Postby Geoff 42 » 2013-11-04 16:23

Having read the bug report more carefully, I have now edited the cfg file for the DomU, /etc/xen/jessie.cfg in my case, and have added the following lines :-
Code: Select all
device_model_version = "qemu-xen-traditional"
device_model_override="/usr/lib/xen-4.1/bin/qemu-dm"

I can now boot my DomU on Xen 4.3, with the command :-
Code: Select all
xl create /etc/xen/jessie.cfg -c

Although this does seem a bit of a backwards compatability hack, referring as it does to qemu-dm from 4.1. Also the man page for the cfg file says that the second line should not normally need to be specified (man xl.cfg) whereas I found it to be necessary.

Geoff
Geoff 42
 
Posts: 50
Joined: 2012-05-24 08:13

Re: Upgrade to Xen 4.3 no longer boots DomU

Postby Geoff 42 » 2013-11-04 17:03

While the above options allowed DomU to boot, I could not get VNC to run. I therefore tried the following options, which not only allowed DomU to boot, but also allowed VNC to run. I had already installed 'qemu' and found that the binaries were in /usr/bin rather than in /usr/lib/xen-4.?/bin/
Code: Select all
device_model_version  = "qemu-xen"
device_model_override = "/usr/bin/qemu-system-i386"
bios                  = "seabios"

This seems more satifactory as it is using the current qemu rather than an old version.

Geoff
Geoff 42
 
Posts: 50
Joined: 2012-05-24 08:13

Re: Upgrade to Xen 4.3 no longer boots DomU

Postby Geoff 42 » 2013-11-06 10:45

Having a look in /usr/bin, there are a number of qemu-system-* which cater for a number of different architectures. It took a few moments to realise that these are all binaries for my architecture, but are emulating the architecture in the name! There is also /usr/bin/qemu which is a link via /etc/alternatives to one of the qemu-system-*, in my case to /usr/bin/qemu-system-i386. I would guess that the correct thing to do is use the generic name in the configuration file and ensure that the alternative is set correctly.
Code: Select all
device_model_version = "qemu-xen"
device_model_override = "/usr/bin/qemu"
bios = "seabios"

It is not clear to me which qemu binary I should really be using on my x86_64 system, as both the i386 and the x86_64 qemus appear to let Xen work.

Geoff
Geoff 42
 
Posts: 50
Joined: 2012-05-24 08:13

Re: Upgrade to Xen 4.3 no longer boots DomU

Postby Geoff 42 » 2013-11-06 15:04

Summary

When Xen updates from 4.1 to 4.3, booting up an DomU no longer works for 2 reasons.
The 'xm' commands have been replaced by the 'xl' commands as the default toolstack.

See :- http://wiki.xenproject.org/wiki/Xen_4.2_Release_Notes

It is necessary to edit /etc/default/xen and add 'xl' to give the line :-
Code: Select all
TOOLSTACK=xl

It may be necessary to reboot to ensure that this takes effect and stop
the daemon 'xend' from running.

See :-
Code: Select all
http://wiki.xenproject.org/wiki/XL#Upgrading_from_xend


The second reason is that qemu-dm is no longer shipped with 4.3. It is possible
to use the 4.1 version, but the way forward appears to be to :-

install qemu
edit the cfg file for your DomU to add :-
Code: Select all
device_model_version = "qemu-xen"
device_model_override = "/usr/bin/qemu"
bios = "seabios"


See :-
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=688311
man xl.cfg

You should then be able to replace your 'xm' command with (say) :-
Code: Select all
xl create /etc/xen/jessie.cfg -c


The cfg file was originally produced by xen-tools 4.4b1 but now looks something like :-
Code: Select all
cat /etc/xen/jessie.cfg
#
# Configuration file for the Xen instance jessie, created
# by xen-tools 4.4beta1 on Fri Oct 11 15:19:11 2013.
#

#
#  Kernel + memory size. Update pygrub to 4.3
#

bootloader = '/usr/lib/xen-4.3/bin/pygrub'

vcpus       = '2'
memory      = '1024'

#
#  Disk device(s). Using LVM
#
root        = '/dev/xvda2 ro'
disk        = [
                  'phy:/dev/VG0/jessie-disk,xvda2,w',
                  'phy:/dev/VG0/jessie-swap,xvda1,w',
              ]

#
#  Physical volumes
#

#
#  Hostname
#
name        = 'jessie'

#
#  Networking
#
vif         = [ 'ip=192.168.1.13 ,mac=00:16:3E:35:B7:16' ]

#
#  Behaviour
#
on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'restart'

vfb         = [ 'type=vnc,vncdisplay=10,vncpasswd=xxxxxxxx,keymap=en-gb' ]
vga         = 'stdvga'

# Xen version 4.3 needs these for older DomUs :-

# device_model_version = "qemu-xen-traditional"
# device_model_override="/usr/lib/xen-4.1/bin/qemu-dm"

device_model_version = "qemu-xen"
# device_model_override="/usr/bin/qemu-system-i386"
# device_model_override="/usr/bin/qemu-system-x86_64"

# Let /etc/alternatives sort out which one to use...
device_model_override = "/usr/bin/qemu"
bios = "seabios"


Geoff
Geoff 42
 
Posts: 50
Joined: 2012-05-24 08:13

Re: [Solved] Upgrade to Xen 4.3 no longer boots DomU

Postby Quantum » 2014-06-01 21:15

Thank you Geoff.
Quantum
 
Posts: 1455
Joined: 2006-03-21 19:06
Location: Seattle, Ecotopia


Return to Installation

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable