[Bug 242666] Stopped VM cant restart again

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Dec 17 11:01:46 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242666

--- Comment #4 from Bernhard Berger <bernhard at blberger.de> ---
(In reply to Aleksandr Fedorov from comment #1)


root at superserver:/data/bhyve # bhyvectl --get-exit-reason --vm test-pc
VM:test-pc is not created.

root at superserver:/data/bhyve # bhyvectl --destroy --vm test-pc
VM:test-pc is not created.

root at superserver:/data/bhyve # vm start test-pc
Starting test-pc
  * found guest in /data/bhyve/test-pc
  ! guest appears to be running already

root at superserver:/data/bhyve #  ls /dev/vmm
nextcloud       samba           test-pc         unifi

root at superserver:/data/bhyve # ls test-pc
disk0.img       test-pc.conf

root at superserver:/data/bhyve # vm list
NAME       DATASTORE  LOADER     CPU  MEMORY  VNC  AUTOSTART  STATE
nextcloud  default    bhyveload  2    2G      -    Yes [3]    Running (86383)
samba      default    bhyveload  2    2G      -    Yes [2]    Running (15621)
test-pc    default    bhyveload  2    2G      -    No         Stopped
unifi      default    grub       1    2G      -    Yes [1]    Running (15601)


root at superserver:/data/bhyve # ps xaf | grep bhyve
86383  0- SC    450:08.40 bhyve: nextcloud (bhyve)
15601  2- SC     53:29.89 bhyve: unifi (bhyve)
15621  2- IC    207:39.88 bhyve: samba (bhyve)


root at superserver:/data/bhyve # ls /dev | grep nmdm
nmdm-nextcloud.1A
nmdm-nextcloud.1B
nmdm-samba.1A
nmdm-samba.1B
nmdm-unifi.1A
nmdm-unifi.1B

Definitely the VM "test-pc" is not started and cannot be started because:
/dev/vmm/test-pc still exists. 

There must be a way to remove the /dev/vmm/test-pc device.

Just to understand, this is not the first time this problem has occurred, but
since I've been working with bhyve since FreeBSD 11, it's very off. 
It often happens that if you type "reboot" in the guest system (FreeBSD), this
is exactly what happens. If you enter "shutdown -p now" in the guest system
(FreeBSD), it may also happen that the VM cannot be started afterwards. 
 I think it has to do with a non-closed console.

In the past, I solved this by rebooting the host system. But that can't be the
solution and that's why I opened this ticket.


VM list apparently only checks if the process bhyve <vm-name> exists

bhyveload seems to only check if the device /dev/vmm/<vm-name> exists. 

bhyvectl A process "bhyve <vm-name>" must also exist for /dev/vm/<vm-name>. If
the process does not exist, the device must be removed. This should not be so
difficult to program.

Yours sincerely


There is another problem which has to do with VM-BHYVE but how to set a ticket

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-virtualization mailing list