Created attachment 334865 [details]
Description of problem:
Installation of Fedora 10 Xen domU with virt-install fails with XML description for failed to build sexpr error.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. run virt-install like this:
virt-install --debug -n vm01 -r 512 --vcpus=1 -f /dev/vg00/vm01 --vnc -p -l "ftp://ftp.funet.fi/pub/mirrors/fedora.redhat.com/pub/fedora/linux/releases/10/Fedora/i386/os"
Installation fails with error. domU is not started.
"libvirtError: XML description for failed to build sexpr is not well formed or invalid"
Log of virt-install output/errors:
Also attached to this bugreport.
successful install of Fedora 10.
I'm using rawhide/F11 Xen 3.3.1-9 packages, rebuilt and installed on Fedora 10.
I'm also using/testing custom Linux 2.6.29-rc7 pv_ops dom0 kernel.
I'm using x86 32bit PAE Xen hypervisor and dom0 kernel.
[root@dom0test ~]# uname -a
Linux dom0test.localdomain 2.6.29-rc7-tip #14 SMP Wed Mar 11 23:01:38 EET 2009 i686 i686 i386 GNU/Linux
[root@dom0test ~]# xm info
host : dom0test.localdomain
release : 2.6.29-rc7-tip
version : #14 SMP Wed Mar 11 23:01:38 EET 2009
machine : i686
nr_cpus : 2
nr_nodes : 1
cores_per_socket : 1
threads_per_core : 2
cpu_mhz : 3000
hw_caps : bfebfbff:00000000:00000000:00000180:0000441d:00000000:00000000:00000000
total_memory : 2038
free_memory : 992
node_to_cpu : node0:0-1
node_to_memory : node0:992
xen_major : 3
xen_minor : 3
xen_extra : .1-9.fc10
xen_caps : xen-3.0-x86_32p
xen_scheduler : credit
xen_pagesize : 4096
platform_params : virt_start=0xf5800000
xen_changeset : unavailable
cc_compiler : gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
cc_compile_by : root
cc_compile_domain : localdomain
cc_compile_date : Fri Mar 6 17:24:19 EET 2009
xend_config_format : 4
[root@dom0test ~]# virsh capabilities
This bit of the logs is interesting..
Wed, 11 Mar 2009 21:58:52 WARNING Non-error from libvirt: 'Failed to find the network: Is the daemon running ?'
Do you have the libvirtd daemon running on this machine ? (eg do service libvirtd start)
Sorry for the delay.. I was away for a while.
It seems libvirtd had crashed.. there was a segfault from libvirtd in /var/log/messages. This segfault could be a problem of pv_ops dom0 kernel, and not libvirtd itself..
I'll have to do some more testing and report back here.
Ok, now I did more testing.
This "XML description for failed to build sexpr error" happens when libvirtd is not running and you run virt-install.
When I created this bz libvirtd was not running because it had unexpectedly crashed with segfault.. which I believe was because of pv_ops dom0 kernel CONFIG_HIGHPTE bug on 32bit machines. So no need worry about that segfault.. I think.
Should that error message be fixed to say 'libvirtd is not running, cannot continue' instead of giving pretty mysterious error? :)
Hmm.. actually now it crashed again:
Mar 23 22:48:55 dom0test kernel: libvirtd: segfault at 62696c00 ip b7e746f5 sp bfa5fd10 error 4 in libvirt.so.0.5.1[b7e1b000+98000]
gdb traceback from libvirtd crash available here:
Also attached to this bz.
It seems to happen when I hit CTRL+C during virt-install execution..
Is that likely caused by (buggy) pv_ops dom0 kernel, or a bug in libvirtd?
Created attachment 336389 [details]
So yeah.. should I create a separate bz about that libvirtd crash issue?
About the original problem in this bz: Would be a good idea to fix the error message to say clearly that libvirtd is not running, instead of giving mysterious "XML description for failed to build sexpr error"..
And also, should I be testing pv_ops dom0 stuff with rawhide instead of F10? :)
Yeah F11 would be nicer, but failing that, at least update to the 0.6.1 libvirt build available in F10 updates-testing, whch may well fix the crash you see
I just upgraded libvirt stuff to 0.6.1 on my F10 dom0 testbox and it fixed a lot of the problems I had!
libvirtd doesn't seem to crash anymore.
AND earlier I had some problems with virt-install stalling instead of opening a console for F10 domU installer.. That works now aswell!
Now I've been able to run CentOS 5.3 PV domU and Fedora 10 PV domU on Fedora 10 pv_ops 2.6.29-rc8 dom0 :) Installing PV domU with virt-install seems to work also.
The PID file problem with libvirtd is still there though with 0.6.1:
[root@dom0test ~]# /etc/init.d/libvirtd start
Starting libvirtd daemon: [ OK ]
When in reality it said:
error : Failed to open pid file '/var/run/libvirtd.pid' : File exists
and didn't start.
But yeah, there's another bz about that libvirtd PID issue:
The original problem of this bz still remains though.. so I guess this bz still has to be open:
if libvirtd is not running print error about it; otherwise virt-install will fail later with "XML description for failed to build sexpr" error.
virt-install doesn't need to print anything in particular.
The problem is in the libvirt Xen driver & the way it converts the XML -> SEXPR. If the daemon is missing, it can't turn this bit:
into a bridge name required by XenD. It reports a nice error about this that clearly explains the problem....
....unfortunately it then overwrites this useful error with the useless message
"XML description for failed to build sexpr
so we need to fix libvirt Xen driver.
Okay, updated the title to reflect the error overwriting problem
Moving to upstream libvirt bugzilla, since it's not a huge issue for Fedora
Created attachment 337324 [details]
Fix error reporting for missing network
Posted fix upstream
Addressed in the 0.6.3 release