vm-bhyve
vm-bhyve copied to clipboard
Need a way to set autostart at the command line instead of rc.conf
There should be a way to set autostart on the command line. Similarly, there should be a way to globally set autostart.
Yes, it must be configured over config, not rc.conf or maybe both ways.
Hello!
It's just а simple in the BSD world.
bhv01# vm list
NAME DATASTORE LOADER CPU MEMORY VNC AUTOSTART STATE
dns-test default bhyveload 16 4G - No Stopped
bhv01# cat /etc/rc.conf.d/vm
vm_enable="YES"
vm_dir="zfs:pool/vm"
vm_list="$(ls /usr/local/etc/bhyve-auto)"
bhv01# ls -l /usr/local/etc/bhyve-auto/
total 0
bhv01# touch /usr/local/etc/bhyve-auto/dns-test
bhv01# ls -l /usr/local/etc/bhyve-auto/
total 0
-rw-r--r-- 1 root wheel 0 Dec 20 11:10 dns-test
bhv01# vm list
NAME DATASTORE LOADER CPU MEMORY VNC AUTOSTART STATE
dns-test default bhyveload 16 4G - Yes [1] Stopped