summaryrefslogtreecommitdiff
path: root/etc/examples/vm.conf
blob: 535de76f12e46d92f58471f889081368769af9ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# $OpenBSD: vm.conf,v 1.12 2024/07/12 12:35:32 florian Exp $

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

#
# Virtual machines
#

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

switch "local" {
	interface veb1
	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
	}
}