FreeBSD 10 PVHVM serial console


[FreeBSD 10.0-RELEASE]( “”) now has Xen PV drivers compiled into the GENERIC kernel. Specifically:

Major enhancements in virtualization, including the addition of bhyve(8), virtio(4), and native paravirtualized drivers providing support for FreeBSD as a guest operating system on Microsoft Hyper-V.

This means we can run it as an HVM Xen DomU, but with the performance of a paravirtualised VM for drivers, etc. We can also have console access, provided we initially install with VNC.

An example HVM configuration to get started:

## FreeBSD-10.cfg for Xen
## Kernel + memory size
kernel = '/usr/lib/xen-4.1/boot/hvmloader'
builder = 'hvm'
memory = '2048'
## Hostname
name = 'FreeBSD-10'
## Disk devices
boot = 'cd'
disk = [ 'phy:/dev/vg1/FreeBSD-10,hda,w',
         'file:/vm/ISO/fbsd10-amd64-d1.iso,hdc:cdrom,r' ]
## Networking
vif  = [ 'mac=<random mac>,bridge=xenbr0' ]
## Features
acpi = 1
apic = 1
## VNC + console
sdl    = 0
vnc    = 1
stdvga = 0
serial = 'pty'

Run the install as normal. After reboot, append this to /etc/rc.conf:


For console access, add the following to /boot/loader.conf:


Then for /etc/ttys, comment out ttyu0 and replace with:

ttyu0 "/usr/libexec/getty std.115200 vt100 on secure

Now you can reboot, and access the console. From your hypervisor:

xm console FreeBSD-10

Or if you’re using the newer toolchain:

xl console FreeBSD-10

Now I want a DEC console.

Author bio and support


Ruben Schade is a technical writer and IaaS engineer in Sydney, Australia who refers to himself in the third person in bios. Wait, not BIOS… my brain should be EFI by now.

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite cloud infrastructure provider.

You can leave me a comment by contacting me, and I might publish your thoughts. Please read the FAQs first though.

If you found this post helpful or entertaining, you can shout me a coffee or buy some silly merch. Thanks!