Re: Vagrant Getting Started provisioning OS X Lion and Chef Issue

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Vagrant Getting Started provisioning OS X Lion and Chef Issue

Guillaume Thouvenin
Hello,

 I dig this post because I tried to build my box, a fedora18 with vagrant 1.0.6 and everything was good until I wanted to halt the VM. I got the same error as above. I don't have this errors with my ubuntu 12.04 image. I pasted the error here. Is it a bug in Vagrant? As I don't know ruby I don't know where I can look into the code. If you need more information or if I can do something to help just ask.

Regards,
Guillaume

 jobs:1 $ vagrant package --base Fedora18_amd64_vagrant
[Fedora18_amd64_vagrant] Attempting graceful shutdown of VM...
/opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/ruby_compat.rb:22:in `select': closed stream (IOError)
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/ruby_compat.rb:22:in `io_select'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/transport/packet_stream.rb:73:in `available_for_read?'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/transport/packet_stream.rb:85:in `next_packet'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/transport/session.rb:171:in `block in poll_message'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/transport/session.rb:166:in `loop'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/transport/session.rb:166:in `poll_message'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/connection/session.rb:451:in `dispatch_incoming_packets'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/connection/session.rb:213:in `preprocess'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/connection/session.rb:197:in `process'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/connection/session.rb:161:in `block in loop'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/connection/session.rb:161:in `loop'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/connection/session.rb:161:in `loop'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/connection/channel.rb:269:in `wait'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/communication/ssh.rb:223:in `shell_execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/communication/ssh.rb:53:in `block in execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/communication/ssh.rb:111:in `connect'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/communication/ssh.rb:52:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/communication/ssh.rb:72:in `sudo'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/guest/linux.rb:32:in `halt'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/vm/halt.rb:14:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/warden.rb:33:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/vm/discard_state.rb:17:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/warden.rb:33:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/vm/check_accessible.rb:18:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/warden.rb:33:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/general/validate.rb:13:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/warden.rb:33:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/general/check_virtualbox.rb:23:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/warden.rb:33:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/vm/check_accessible.rb:18:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/warden.rb:33:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/vm/setup_package_files.rb:49:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/warden.rb:33:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/general/validate.rb:13:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/warden.rb:33:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/general/check_virtualbox.rb:23:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/warden.rb:33:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/builder.rb:92:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/runner.rb:49:in `block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/runner.rb:49:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/vm.rb:192:in `run_action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/vm.rb:141:in `package'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/command/package.rb:71:in `package_vm'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/command/package.rb:53:in `package_base'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/command/package.rb:38:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/cli.rb:42:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/environment.rb:167:in `cli'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/bin/vagrant:43:in `<top (required)>'
from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Vagrant Getting Started provisioning OS X Lion and Chef Issue

Chad Thompson


On 6 Mar 2013, at 14:58, Guillaume Thouvenin wrote:

>  I dig this post because I tried to build my box, a fedora18 with
> vagrant 1.0.6 and everything was good until I wanted to halt the VM. I
> got the same error as above. I don't have this errors with my ubuntu
> 12.04 image. I pasted the error here. Is it a bug in Vagrant? As I
> don't know ruby I don't know where I can look into the code. If you
> need more information or if I can do something to help just ask.

Does the VM shut down?  It looks like an SSH connection to the server is
not being 'gently' closed.  (Could be how Fedora terminates SSH
connections on halt.)

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: Vagrant Getting Started provisioning OS X Lion and Chef Issue

Guillaume Thouvenin
First I'd like to apologize because I found this post by doing a search and I didn't see that the title doesn't correspond exactly to what I'm doing (even if the error seems to be the same). 

Yes the VM shuts down. I don't know if fedora can deal with that. In fact the main problem with that is that I can not make a 'reload' for example. In the command I can build the box because I can run the command "vagrant package --base Fedora18_amd64_vagrant" with a VM that is halted but I just can't do 'reload'. 

And for information I had some issues with the "shutdown -h now"  command run by vagrant because it was intercepted by polkit and on Fedora I disabled firewalld, selinux and polkit. I can do "ssh -p 2222 -i insecure_private_key vagrant@localhost" and then  "vagrant-box$ shutdown -h now". It works but I don't know if it proves something.

I run VAGRANT_LOG=debug vagrant halt  to see here is the report (the box is halted despite the error) :

DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
DEBUG virtualbox_4_2:   - [1, "ssh", 2222, 22]
DEBUG ssh: Checking key permissions: /home/thouveng/.vagrant.d/insecure_private_key
DEBUG ssh: Checking key permissions: /home/thouveng/.vagrant.d/insecure_private_key
 INFO ssh: Connecting to SSH: 127.0.0.1:2222
 INFO ssh: Execute: cat /etc/debian_version (sudo=false)
DEBUG ssh: Exit status: 1
DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute: cat /etc/gentoo-release (sudo=false)
DEBUG ssh: Exit status: 1
DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute: grep 'Fedora release 16' /etc/redhat-release (sudo=false)
DEBUG ssh: Exit status: 1
DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute: cat /etc/redhat-release (sudo=false)
DEBUG ssh: Exit status: 0
 INFO vm: Loading guest: redhat
DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute: shutdown -h now (sudo=true)
ERROR warden: Error occurred: closed stream
ERROR warden: Error occurred: closed stream
ERROR warden: Error occurred: closed stream
ERROR warden: Error occurred: closed stream
ERROR warden: Error occurred: closed stream
/opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/ruby_compat.rb:22:in `select': closed stream (IOError)
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/ruby_compat.rb:22:in `io_select'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/transport/packet_stream.rb:73:in `available_for_read?'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/transport/packet_stream.rb:85:in `next_packet'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/transport/session.rb:171:in `block in poll_message'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/transport/session.rb:166:in `loop'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/transport/session.rb:166:in `poll_message'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/connection/session.rb:451:in `dispatch_incoming_packets'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/connection/session.rb:213:in `preprocess'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/connection/session.rb:197:in `process'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/connection/session.rb:161:in `block in loop'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/connection/session.rb:161:in `loop'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/connection/session.rb:161:in `loop'
from /opt/vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/connection/channel.rb:269:in `wait'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/communication/ssh.rb:223:in `shell_execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/communication/ssh.rb:53:in `block in execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/communication/ssh.rb:111:in `connect'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/communication/ssh.rb:52:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/communication/ssh.rb:72:in `sudo'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/guest/linux.rb:32:in `halt'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/vm/halt.rb:14:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/warden.rb:33:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/vm/discard_state.rb:17:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/warden.rb:33:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/vm/check_accessible.rb:18:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/warden.rb:33:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/general/validate.rb:13:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/warden.rb:33:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/general/check_virtualbox.rb:23:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/warden.rb:33:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/builder.rb:92:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/runner.rb:49:in `block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/runner.rb:49:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/vm.rb:192:in `run_action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/vm.rb:156:in `halt'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/command/halt.rb:27:in `block in execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/command/base.rb:116:in `block in with_target_vms'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/command/base.rb:111:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/command/base.rb:111:in `with_target_vms'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/command/halt.rb:24:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/cli.rb:42:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/environment.rb:167:in `cli'
from /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/bin/vagrant:43:in `<top (required)>'
from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Vagrant Getting Started provisioning OS X Lion and Chef Issue

Guillaume Thouvenin
I tried "vagrant up" then "vagrant ssh". I'm in the vagrant-box. Then I run "shutdown -h now" and I don't see any errors:

[hidden email]: ~/virtualization/vagrant/fedo18
jobs:0 $ vagrant up
[default] VM already created. Booting if it's not already running...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Mounting shared folders...
[default] -- v-root: /vagrant
[hidden email]: ~/virtualization/vagrant/fedo18
jobs:0 $ vagrant ssh
Last login: Wed Mar  6 22:41:43 2013 from 10.0.2.2
[vagrant@fedovm ~]$ sudo shutdown -h now
Connection to 127.0.0.1 closed by remote host.
Connection to 127.0.0.1 closed.
[hidden email]: ~/virtualization/vagrant/fedo18
jobs:0 $


--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.