vm-bhyve icon indicating copy to clipboard operation
vm-bhyve copied to clipboard

Need a way to set autostart at the command line instead of rc.conf

Open 4ad opened this issue 5 years ago • 2 comments

There should be a way to set autostart on the command line. Similarly, there should be a way to globally set autostart.

4ad avatar Nov 19 '19 15:11 4ad

Yes, it must be configured over config, not rc.conf or maybe both ways.

mlavkin avatar Nov 20 '19 17:11 mlavkin

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

lvasiliev avatar Dec 20 '19 08:12 lvasiliev