OpenBSD XEN/PVHVM guest

Requirements

mkdir /data/kernels/obsd/
cd /data/kernels/obsd/
wget https://mirror.yandex.ru/openbsd/6.6/amd64/install66.iso
#wget https://ftp.fr.openbsd.org/pub/OpenBSD/6.6/amd64/install66.iso
dd if=/dev/zero of=$guest.raw bs=1G count=0 seek=50

mkdir /data/guests/obsd/
cd /data/guests/obsd/
dd if=/dev/zero of=obsd.raw bs=1G count=0 seek=5
vi obsd

vnc = 1
vnclisten = "0.0.0.0"
vncpasswd = "PASSWORD"
boot = "cd"

#nographics = 1
#serial = "pty"
type = "hvm"
name = "obsd"
memory = 1024
vcups = 4
disk = ['tap:tapdisk:aio:/data/guests/obsd/obsd.raw,xvda,w',
        'tap:tapdisk:aio:/data/kernels/obsd/install66.iso,xvdb:cdrom,r']
vif = [ 'bridge=xenbr0, vifname=obsd.0' ]
on_crash = "preserve"

Ready to go for VNC

netstat -lntupe | grep -i qemu

vncviewer x.x.x.x:5900

guest install

Custom layout
p
a ENTER ENTER...
/
w
x

into the guest

cd /etc/
vi boot.conf #new file

set tty com0

cp -pi ttys ttys.dist
vi ttys

tty00 "/usr/libexec/getty std.9600" vt220 on secure

Ready to go for console

switch back to console from the host

cd /data/guests/obsd/
vi obsd

#vnc = 1
#vnclisten = "0.0.0.0"
#vncpasswd = "PASSWORD"
#boot = "cd"

nographics = 1
serial = "pty"

TEMP

X11 forwarding

could be useful if something replaces SDL – there is GTK mode now?

On a Slackware Dom0

slackpkg update
slackpkg install x
slackpkg search xclock
slackpkg search xauth
vi /etc/ssh/sshd_config

#SDL XEN GUEST
X11Forwarding yes

sshd -t && echo ok
rc.sshd restart

Then reach the host remotely with X11

ssh DOM0 -Y xclock #should work
ssh DOM0 -X xclock #should work
ssh DOM0 xclock #should fail

TRASH

    'tap:tapdisk:aio:/data/ISO-IMAGES/install63.iso,xvdb:cdrom,r']
    #'file:/data/ISO-IMAGES/install63.iso,hdc:cdrom,r']

Resources

pvhvm

OpenBSD support for Xen Project https://wiki.xen.org/wiki/OpenBSD

DomU Support for Xen https://wiki.xen.org/wiki/DomU_Support_for_Xen

OpenBSD 5.9 https://www.openbsd.org/59.html

Xen Linux PV on HVM drivers https://wiki.xen.org/wiki/Xen_Linux_PV_on_HVM_drivers

xl.cfg - xl domain configuration file syntax https://xenbits.xen.org/docs/unstable/man/xl.cfg.5.html

was hvm?

[Xen-users] OpenBSD HVM networking misbehaves with Xen4 https://lists.xen.org/archives/html/xen-users/2011-06/msg00489.html

avoid pxe

Setting boot order for domUs https://wiki.xenproject.org/wiki/Setting_boot_order_for_domUs

serial

OpenBSD FAQ - Keyboard and Display Controls https://www.openbsd.org/faq/faq7.html

boot, boot.conf — amd64-specific second-stage bootstrap https://man.openbsd.org/boot.8

com — serial communications interface https://man.openbsd.org/com.4

OpenBSD: Setup a Serial Console https://www.cyberciti.biz/faq/openbsd-connect-serial-console/

Xen Serial Console https://wiki.xenproject.org/wiki/Xen_Serial_Console


HOME | GUIDES | BENCHMARKS | html