[BACK]Return to vm.conf CVS log [TXT][DIR] Up to [local] / src / etc / examples

File: [local] / src / etc / examples / vm.conf (download)

Revision 1.11, Thu Nov 11 09:38:14 2021 UTC (2 years, 6 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, HEAD
Changes since 1.10: +2 -3 lines

switch(4) and switchd(8) are retiering. Unhook them from various
configuration files.
OK sthen@ kn@ patrick@

# $OpenBSD: vm.conf,v 1.11 2021/11/11 09:38:14 claudio Exp $

#
# Macros
#
sets="/var/www/htdocs/pub/OpenBSD/snapshots/amd64/"

#
# Virtual machines
#

switch "uplink" {
	# This switch will use bridge0, defined by /etc/hostname.bridge0, as
	# the underlying interface.  veb(4) is also supported
	interface bridge0
}

switch "local" {
	interface bridge1
	down
}

# OpenBSD snapshot install test
vm "openbsd.vm" {
	boot $sets "bsd.rd"

	# First disk from 'vmctl create -s 4G "/home/vm/OpenBSD.img"'
	disk "/home/vm/OpenBSD.img"

	# Second disk from OpenBSD contains the install sets
	disk $sets "install60.img"

	# Interface will show up as tap(4) on the host and as vio(4) in the VM
	interface { switch "uplink" }
	interface { switch "local" }
}

# Another VM that is disabled on startup
vm "vm1.example.com" {
	disable
	memory 1G
	disk "/home/vm/vm1-disk.img"

	# Use a specific tap(4) interface with a hardcoded MAC address
	interface tap3 {
		lladdr 00:11:22:aa:bb:cc
		down
	}
}