Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Apr 2010 21:17:53 +0200
From:      Juergen Lock <nox@jelal.kn-bremen.de>
To:        Xiaodong Yi <xdong.yi@gmail.com>, freebsd-emulation@FreeBSD.org
Subject:   Testing Luvalley with FreeBSD as dom0
Message-ID:  <20100418191752.GA72730@triton8.kn-bremen.de>

next in thread | raw e-mail | index | archive | help
Hi!

 I had been watching the Luvalley project for a while,

	http://sourceforge.net/projects/luvalley/files/
	http://sunet.dl.sourceforge.net/project/luvalley/luvalley/luvalley-7/README
	http://www.mail-archive.com/kvm@vger.kernel.org/msg11896.html

and a few weeks ago I was able to run Linux and FreeBSD domU.s on a
Linux dom0 on my box for the first time, and then I ported a version
of qemu-kvm 0.12.3 that Xiaodong Yi (Luvalley author) had adapted to
Luvalley to FreeBSD and got that running domU.s with FreeBSD as dom0 too. :)

 At the moment Luvalley still has major issues and is far from being
production-ready yet, but for FreeBSD users who want have a look for
themselves I've now made an experimental port of the mentioned
qemu-kvm-luvalley 0.12.3:

	http://people.freebsd.org/~nox/qemu/luvalley/qemu-kvm-luvalley-0.12.3.shar

 If you want to test it without deinstalling a qemu port you can build
the port with DISABLE_CONFLICTS=yes and run the Luvalley qemu-kvm from
within the build dir:

	work/qemu-kvm-0.12.3/x86_64-softmmu/qemu-system-x86_64 ...
resp.
	work/qemu-kvm-0.12.3/i386-softmmu/qemu ...

 And before I forget, your cpu needs to be amd64/x86_64/em64t (i.e.,
able to run 64 bit) and it needs to have Intel VT or AMD-V aka vmx or svm.
I only tested amd64 dom0s (Linux and FreeBSD stable/8), but afaik i386
dom0s are supported as well.  And this is still experimental code, it
may crash, eat your dog, whatever...

 Here is the pkg-descr:

Luvalley is a lightweight type-1 Virtual Machine Monitor (VMM) with
novel architecture, to enable any OS to run virtual machines by utilizing
hardware virtualization extensions such as Intel VT and AMD-V.

This is an experimental port of qemu-kvm adapted to Luvalley by
Xiaodong Yi (Luvalley author - files/patch-luvalley) and preliminary
patched for FreeBSD my me (nox, files/patch-z-kvm-bsd) so that FreeBSD
can run domU (guests) using Luvalley.  Luvalley still has many limitations
and is definitely far from being production-ready, but it already seems
to be able to run domUs partway faster than kqemu with -kernel-kqemu. :)
(and also works better than kqemu for amd64 domUs.)

Note:  You need grub to boot the Luvalley `kernel',

	http://sourceforge.net/projects/luvalley/files/luvalley/luvalley-7/luvalley/download

which (hopefully) will then boot the first disk again from which you
_then_ select the FreeBSD slice for booting the FreeBSD loader and
kernel to run as Luvalley dom0 if you want to test this port.  More info
is here:

	http://sunet.dl.sourceforge.net/project/luvalley/luvalley/luvalley-7/README

Since FreeBSD users rarely have a grub installed I've made a grub iso
with a menu.lst configured to boot the Luvalley `kernel' from /boot/luvally
on the root of the first FreeBSD slice on the first disk (if your FreeBSD
install is elsewhere you have to either edit the grub menu entry on the fly
using grub's `e'dit command or unpack the iso using e.g. bsdtar, edit the
menu.lst, and then make a new iso, see the README.txt within the iso.)

	http://people.freebsd.org/~nox/qemu/luvalley/grub-luvalley.iso

If you have a working serial port (`COM1' aka /dev/tty[du]0) you can try
to catch Luvalley's debug messages (115200bps, 8N1), this is especially
useful should Luvally crash, otherwise there's probably no chance to
fix the bug.  One known crash at the moment happens when Luvalley runs
out of ioctl object slots of which by default there are only 32
("IOCTL_SIZE" in the Luvalley source, I haven't tried to build that on
FreeBSD yet) and atm they never get released so in practice for the moment
you should reboot your dom0 (FreeBSD) after running a few domUs to avoid
that crash.  Another known problem is atm when a domU shuts down the
luvally qemu will hang and you have to manually kill it.

WWW: http://sourceforge.net/projects/luvalley/files/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100418191752.GA72730>