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

On Ubuntu sudo halt doesn't poweroff the box #575

Closed
marcenuc opened this issue Nov 30, 2011 · 3 comments
Closed

On Ubuntu sudo halt doesn't poweroff the box #575

marcenuc opened this issue Nov 30, 2011 · 3 comments

Comments

@marcenuc
Copy link

I've a box with default installation of Ubuntu server 11.10 configured as explained at http://vagrantup.com/docs/base_boxes.html

It works fine except for the command vagrant halt, which runs sudo halt. This command does a clean shutdown of the operating system, but does not turn off the virtual machine.

The correct command (verified from console) is:

sudo poweroff

this does a clean shutdown AND turns off the box.

@mitchellh
Copy link
Contributor

Actually, I shouldn't really be using halt at all. I'm going to look into what the best suitable/portable option is for shutting down linux but I think its shutdown -h.

@marcenuc
Copy link
Author

marcenuc commented Dec 1, 2011

The following command works for me:

sudo shutdown -h now

However the man page says:

  • -h Requests that the system be either halted or powered off after it has been brought down, with the choice as to which left up to the system.
  • -P Requests that the system be powered off after it has been brought down.

Then it seem that the equivalent of poweroff is shutdown -P now. However -P seems to be less widely supported.

mitchellh added a commit that referenced this issue Dec 11, 2011
@mitchellh
Copy link
Contributor

Using shutdown -h: 99b43fb

Pushed!

@ghost ghost locked and limited conversation to collaborators Apr 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants