Solved vm-bhyve says vm is already running vm stop says it cannot find the pid

I am experimenting with virtualization on FreeBSD-12.3p5_amd64.

I previously created a vm and started it. I then halted the system. Now I cannot get vm-bhyve to start it as it says :
Code:
Starting vhp3k-01
  * found guest in /zroot/vm/vhp3k-01
  ! guest appears to be running already

However, I cannot stop it either:
Code:
vm stop vhp3k-01
/usr/local/sbin/vm: WARNING: unable to locate process id for vhp3k-01

What do I have to do to be able to restart this vm?
 
I just stumbled over the solution:

Code:
# ll /dev/vmm
total 0
crw-------  1 root  wheel  0xbc Jul 29 15:17 test
crw-------  1 root  wheel  0xc2 Jul 29 15:53 vhp3k-01

bhyvectl --vm=vhp3k-01 --destroy

ll /dev/vmm
total 0
crw-------  1 root  wheel  0xbc Jul 29 15:17 test

vm start vhp3k-01
Starting vhp3k-01
  * found guest in /zroot/vm/vhp3k-01
  * booting...
 
Back
Top