home · projects · papers · blog · gallery · contact
anil madhavapeddy // anil.recoil.org

OpenBSD/Xen boots multi-user

21 August 2006   |   Anil Madhavapeddy   |   tags:   |   all posts

I’ve been mentoring a few Xen projects as part of the Google Summer of Code program. One of the most fun is the OpenBSD/Xen porting effort which Christoph Egger has been hacking on. As of a few days ago, if you clone the Mercurial repository for the project, openbsd-xen-sys.hg, and build the kernel with with the i386 bsd.rd, you get the thrill of the following boot log:

[avsm@kremlin ~]$ sudo xm create -c openbsd
Using config file "/etc/xen/openbsd".
Started domain OpenBSD
[ using 187532 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2006 OpenBSD. All rights reserved.  http://www.OpenBSD.org

OpenBSD 4.0-beta (RAMDISK_XENU) #0: Mon Aug 21 14:59:09 BST 2006
    root@mortar.cl.cam.ac.uk:/usr/src/sys/arch/xen/compile/ RAMDISK_XENU
cpu0: Genuine Intel(R) CPU 3.00GHz ("GenuineIntel" 686-class) 3 GHz
cpu0: EST: unknown system bus clock
real mem  = 62554112 (61088K)
avail mem = 55603200 (54300K)
using 789 buffers containing 3231744 bytes (3156K) of memory
mainbus0 (root)
cpu0 at mainbus0
hypervisor0 at mainbus0
debug virtual interrupt using event channel 3
xenbus0 at hypervisor0: Xen Virtual Bus Interface
xencons0 at hypervisor0: Xen Virtual Console Driver
xencons0: console major 86, unit 0
xencons0: using event channel 2
npx0 at hypervisor0: using exception 16
Xen clock: using event channel 4
rd0: fixed, 3800 blocks
xenbus0: using event channel 1
xennet0 at xenbus0 id 0: Xen Virtual Network Interface
xennet0: MAC address 00:16:3e:05:83:11
xennet0: using event channel 5
root on rd0a
rootdev=0x1100 rrootdev=0x2f00 rawdev=0x2f02
erase ^?, werase ^W, kill ^U, intr ^C, status ^T
(I)nstall, (U)pgrade or (S)hell? 

Christoph has done a superb job of porting the NetBSD/Xen code over to OpenBSD. There are still a few bugs to be worked out in the networking driver, the virtual block driver to finish up, and the rather more messy job of getting the user-land tools to run if we want an OpenBSD dom0. But this initial booting is fantastic to see!

A final nice teaser from the console shell:

# ifconfig -a
lo0: flags=8008<LOOPBACK,MULTICAST> mtu 33224
        groups: lo
pflog0: flags=0<> mtu 33224
pfsync0: flags=0<> mtu 1460
        groups: carp
enc0: flags=0<> mtu 1536
        lladdr 00:16:3e:05:83:11
        media: Ethernet autoselect (autoselect)
blog comments powered by Disqus