Last active
July 15, 2023 10:23
-
-
Save trytuna/be3ce913181da65ec30a5adf7c6c45ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/churchers/vm-bhyve/wiki | |
pkg install vm-bhyve grub2-bhyve | |
zfs create zroot/vm | |
echo 'vm_enable="YES"' >> /etc/rc.conf | |
echo 'vm_dir="zfs:zroot/vm"' >> /etc/rc.conf | |
vm init | |
cp /usr/local/share/examples/vm-bhyve/* /zroot/vm/.templates/ | |
vm switch create public | |
vm switch add public em0 | |
vm iso http://cdimage.debian.org/debian-cd/8.6.0/amd64/iso-cd/debian-8.6.0-amd64-netinst.iso | |
vm create -t debian myguest | |
vm -f install myguest debian-8.6.0-amd64-netinst.iso | |
# set grub dir | |
sed -i 's/\/grub/\/boot\/grub/' /zroot/vm/myguest/myguest.conf | |
# enable autostart | |
echo 'vm_list="myguest"' >> /etc/rc.conf | |
echo 'vm_delay="5"' >> /etc/rc.conf | |
vm start myguest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment