vm-bhyve
vm-bhyve copied to clipboard
Purging a borked OS install requires rebooting the entire host
Trying to set up Windows Server and found out that the configuration file is incorrect for it. Went back to edit the file and my VM was in a "locked" state. Couldn't shut it down or stop it, removed the lock and it always says it's running. Killed the processes, restart the vm service, nothing works until I reboot the entire darn host. Also can't even delete the vm without forcing a deletion of the zfs dataset. Is there no simple solution to this?
When you start a VM, vm-bhyve will create a bhyve instance using the VM's name. as you can see, after you start a VM by vm-bhyve, the process will create two like this: (my vm name is xl207)
3611 0- I 0:00.02 /bin/sh /usr/local/sbin/vm _run xl207
3934 0- SC 593:57.50 bhyve: xl207 (bhyve)
When you stop bhyve or kill process id 3934, the vm-bhyve will do the clean up. such as destroy the instance of that VM. Sometimes when process vm-bhyve(3611) is killed or end before bhyve(3934), the VM instance will remain. and you cannot start the same VM anymore unless you destroy that instance by following command
bhyvectl --vm=<VM> --destroy