Set up bhyve for mrmanager.

This commit is contained in:
Tom Alexander 2023-05-28 23:09:36 -04:00
parent e49d008d57
commit 354c6b84ab
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
5 changed files with 14 additions and 18 deletions

View File

@ -23,8 +23,7 @@ jail_list:
enabled: true
conf:
src: nat_dhcp
# bhyve_dataset: zroot/freebsd/release/vm
# bhyve_list: []
# bhyve_canmount: "on"
bhyve_dataset: zdata/vm
bhyve_canmount: "on"
# efi_dev: /dev/gpt/EFI
devfs_rules: "mrmanager_devfs.rules"

View File

@ -0,0 +1 @@
os_flavor: "freebsd"

View File

@ -15,6 +15,12 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Enable Sound
# bhyve_options="-s 16,hda,play=/dev/dsp,rec=/dev/dsp"
# Example usage:
#
# doas bhyve_netgraph_bridge create-disk zdata/vm/poudriere /vm/poudriere 10
# doas bhyve_netgraph_bridge start poudriere zdata/vm/poudriere /vm/poudriere jail_nat 10.215.1.1/24 /vm/iso/FreeBSD-13.2-RELEASE-amd64-bootonly.iso
# doas bhyve_netgraph_bridge start poudriere zdata/vm/poudriere /vm/poudriere jail_nat 10.215.1.1/24
function main {
if [ "$1" = "create-disk" ]; then
shift 1

View File

@ -31,18 +31,3 @@
mountpoint: "{{ bhyve_mountpoint }}"
canmount: "{{ bhyve_canmount|default('noauto') }}"
"ta:bemount": "{{ bhyve_bemount|default('on') }}"
- name: Enable bhyve
community.general.sysrc:
name: "{{ item.name }}"
value: "{{ item.value }}"
path: /etc/rc.conf.d/vm
loop:
- name: vm_enable
value: "YES"
- name: vm_dir
value: "zfs:{{ bhyve_dataset }}"
- name: vm_list
value: "{{ bhyve_list|community.general.json_query('[?enabled==`true`].name')|join(' ') }}"
- name: vm_delay
value: "5"

View File

@ -23,6 +23,11 @@
// unifi controller
"hw-address": "06:40:9f:d7:be:a6",
"ip-address": "10.215.1.202"
},
{
// poudriere
"hw-address": "06:8f:24:d6:21:24",
"ip-address": "10.215.1.203"
}
]
}