How to gracefully end Vagrant?

Hi,

Running into multiple issues when starting OH2 I thought of contributing to the documentation.
On https://github.com/openhab/openhab-docs, using vagrant is explained and I very much liked that. So I am using that on my windows laptop.

Unfortunately I do not seem to be able to stop vagrant in a “normal way”.
This is what I tried. Note that after pressing control-c (as stated in the message) I waited a full night…

Hope someone has an answer…

Cheers,

Dries

`D:\openhab-docs>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
==> default: Running provisioner: shell...
    default: Running: inline script
==> default: stdin: is not a tty
==> default: Configuration file: /srv/website/_config.yml
==> default:             Source: /srv/website
==> default:        Destination: /srv/website/_site
==> default:  Incremental build: enabled
==> default:       Generating...
==> default:                     done in 30.122 seconds.
==> default:  Auto-regeneration: enabled for '/srv/website'
==> default: Configuration file: /srv/website/_config.yml
==> default:     Server address: http://0.0.0.0:4000/
==> default:   Server running... press ctrl-c to stop.
==> default:       Regenerating: 1 file(s) changed at 2016-09-01 20:49:00
==> default: ...done in 7.158691945 seconds.

D:\openhab-docs>==> default: Waiting for cleanup before exiting...

D:\openhab-docs>vagrant status
Current machine states:

default                   running (virtualbox)

The VM is running. To stop this VM, you can run `vagrant halt` to
shut it down forcefully, or you can run `vagrant suspend` to simply
suspend the virtual machine. In either case, to restart it again,
simply run `vagrant up`.

D:\openhab-docs>vagrant halt
An action 'halt' was attempted on the machine 'default',
but another process is already executing an action on the machine.
Vagrant locks each machine for access by only one process at a time.
Please wait until the other Vagrant process finishes modifying this
machine, then try again.

If you believe this message is in error, please check the process
listing for any "ruby" or "vagrant" processes and kill them. Then
try again.

D:\openhab-docs>
`

Hello @dries_dokter,
when creating the vagrant machine, I encountered the same problem but it was always possible to stop or restart the machine by:

control-c, wait 2 sec, control-c, vagrant halt / vagrant reload

I was okay with that solution, as it worked. The alternative / cleaner approach would be to execute jekyll as a background service. By that, the vagrant up command would cleanly terminate at the end of the provisioning and the VM would be active in the background, the way a vagrant machine is supposed to work.
I decided against that, as it was more important to me to see the Jekyll output. If you find a better setup, feel free to share.

Btw. Thumbs Up :thumbsup: :thumbsup: :thumbsup: for wanting to contribute!

Thanks for that: that appears to work just fine…
I am slowly finding all the answers to my first confusion, running into some error with my rules, read about that here, switch to latest build, hopefully that works…
If so: I have something to write about…
:slight_smile: