Browse Source

Add support for enhanced networking configuration and virtual switches.

See vm.conf(5) for more details.
OK mlarkin@
OPENBSD_6_1
reyk 8 years ago
parent
commit
3cf60d9933
1 changed files with 23 additions and 4 deletions
  1. +23
    -4
      src/etc/examples/vm.conf

+ 23
- 4
src/etc/examples/vm.conf View File

@ -1,4 +1,4 @@
# $OpenBSD: vm.conf,v 1.4 2016/01/06 09:59:30 reyk Exp $
# $OpenBSD: vm.conf,v 1.5 2016/10/05 17:30:13 reyk Exp $
# #
# Macros # Macros
@ -9,6 +9,19 @@ sets="/var/www/htdocs/pub/OpenBSD/snapshots/amd64/"
# Virtual machines # Virtual machines
# #
switch "wired" {
# This interface will default to bridge0, but switch(4) is supported
#interface switch0
# Add additional members
add em0
down
}
switch "wireless" {
add iwm0
}
# OpenBSD snapshot install test # OpenBSD snapshot install test
vm "openbsd.vm" { vm "openbsd.vm" {
memory 512M memory 512M
@ -18,17 +31,23 @@ vm "openbsd.vm" {
disk "/home/vm/OpenBSD.img" disk "/home/vm/OpenBSD.img"
# Second disk from OpenBSD contains the install sets # Second disk from OpenBSD contains the install sets
disk $sets "install59.fs"
disk $sets "install60.fs"
# Interface will show up as tap(4) on the host and as vio(4) in the VM # Interface will show up as tap(4) on the host and as vio(4) in the VM
interfaces 1
interface { switch "wireless" }
interface { switch "wired" }
} }
# Another VM that is disabled on startup # Another VM that is disabled on startup
vm "vm1.example.com" { vm "vm1.example.com" {
disable disable
memory 1G memory 1G
interfaces 2
kernel "/bsd" kernel "/bsd"
disk "/home/vm/vm1-disk.img" 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
}
} }

Loading…
Cancel
Save