Hello, I've been trying to setup a instance of NetBSD-3.1 on a fc6xen Dom-0 Linux testlab 2.6.18-1.2849.fc6xen #1 SMP Fri Nov 10 12:57:36 EST 2006 x86_64 x86_64 x86_64 GNU/Linux
[root@testlab netbsd]# xm info host : testlab release : 2.6.18-1.2849.fc6xen version : #1 SMP Fri Nov 10 12:57:36 EST 2006 machine : x86_64 nr_cpus : 4 nr_nodes : 1 sockets_per_node : 2 cores_per_socket : 2 threads_per_core : 1 cpu_mhz : 2189 hw_caps : 178bfbff:e3d3fbff: 00000000:00000010:00000001:00000000:00000003 total_memory : 16319 free_memory : 512 xen_major : 3 xen_minor : 0 xen_extra : .3-rc5-1.2849.f xen_caps : xen-3.0-x86_64 xen_pagesize : 4096 platform_params : virt_start=0xffff800000000000 xen_changeset : unavailable cc_compiler : gcc version 4.1.1 20061011 (Red Hat 4.1.1-30) cc_compile_by : brewbuilder cc_compile_domain : build.redhat.com cc_compile_date : Fri Nov 10 12:30:42 EST 2006 xend_config_format : 2
What follows is my process and at the end my errors when I go to 'xm create' the dom-U
## setup storage space for our new netbsd instance
/usr/sbin/lvcreate -L4g -n lvnetbsd31 vg --- Logical volume --- LV Name /dev/vg/lvnetbsd31 [deleted]
#### download the kernels ## I tried both the Oct 31 2006 build and the Jan 6 2007 build of 3.1 from HEAD
## First try at using NetBSD-3.1 distrubution ftp.netbsd.org:/pub/NetBSD/NetBSD-3.1/i386/binary/kernel> -rw-r--r-- 1 1369 netbsd 1762990 Oct 31 05:10 netbsd-XEN3_DOMU.gz -r--r--r-- 1 1369 netbsd 1673944 Oct 31 05:12 netbsd- INSTALL_XEN3_DOMU.gz
[root@testlab netbsd]# openssl dgst md5 netb* MD5(netbsd-INSTALL_XEN3_DOMU)= 68f054de424d9f3b2151a28ab125fc92 MD5(netbsd-XEN3_DOMU)= 5c9c409593ed552e97853f7d34539623
## Second Try at this using the HEAD distrubtion ftp.netbsd.org:/pub/NetBSD/NetBSD-daily/HEAD/200701040000Z/i386/ binary/kernel>
MD5(netbsd-INSTALL_XEN3_DOMU)= c80ab0a7bda7617a936a3f3244b86a8a MD5(netbsd-XEN3_DOMU)= eb7483c4604c6c57615d94ce4b078d7f
[root@testlab netbsd]# file * netbsd-INSTALL_XEN3_DOMU: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for NetBSD 4.99.7, not stripped netbsd-XEN3_DOMU: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for NetBSD 4.99.7, not stripped
####
Simple configuration
[root@testlab netbsd]# cat /etc/xen/netbsd.cfg # main configuration name = "netbsd31" kernel = "/data/xenimages/netbsd/netbsd-INSTALL_XEN3_DOMU" root="/dev/hda1" memory = 512 disk = [ 'phy:/dev/vg/lvnetbsd31,0x3,w' ]
#network information ip = "10.10.80.60" netmask = "255.255.255.0" gateway = "10.10.80.1"
#####
[root@testlab netbsd]# cp netbsd.cfg /etc/xen/netbsd.cfg
[root@testlab netbsd]# xm create -c /etc/xen/netbsd.cfg Using config file "/etc/xen/netbsd.cfg". Error: (22, 'Invalid argument')
## xend.log output [2007-01-09 11:45:05 xend.XendDomainInfo 2291] DEBUG (XendDomainInfo: 190) XendDomainInfo.create(['vm', ['name', 'netbsd31'], ['memory', 512], ['vcpus', 1], ['image', ['linux', ['kernel', '/data/xenimages/ netbsd/netbsd-INSTALL_XEN3_DOMU'], ['ip', '10.10.80.60:1.2.3.4:10.10.80.1:255.255.255.0::eth0:off'], ['root', '/ dev/hda1'], ['vncunused', 1], ['xauthority', '/root/.Xauthority']]], ['device', ['vbd', ['uname', 'phy:/dev/vg/lvnetbsd31'], ['dev', '0x3'], ['mode', 'w']]]]) [2007-01-09 11:45:05 xend.XendDomainInfo 2291] DEBUG (XendDomainInfo: 296) parseConfig: config is ['vm', ['name', 'netbsd31'], ['memory', 512], ['vcpus', 1], ['image', ['linux', ['kernel', '/data/xenimages/ netbsd/netbsd-INSTALL_XEN3_DOMU'], ['ip', '10.10.80.60:1.2.3.4:10.10.80.1:255.255.255.0::eth0:off'], ['root', '/ dev/hda1'], ['vncunused', 1], ['xauthority', '/root/.Xauthority']]], ['device', ['vbd', ['uname', 'phy:/dev/vg/lvnetbsd31'], ['dev', '0x3'], ['mode', 'w']]]] [2007-01-09 11:45:05 xend.XendDomainInfo 2291] DEBUG (XendDomainInfo: 395) parseConfig: result is {'shadow_memory': None, 'uuid': None, 'on_crash': None, 'on_reboot': None, 'localtime': None, 'image': ['linux', ['kernel', '/data/xenimages/netbsd/netbsd- INSTALL_XEN3_DOMU'], ['ip', '10.10.80.60:1.2.3.4:10.10.80.1:255.255.255.0::eth0:off'], ['root', '/ dev/hda1'], ['vncunused', 1], ['xauthority', '/root/.Xauthority']], 'on_poweroff': None, 'bootloader_args': None, 'cpus': None, 'name': 'netbsd31', 'backend': [], 'vcpus': 1, 'cpu_weight': None, 'features': None, 'vcpu_avail': None, 'memory': 512, 'device': [('vbd', ['vbd', ['uname', 'phy:/dev/vg/lvnetbsd31'], ['dev', '0x3'], ['mode', 'w']])], 'bootloader': None, 'cpu': None, 'maxmem': None} [2007-01-09 11:45:05 xend.XendDomainInfo 2291] DEBUG (XendDomainInfo: 1253) XendDomainInfo.construct: None [2007-01-09 11:45:05 xend.XendDomainInfo 2291] DEBUG (XendDomainInfo: 1285) XendDomainInfo.initDomain: 21 1.0 [2007-01-09 11:45:05 xend 2291] INFO (image:214) configuring linux guest [2007-01-09 11:45:06 xend 2291] DEBUG (balloon:127) Balloon: 525000 KiB free; need 524288; done. [2007-01-09 11:45:06 xend 2291] INFO (image:138) buildDomain os=linux dom=21 vcpus=1 [2007-01-09 11:45:06 xend 2291] DEBUG (image:193) dom = 21 [2007-01-09 11:45:06 xend 2291] DEBUG (image:194) image = / data/xenimages/netbsd/netbsd-INSTALL_XEN3_DOMU [2007-01-09 11:45:06 xend 2291] DEBUG (image:195) store_evtchn = 1 [2007-01-09 11:45:06 xend 2291] DEBUG (image:196) console_evtchn = 2 [2007-01-09 11:45:06 xend 2291] DEBUG (image:197) cmdline = ip=10.10.80.60:1.2.3.4:10.10.80.1:255.255.255.0::eth0:off root=/dev/hda1 [2007-01-09 11:45:06 xend 2291] DEBUG (image:198) ramdisk = [2007-01-09 11:45:06 xend 2291] DEBUG (image:199) vcpus = 1 [2007-01-09 11:45:06 xend 2291] DEBUG (image:200) features = [2007-01-09 11:45:06 xend.XendDomainInfo 2291] ERROR (XendDomainInfo: 202) Domain construction failed Traceback (most recent call last): File "/usr/lib64/python2.4/site-packages/xen/xend/ XendDomainInfo.py", line 195, in create vm.initDomain() File "/usr/lib64/python2.4/site-packages/xen/xend/ XendDomainInfo.py", line 1363, in initDomain raise VmError(str(exn)) VmError: (22, 'Invalid argument')
### xend-debug.log output ## ERROR: Kernel not a Xen-compatible Elf image. ERROR: Error constructing guest OS ERROR: Kernel not a Xen-compatible Elf image. ERROR: Error constructing guest OS ERROR: Kernel not a Xen-compatible Elf image. ERROR: Error constructing guest OS
On Tue, Jan 09, 2007 at 04:24:03PM -0600, Timothy D. Keanini Sr. wrote:
Hello, I've been trying to setup a instance of NetBSD-3.1 on a fc6xen Dom-0 Linux testlab 2.6.18-1.2849.fc6xen #1 SMP Fri Nov 10 12:57:36 EST 2006 x86_64 x86_64 x86_64 GNU/Linux
# main configuration name = "netbsd31" kernel = "/data/xenimages/netbsd/netbsd-INSTALL_XEN3_DOMU" root="/dev/hda1" memory = 512 disk = [ 'phy:/dev/vg/lvnetbsd31,0x3,w' ]
#network information ip = "10.10.80.60" netmask = "255.255.255.0" gateway = "10.10.80.1"
#####
[root@testlab netbsd]# cp netbsd.cfg /etc/xen/netbsd.cfg
[root@testlab netbsd]# xm create -c /etc/xen/netbsd.cfg Using config file "/etc/xen/netbsd.cfg". Error: (22, 'Invalid argument')
This basically says your kernel image is invalid
### xend-debug.log output ## ERROR: Kernel not a Xen-compatible Elf image. ERROR: Error constructing guest OS ERROR: Kernel not a Xen-compatible Elf image. ERROR: Error constructing guest OS ERROR: Kernel not a Xen-compatible Elf image. ERROR: Error constructing guest OS
This confirms that the kernel image you're trying to boot is incompatible with your host OS.
Are you sure that
/data/xenimages/netbsd/netbsd-INSTALL_XEN3_DOMU
Is a kernel image, and not a virtual disk image ? If it really is a krenel image, make sure it is the same architecture as your dom0 - ie x86_64.
Regards, Dan.
Timothy D. Keanini Sr. wrote:
<snip>
[root@testlab netbsd]# cp netbsd.cfg /etc/xen/netbsd.cfg
[root@testlab netbsd]# xm create -c /etc/xen/netbsd.cfg Using config file "/etc/xen/netbsd.cfg". Error: (22, 'Invalid argument')
<snip>
### xend-debug.log output ## ERROR: Kernel not a Xen-compatible Elf image. ERROR: Error constructing guest OS ERROR: Kernel not a Xen-compatible Elf image. ERROR: Error constructing guest OS ERROR: Kernel not a Xen-compatible Elf image. ERROR: Error constructing guest OS
Yes, I have run into the same thing. The problem is that NetBSD doesn't have a PAE enabled kernel available, and FC6 is compiled to use PAE. Unfortunately, you are probably out of luck unless:
1) You recompile the FC6 kernel and HV to be non-PAE. It's fairly straightforward, but the problem then is that your other FC6 guests won't work (because then you will have non-PAE dom0, but PAE guests).
2) Find someone willing to make NetBSD use PAE.
There are also some bimodal (meaning that both PAE and non-PAE guests would work on a PAE dom0) patches going into upstream Xen, but I'm not sure if we would put those into FC6 (or they would wait for FC7 or later).
Chris Lalancette
On 1/9/07, Chris Lalancette clalance@redhat.com wrote:
You recompile the FC6 kernel and HV to be non-PAE. It's fairly straightforward, but the problem then is that your other FC6 guests won't work (because then you will have non-PAE dom0, but PAE guests).
Find someone willing to make NetBSD use PAE.
There are also some bimodal (meaning that both PAE and non-PAE guests would work on a PAE dom0) patches going into upstream Xen, but I'm not sure if we would put those into FC6 (or they would wait for FC7 or later).
3) Use Xen Binaries from XenSource, which provide a selection.
4) Use another distribution as dom0 - SuSE and Debian let you chose if you want PAE or not. This is for sure only a solution when you don't need PAE :)
Best solution would be really if the NetBSD team could upload two versions of their kernels, so everybody can use them...
I also had this problem, but I remember in one of the logfiles there was actually an error message telling something useful like "non-PAE kernel on PAE host" something like that.
Henning