From 07eac4e2f39a7387ff3c8d73a88ad446d1c086bd Mon Sep 17 00:00:00 2001 From: reyk <> Date: Mon, 7 Dec 2015 13:58:48 +0000 Subject: [PATCH] Add initial vm.conf(5) example. But please note that the grammar is not fixed yet. --- src/etc/Makefile | 4 ++-- src/etc/examples/vm.conf | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 src/etc/examples/vm.conf diff --git a/src/etc/Makefile b/src/etc/Makefile index 3bfb0c51..7a66f3e3 100644 --- a/src/etc/Makefile +++ b/src/etc/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.417 2015/12/05 09:55:18 jasper Exp $ +# $OpenBSD: Makefile,v 1.418 2015/12/07 13:58:48 reyk Exp $ TZDIR= /usr/share/zoneinfo LOCALTIME= Canada/Mountain @@ -46,7 +46,7 @@ EXAMPLES=chio.conf dhclient.conf dhcpd.conf exports \ EXAMPLES_600=bgpd.conf dvmrpd.conf eigrpd.conf hostapd.conf iked.conf \ ipsec.conf ldapd.conf ldpd.conf ospf6d.conf ospfd.conf pf.conf \ radiusd.conf rc.local rc.securelevel rc.shutdown relayd.conf \ - ripd.conf sasyncd.conf snmpd.conf ypldap.conf + ripd.conf sasyncd.conf snmpd.conf vm.conf ypldap.conf # -r-xr-xr-x RCDAEMONS=amd apmd bgpd bootparamd cron dhcpd dhcrelay dvmrpd eigrpd ftpd \ diff --git a/src/etc/examples/vm.conf b/src/etc/examples/vm.conf new file mode 100644 index 00000000..717a224c --- /dev/null +++ b/src/etc/examples/vm.conf @@ -0,0 +1,34 @@ +# $OpenBSD: vm.conf,v 1.1 2015/12/07 13:58:48 reyk Exp $ + +# +# Macros +# +sets="/var/www/htdocs/pub/OpenBSD/snapshots/amd64/" + +# +# Virtual machines +# + +# OpenBSD snapshot install test +vm "openbsd.vm" { + memory 512M + kernel $sets "bsd.rd" + + # First disk from 'vmctl create "/var/vm/OpenBSD.img" -s 4G' + disk "/var/vm/OpenBSD.img" + + # Second disk from OpenBSD contains the install sets + disk $sets "install58.fs" + + # Interface will show up as tap(4) on the host and as vio(4) in the VM + interfaces 1 +} + +# Another VM that is disabled on startup +vm "vm1.example.com" { + disable + memory 1G + interfaces 2 + kernel "/bsd" + disk "/var/vm/vm1-disk.img" +}