Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to stop vm in Bootloader state #22

Closed
36roentgen opened this issue Nov 2, 2015 · 2 comments
Closed

Unable to stop vm in Bootloader state #22

36roentgen opened this issue Nov 2, 2015 · 2 comments

Comments

@36roentgen
Copy link

# vm stop ns1
/usr/local/sbin/vm: ERROR: unable to locate process id for this virtual machine
root@bhyve1:/usr/local/bhyve # vm list
NAME            GUEST           CPU    MEMORY    AUTOSTART    STATE               
ns1             freebsd         2      512M      No           Bootloader (11691)  
ns2             freebsd         1      256M      No           Stopped             
ns_master       freebsd         1      512M      Yes [1]      Running (10604)     
owncloud_demo   freebsd         2      1024M     Yes [3]      Running (6013)      
pg              freebsd         4      4096M     Yes [2]      Running (2012)      
root@bhyve1:/usr/local/bhyve # ps aux |grep 11691
root  11691  100.0  0.0  553440   3884  3  R     1:13AM     0:41.21 bhyveload -c /dev/nmdm3A -m 512M -d /usr/local/bhyve/vm/ns1/ns1 ns1
@churchers
Copy link
Owner

Yes, normally vm stop is only used to stop the actual bhyve process once the guest is running. It sends a ACPI power button event to the guest (sends a TERM signal to bhyve) which should cause it to shutdown and power itself off like a normal machine.

Normally of course, I would hope that the guest would not get stuck in the bootloader stage. This usually means the guest has been started with vm start before being installed, or something has gone wrong...

I have modified this function so that now, if it can't find a running bhyve process, it will look for a bootloader. If it finds a running bootloader it will ask if you want to force the machine off. Previously you would need to kill the bhyveload or grub-bhyve process manually.

@36roentgen
Copy link
Author

Works well, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants