Skip to content

Instantly share code, notes, and snippets.

@kbruner
Created November 3, 2020 06:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kbruner/524520af3d507987d4e546c56de5714c to your computer and use it in GitHub Desktop.
Save kbruner/524520af3d507987d4e546c56de5714c to your computer and use it in GitHub Desktop.
vmrun FreeBSD guest
root@nucklehead:/vm # kldload vmm
root@nucklehead:/vm # ifconfig bridge0 create
root@nucklehead:/vm # ifconfig tap0 create
root@nucklehead:/vm # sysctl net.link.tap.up_on_open=1
net.link.tap.up_on_open: 0 -> 1
root@nucklehead:/vm # ifconfig bridge0 addm em0 addm tap0
root@nucklehead:/vm # ifconfig bridge0 up
root@nucklehead:/vm # dhclient bridge0
DHCPREQUEST on bridge0 to 255.255.255.255 port 67
DHCPACK from 192.168.0.1
bound to 192.168.0.11 -- renewal in 43200 seconds.
root@nucklehead:/vm # truncate -s 2G guest.img
root@nucklehead:/vm # sh /usr/share/examples/bhyve/vmrun.sh -i \
-c 1 -m 1024M \
-t tap0 -d guest.img \
-I images/FreeBSD-11.4-RELEASE-amd64-bootonly.iso \
threedayoldfish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment