SSH not working (forcing shutdown?)

2,139 views
Skip to first unread message

Goodbytes

unread,
May 1, 2014, 3:58:22 PM5/1/14
to vagra...@googlegroups.com
Hi guys,

I'm noticing some errors using Vagrant when firing up and shutting down my vm.

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
....
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
GuestAdditions 4.3.10 running --- OK.
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
....
==> default: VM already provisioned. Run `vagrant provision` or use `--provision` to force it

Everything seems to work OK, but then when i try to shut it down it goes from graceful to force..

$ vagrant halt
==> default: Attempting graceful shutdown of VM...
    default: Guest communication could not be established! This is usually because
    default: SSH is not running, the authentication information was changed,
    default: or some other networking issue. Vagrant will force halt, if
    default: capable.
==> default: Forcing shutdown of VM...

Any ideas with this, would be nice to get it functioning without errors and warnings.

Alvaro Miranda Aguilera

unread,
May 5, 2014, 7:46:02 PM5/5/14
to vagra...@googlegroups.com
what's the output of vagrant sshd-config ?

do you have any config.ssh.* parameter in the Vagrantfile ?


--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Goodbytes

unread,
May 6, 2014, 3:42:29 AM5/6/14
to vagra...@googlegroups.com
Nope nothing...

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "chef/centos-6.5"
  config.vm.network "private_network", ip: "192.168.33.21"
  config.vm.network :forwarded_port, guest: 80, host: 8080
  config.vm.provision :shell, :path => "install.sh"
  config.vm.hostname = "dev.local"
  config.vm.synced_folder ".", "/home"
end

Goodbytes

unread,
May 6, 2014, 3:46:25 AM5/6/14
to vagra...@googlegroups.com
oh and the ssh-config:

$ vagrant ssh-config
Host default
  HostName 127.0.0.1
  User vagrant
  Port 2222
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile /Users/forcer/.vagrant.d/insecure_private_key
  IdentitiesOnly yes
  LogLevel FATAL

On Tuesday, 6 May 2014 00:46:02 UTC+1, Alvaro Miranda Aguilera wrote:

Alvaro Miranda Aguilera

unread,
May 7, 2014, 7:31:24 PM5/7/14
to vagra...@googlegroups.com
i am not sure what command is being executed to shutdown, but try these:

vagrant ssh -c "init 0"

vagrant ssh -c "poweroff"

vagrant ssh -c "shutdown -h now"

and see which one goes faster.

If you do with the gui, and some of them are stuck, will be something in the vm holding the shutdown, that's why move from graceful to force.

Those 3 shutdown are different, in terms of "nice" to shutdown..

Goodbytes

unread,
May 8, 2014, 3:28:00 AM5/8/14
to vagra...@googlegroups.com
thanks i will try it, i am using 'vagrant halt' to shutdown which is supposed to gracefully shut it down.

Alvaro Miranda Aguilera

unread,
May 8, 2014, 6:22:03 AM5/8/14
to vagra...@googlegroups.com
yes but afters ome time it will kill the machine by force, so will help if you can identify whats holding the poweroff


--
Reply all
Reply to author
Forward
0 new messages