Re: FreeBSD-amd64 in Xen 4.0?

2011-01-20 Thread Martin Cracauer
Janne Snabb wrote on Thu, Jan 20, 2011 at 02:56:28PM +: 
> On Thu, 20 Jan 2011, Martin Cracauer wrote:
> 
> > Just to be clear: the disk file has to be a whole disk, with
> > partitions, right? hvmloader would then proceed through the regular
> > bootloaders in the boot sector?
> 
> Short answer: yes.

Thanks again.

I think I'll stay with PV for now and if I want amd64/HVM I'll go the
PXE boot route.  I didn't try Xen's PXE support but it sounds much
more attractive than having a BSD-labeled and BSD-filesystemed vnode
file floating around in the Linux dom0.  Plus I already have a PXE
boot environment for all these guests.

Martin
-- 
%%%
Martin Cracauerhttp://www.cons.org/cracauer/
___
freebsd-xen@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"


Re: FreeBSD-amd64 in Xen 4.0?

2011-01-20 Thread Janne Snabb
On Thu, 20 Jan 2011, Martin Cracauer wrote:

> Just to be clear: the disk file has to be a whole disk, with
> partitions, right? hvmloader would then proceed through the regular
> bootloaders in the boot sector?

Short answer: yes.

Anything that should work on a real machine should work as the disk
image of a Xen HVM instance. The simplest way is to run the sysinstall
tool from an installation ISO that you attach to your virtual
machine. It will create MBR partition table and BSD disklabel for
you as well as install the required boot blocks/loaders.

You could alternatively do the same steps manually, using mdconfig
to attach your (empty) disk image file to an existing FreeBSD box
as a virtual disk and do the required steps with tools such as
fdisk, gpart, boot0cfg, disklabel, newfs, etc. and then move that
image file to your Xen machine.

You could also use a hard disk from an existing FreeBSD machine (a
real one), attach that disk to another machine (or boot from USB
stick) and read the whole hard disk image with dd or similar tool
and use that as the virtual disk for the Xen HVM instance.

--
Janne Snabb / EPIPE Communications
sn...@epipe.com - http://epipe.com/
___
freebsd-xen@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"


Re: FreeBSD-amd64 in Xen 4.0?

2011-01-20 Thread Martin Cracauer
Janne Snabb wrote on Thu, Jan 20, 2011 at 05:07:57AM +: 
> On Thu, 20 Jan 2011, Janne Snabb wrote:
> 
> > I am not sure if this is the cause of your problem though, but your
> > configuration might create an environment which is not suitable for
> > the HVM kernel to run.
> 
> Martin,
> 
> I tried this out with Xen 4.0.1 and had the same effect as you:
> "Xend died due to signal 11!" if I attempted loading the XENHVM
> kernel with kernel = "/within/dom0/path/to/freebsd/kernel" in xen
> config.
> 
> With kernel = "/path/to/hvmloader" things work fine (the FreeBSD
> kernel and boot loader residing within the virtual disk of the
> virtual machine, the same way as it would be on a physical machine).
> This is the proper way to use the amd64 XENHVM kernel.

Thanks for the update.

Just to be clear: the disk file has to be a whole disk, with
partitions, right? hvmloader would then proceed through the regular
bootloaders in the boot sector?

Martin
-- 
%%%
Martin Cracauerhttp://www.cons.org/cracauer/
___
freebsd-xen@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"


Re: FreeBSD-amd64 in Xen 4.0?

2011-01-19 Thread Janne Snabb
On Thu, 20 Jan 2011, Janne Snabb wrote:

> I am not sure if this is the cause of your problem though, but your
> configuration might create an environment which is not suitable for
> the HVM kernel to run.

Martin,

I tried this out with Xen 4.0.1 and had the same effect as you:
"Xend died due to signal 11!" if I attempted loading the XENHVM
kernel with kernel = "/within/dom0/path/to/freebsd/kernel" in xen
config.

With kernel = "/path/to/hvmloader" things work fine (the FreeBSD
kernel and boot loader residing within the virtual disk of the
virtual machine, the same way as it would be on a physical machine).
This is the proper way to use the amd64 XENHVM kernel.

Best Regards,
--
Janne Snabb / EPIPE Communications
sn...@epipe.com - http://epipe.com/
___
freebsd-xen@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"


Re: FreeBSD-amd64 in Xen 4.0?

2011-01-19 Thread Janne Snabb
On Wed, 19 Jan 2011, Martin Cracauer wrote:

> I anyone able to run a amd64 FreeBSD guest in the Xen-4.0 that ships
> with Debian-Squeeze? Dom0 is Debian's 2.6.32.25 Xen kernel.  Hardware
> is a Phenom II.

My all test configurations are different...

> I get a sig11 in xend.
> 
> I compiled XENHVM on FreeBSD-9.0-current as of Jan 10.  I am using
> this Xen config file just to test booting the kernel:
> 
> kernel = '/home/xen/boot/freebsd-amd64-90current-2011019-kernel'
> memory = '256'
> name = 'freebsd'
> builder = 'hvm'
> 
> (the builder= line is required, otherwise the python script doesn't
> recognize the kernel as a valid kernel)

...but my understanding is that with HVM mode you normally have:

kernel = "/usr/lib/xen/boot/hvmloader"

...(or similar) and the kernel gets loaded by the normal boot loader
which is launched by hvmloader from the virtual machine's disk. In
PV mode (builder = 'linux' which is the default) the kernel is
loaded with the "kernel" configuration line unless py-grub or similar
is in use.

I am not sure if this is the cause of your problem though, but your
configuration might create an environment which is not suitable for
the HVM kernel to run. Note that amd64 XENHVM kernel is a HVM kernel
(similar to GENERIC) with just additional support for XEN-specific
PV drivers while the VM otherwise runs in HVM mode.

PV kernel is only available for i386 (XEN kernel config file). That
kernel should be loaded as you do now, but with "builder = 'linux'".

Does it make a difference if you boot your VM from a normal (GENERIC
amd64) installation ISO, install the system as usual to a virtual
hard disk and then install the XENHVM kernel there? You will need
to use VNC console briefly during installation until you can switch
to using serial console.

Best Regards,
--
Janne Snabb / EPIPE Communications
sn...@epipe.com - http://epipe.com/
___
freebsd-xen@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"