Running OpenBSD on Xen

Here’s the configuration I use to run OpenBSD 4.9-beta on my NetBSD/xen server (NetBSD 5 with Xen 3.3.1).
Since OpenBSD doesn’t provide a Xen-aware kernel, I run it using HVM.

# OpenBSD in HVM mode
#
name = "openbsd"

kernel = "/usr/pkg/lib/xen/boot/hvmloader"
builder='hvm'
device_model = '/usr/pkg/libexec/qemu-dm'

memory = 512

vif = [ 'bridge=bridge0, type=ioemu, model=e1000' ]

#disk = [ 'file:/home/xen/openbsd/disk.img,ioemu:hda,w', 
#       'file:/home/xen/openbsd/cd49.iso,ioemu:hdc:cdrom,r' ]
disk = [ 'file:/home/xen/openbsd/disk.img,ioemu:hda,w' ]

#boot='d'

vnc = 1
vncdisplay = 0
#vncunused = 0
vncpasswd = ""
vnclisten = '192.168.0.20'

usb=0

Here’s how OpenBSD boots:

OpenBSD 4.9-beta (GENERIC.MP) #750: Tue Jan 18 14:23:57 MST 2011
    todd@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Intel(R) Core(TM)2 CPU T7400 @ 2.16GHz ("GenuineIntel" 686-class) 2.18 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,M
MX,FXSR,SSE,SSE2,SSE3,SSSE3,CX16
real mem  = 536403968 (511MB)
avail mem = 517468160 (493MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 06/23/99, BIOS32 rev. 0 @ 0xfa9c0, SMBIOS
rev. 2.4 @ 0xe901f (10 entries)
bios0: vendor Xen version "3.3.1" date 04/18/2009
bios0: Xen HVM domU
acpi0 at bios0: rev 2, ACPI control unavailable
mpbios0 at bios0: Intel MP Specification 1.4
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: unknown i686 model 0x0, can't get bus clock (0x41880000)
cpu0: apic clock running at 99MHz
mpbios0: bus 0 is type ISA
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 11, 48 pins
ioapic0: misconfigured as apic 0, remapped to apid 1
bios0: ROM list: 0xc0000/0x8c00
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
pcib0 at pci0 dev 1 function 0 "Intel 82371SB ISA" rev 0x00
pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA, channel 0 wi
red to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: 
wd0: 16-sector PIO, LBA48, 20480MB, 41943040 sectors
wd0(pciide0:0:0): using PIO mode 0, DMA mode 2
pciide0: channel 1 disabled (no drives)
piixpm0 at pci0 dev 1 function 2 "Intel 82371AB Power" rev 0x01: SMBus disabled
vga1 at pci0 dev 2 function 0 "Cirrus Logic CL-GD5446" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
"XenSource Platform Device" rev 0x01 at pci0 dev 3 function 0 not configured
em0 at pci0 dev 4 function 0 "Intel PRO/1000MT (82540EM)" rev 0x03: apic 1 int 5
 (irq 5), address 00:16:3e:77:35:76
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: density unknown
fd1 at fdc0 drive 1: density unknown
mtrr: Pentium Pro MTRR support
nvram: invalid checksum
vscsi0 at root
scsibus0 at vscsi0: 256 targets
softraid0 at root
root on wd0a swap on wd0b dump on wd0b
clock: unknown CMOS layout

1 Comment

  • xentutorial.com Wed, 27 Apr 2011 13:27:15 +0000 Reply

    Running OpenBSD on Xen…

    Since OpenBSD doesn’t provide a Xen-aware kernel, I. … memory = 512 vif = [ ‘bridge=bridge0, type=ioemu, model=e1000’ ] #disk…

Leave a Reply

%d bloggers like this: