FreeBSD as domU

32 views
Skip to first unread message

gernot...@quantumnet.de

unread,
Oct 28, 2006, 6:29:48 PM10/28/06
to Yuan, Jue's Group
Hi,

you did exactly, what I was looking for for a couple of month now - a
FreeBSD kernel as domU for XEN. Great work. Unfortunately I do have
problems to set it up. When I use your xen config file and do a xm
create, I get either the error, that the memory, I specified is to less
for this image (which needs 0xc0c MB - weird size) or - if I set the
memory to something higher that this value, xen tells me, that dom0 is
running ot of memory... Unfortunately I have only 1GB of RAM in this
testing machine...

Any hints? Thanks.

Cheers,

Gernot

chad.k...@gmail.com

unread,
Nov 1, 2006, 10:41:49 PM11/1/06
to Yuan, Jue's Group
gernot...@quantumnet.de wrote:
> When I use your xen config file and do a xm
> create, I get either the error, that the memory, I specified is to less
> for this image (which needs 0xc0c MB - weird size)

To start with, the FreeBSD XenU kernel does not have an adequate
__xen_guest section for Xen 3.0.3. I attempted to add the missing
VIRT_BASE in that section by using objcopy, and that let me boot the VM
booting further, but instead of complaining about memory, it just
crashes.

Your choices are to either downgrade Xen to 3.0.2 or actually fix the
bug(s) and recompile the FreeBSD kernel.

gernot...@quantumnet.de

unread,
Nov 28, 2006, 5:26:23 PM11/28/06
to YUAN Jue's Group
Hi,

actually I thought I was using 3.0.2. But I have to double-check this,
as I might have updated the system at one point... Or are there already
any bugfixes available?

Cheers,

Gernot

Luca Lesinigo

unread,
Dec 28, 2006, 12:54:23 PM12/28/06
to YUAN Jue's Group
Hello there.
I am actually using Xen 3.0.2, with Gentoo Linux as dom0 (and Xen
compiled with Gentoo's Portage), and I'm not able to run Yuan's
freebsd-XENU_INSTALL kernel.
I keep getting "Error: (22, 'Invalid argument')", and I tried with both
a PAE-enabled and a non-PAE Xen 3.0.2 hypervisor.

Any idea?

Yuan, I don't know the details of the SOC, but are you still working on
FreeBSD + Xen ?
Anyway, thank you very much for what you've done.

Luca Lesinigo

unread,
Dec 28, 2006, 9:04:43 PM12/28/06
to YUAN Jue's Group
Luca Lesinigo ha scritto:

> I am actually using Xen 3.0.2, with Gentoo Linux as dom0 (and Xen
> compiled with Gentoo's Portage), and I'm not able to run Yuan's
> freebsd-XENU_INSTALL kernel.
> I keep getting "Error: (22, 'Invalid argument')", and I tried with both
> a PAE-enabled and a non-PAE Xen 3.0.2 hypervisor.
FYI, I just found out that Kip Macy's kernel
(http://www.fsmware.com/xenofreebsd/7.0/) actually does work with my
Xen setup.

chad.k...@gmail.com

unread,
Dec 29, 2006, 10:11:45 PM12/29/06
to YUAN Jue's Group

Luca Lesinigo wrote:
> FYI, I just found out that Kip Macy's kernel
> (http://www.fsmware.com/xenofreebsd/7.0/) actually does work with my
> Xen setup.

Interesting. A little shelll script I put together to try and get Xen
working with Yuan Jue's FreeBSD kernels worked on Kip Macy's kernel,
and I can boot it now on Xen 3.0.3. I didn't even try to think about
trying the older stuff.

For the interested, here's the small script I used that fixes the
__xen_guest section to add the VIRT_BASE that Xen 3.0.3 requires:
----
#!/bin/sh

objcopy $1 -R __xen_guest
echo -n
"LOADER=generic,GUEST_OS=freebsd,GUEST_VER=7.0,XEN_VER=xen-3.0,BSD_SYMTAB,VIRT_BASE=0xC0000000~"
| tr '~' '\000' > __xen_guest
objcopy $1 --add-section __xen_guest=__xen_guest
rm __xen_guest
----

It's a bit of a pity that all interest in Xen on the FreeBSD mailing
lists seems to have died, but many thanks to both Yuan Jue and Kip Macy
for the work they've done.

Luca Lesinigo

unread,
Jan 8, 2007, 2:21:09 PM1/8/07
to YUAN Jue's Group
re Kip's kernel, it _boots_, but as I experienced when trying it some
months ago, it 'fall asleep' after some work. It's strange, the system
more or less seems ok (can login, run top, etc...) but for other things
it just stays there forever (eg., I can't make install stuff from
ports). But I guess that's because it was an old kernel.

I'm using gentoo linux for Dom0, so I can get Xen from portage and I
don't have too much to fiddle around. Right now there is Xen 3.0.2 in
portage, and I'd like to run a freebsd DomU on top of that. Not
'production stuff', but at least something working more or less for an
home system. Yuan's kernel should do the job, if I find a way to make
it load and boot in Xen.

Reply all
Reply to author
Forward
0 new messages