bhyve vm-bhyve vm does not start on reboot

dvl@

Developer
I have vm-bhyve-1.5.0 installed on FreeBSD 13.1 - upon reboot, the expected VM is not running.

EDIT: this may be solved via % sudo sysrc vm_list="hass"

After reboot, running this command does not start the VM: sudo service vm start hass

Interesting, the VM I want to start, hass is Locked

Code:
 % sudo vm list
NAME            DATASTORE  LOADER     CPU  MEMORY  VNC  AUTO  STATE
hass            default    uefi       4    4GB     -    No    Locked (slocum.int.unixathome.org)
home-assistant  default    uefi       1    1GB     -    No    Stopped
myguest         default    bhyveload  1    768M    -    No    Stopped

Running this command does start it:

Code:
% sudo vm start hass
Starting hass
  * found guest in /usr/local/vm/hass
  * booting...

After that:

Code:
% sudo vm list
NAME            DATASTORE  LOADER     CPU  MEMORY  VNC  AUTO  STATE
hass            default    uefi       4    4GB     -    No    Running (82614)
home-assistant  default    uefi       1    1GB     -    No    Stopped
myguest         default    bhyveload  1    768M    -    No    Stopped

My settings:

Code:
% grep vm /etc/rc.conf
vm_enable="YES"
vm_dir="zfs:system/vm"

I'm not seeing anything in /var/log/messages to give me a hint. This is a not a newly-arriving problem. As far as I know, I've had this problem since installing vm-bhyve in November.
 
Yes, this is the way it is designed to work. And documented too, I believe. I keep mine in /etc/rc.conf.local, just because I can.
Code:
root@kg-vm3# grep vm_list /etc/rc.conf.local | grep -v "^#"
vm_list="trap2 web web2 music3 proxy wiki2"
 
The host was restarted yesterday and the VM came back.

Code:
[slocum dan ~] % sudo vm list -v                                                                                                                                         16:03:22
NAME            DATASTORE  LOADER     CPU  MEMORY  VNC  AUTO      %CPU       RSZ          UPTIME  STATE
hass            default    uefi       4    4GB     -    Yes [1]    4.9      2.9G        15:29:32  Running (2125)
home-assistant  default    uefi       1    1GB     -    No           -         -               -  Stopped
myguest         default    bhyveload  1    768M    -    No           -         -               -  Stopped
 
i'm experiencing same things. The restarted guest never start itself again. But if started manually: vm start guestmachine the system starts normally

log found in vm-bhyve vm config directory:

Code:
starting bhyve (run 1)
bhyve exited with status 0
restarting
bhyveload -c /dev/nmdm-freebsd_guest.1A -m 16G -e autoboot_delay=3 -d /dev/zvol/zorghost6x14/vm-freebsd-guest-disk0 freebsd_guest
fatal; loader returned error 1
destroying network device tap6
destroying network device tap7
stopped

I have strong feeling that the system after shutdown is till busy finalizing things. The guest machines running from ssd drives has almost never has restart issues.
 
Back
Top