I recently installed VB and Vagrant on a win 10 machine. Had it all working fine on a Linux machine a year before, but on this install, I always get the same problem. During the up process, right after inserting the public key within the guest, it forces a shutdown of the VM then destroys it. It then carries on with the up process which obviously produces errors.
This problem occurs with any .vagrant file including an unedited, default init .vagrant file with no added scripts. I only just installed VirtualBox and Vagrant so they are the latest versions. The problem doesn't seem to be with VirtualBox as I can create a box from an iso and bring that up just fine. The issue only occurs when I use Vagrant.
Here is the output;
vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/trusty64'...
Progress: 90%
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: A newer version of the box 'ubuntu/trusty64' is available! You
currently
==> default: have version '20171010.0.0'. The latest is version
'20171012.0.0'. Run
==> default: `vagrant box update` to update.
==> default: Setting the name of the VM:
VagrantTest_default_1508440636670_47439
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> 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:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
C:/HashiCorp/Vagrant/embedded/gems/gems/net-scp-1.2.1/lib/net/scp.rb:398:in
`await_response_state': scp: /tmp/vagrant-insert-pubkey-1508440708: Read-
only file system (RuntimeError)
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-scp-
1.2.1/lib/net/scp.rb:369:in `block (3 levels) in start_command'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-
4.1.0/lib/net/ssh/connection/channel.rb:320:in `process'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/session.rb:238:in `block in ev_preprocess'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/session.rb:529:in `each'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/session.rb:529:in `each_channel'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/session.rb:238:in `ev_preprocess'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/event_loop.rb:99:in `each'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/event_loop.rb:99:in `ev_preprocess'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/event_loop.rb:27:in `process'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/session.rb:216:in `process'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/session.rb:178:in `block in loop'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/session.rb:178:in `loop'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/session.rb:178:in `loop'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/channel.rb:269:in `wait'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-scp-1.2.1/lib/net/scp.rb:284:in `upload!'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/communicators/ssh/communicator.rb:291:in `block in upload'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/communicators/ssh/communicator.rb:684:in `block in scp_connect'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/communicators/ssh/communicator.rb:332:in `connect'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/communicators/ssh/communicator.rb:682:in `scp_connect'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/communicators/ssh/communicator.rb:285:in `upload'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/guests/linux/cap/public_key.rb:19:in `block in insert_public_key'
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/tempfile.rb:295:in `open'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/guests/linux/cap/public_key.rb:14:in `insert_public_key'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/capability_host.rb:111:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/capability_host.rb:111:in `capability'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/guest.rb:43:in `capability'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/communicators/ssh/communicator.rb:187:in `ready?'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/communicators/ssh/communicator.rb:83:in `block in wait_for_ready'
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/timeout.rb:33:in `block in catch'
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/timeout.rb:33:in `catch'
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/timeout.rb:33:in `catch'
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/timeout.rb:106:in `timeout'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/communicators/ssh/communicator.rb:60:in `wait_for_ready'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/builtin/wait_for_communicator.rb:16:in `block in call'
Process finished with exit code 1
I would be greatful for any help!
OK issue was due to a bad box. Removing the box to force a fresh download fixed it.
Related
Relative Vagrant and Ruby newb here. I'm trying to enable SSH forwarding from my Windows machine to my Vagrant created Ubuntu VM. My Vagrantfile has some Virtualbox provider specific config:
config.vm.provider "virtualbox" do |v|
v.name = guestHostname
v.memory = 8192
v.cpus = 2
v.customize ["modifyvm", :id, "--vram", "128"]
v.gui = true
end
Works fine by itself. But when I add the config for SSH forwarding:
config.ssh.forward_agent = true
Running 'vagrant up' starts failing with this error message:
Bringing machine 'development' up with 'virtualbox' provider...
==> development: Importing base box 'bento/ubuntu-16.10'...
==> development: Matching MAC address for NAT networking...
==> development: Checking if box 'bento/ubuntu-16.10' is up to date...
==> development: Setting the name of the VM: development
==> development: Clearing any previously set network interfaces...
==> development: Preparing network interfaces based on configuration...
development: Adapter 1: nat
==> development: Forwarding ports...
development: 22 (guest) => 2222 (host) (adapter 1)
==> development: Running 'pre-boot' VM customizations...
==> development: Booting VM...
==> development: Waiting for machine to boot. This may take a few minutes...
development: SSH address: 127.0.0.1:2222
development: SSH username: vagrant
development: SSH auth method: private key
==> development: Forcing shutdown of VM...
==> development: Destroying VM and associated drives...
C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/transport/server_version.rb:54:in `readpartial': An established connection was aborted by the software in your host machine. (Errno::ECONNABORTED)
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/transport/server_version.rb:54:in `block (2 levels) in negotiate!'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/transport/server_version.rb:52:in `loop'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/transport/server_version.rb:52:in `block in negotiate!'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/transport/server_version.rb:50:in `loop'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/transport/server_version.rb:50:in `negotiate!'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/transport/server_version.rb:32:in `initialize'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/transport/session.rb:84:in `new'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/transport/session.rb:84:in `initialize'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh.rb:233:in `new'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh.rb:233:in `start'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/communicators/ssh/communicator.rb:397:in `block (2 levels) in connect'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:88:in `block in timeout'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:32:in `block in catch'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:32:in `catch'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:32:in `catch'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:103:in `timeout'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/communicators/ssh/communicator.rb:371:in `block in connect'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/util/retryable.rb:17:in `retryable'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/communicators/ssh/communicator.rb:370:in `connect'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/communicators/ssh/communicator.rb:68:in `block in wait_for_ready'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:88:in `block in timeout'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:32:in `block in catch'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:32:in `catch'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:32:in `catch'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:103:in `timeout'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/communicators/ssh/communicator.rb:46:in `wait_for_ready'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/action/builtin/wait_for_communicator.rb:16:in `block in call'
Commenting out the provider specific config makes the error go away, and forwarding appears to work. Any ideas on what could be causing the issue?
I can see that you are using vagrant 1.9.4 and this is a known issue with vagrant 1.9.4. I am linking here the github issue associated with this problem. This has been fixed in version 1.9.5 though. So, you could either downgrade to 1.9.3 or upgrade to 1.9.5
I wanted to stand up a local instance of Openshift, but vagrant up doesn't finish.
I downloaded cdk-2.2.0.zip and rhel-cdk-kubernetes-7.2-29.x86_64.vagrant-virtualbox.box from developers.redhat.com.
Running vagrant up after installation gets stuck at Configuring and enabling network interfaces...:
me:~/cdk/components/rhel/rhel-ose $ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'cdkv2'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: rhel-ose_default_1476736433516_4922
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> 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: Remote connection disconnect. Retrying...
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Registering box with vagrant-registration...
default: Would you like to register the system now (default: yes)? [y|n]y
default: username: me#email.com
default: password:
==> default: Registration successful.
==> default: Checking for guest additions in VM...
default: No guest additions were detected on the base box for this VM! Guest
default: additions are required for forwarded ports, shared folders, host only
default: networking, and more. If SSH fails on this machine, please install
default: the guest additions and repackage the box to continue.
default:
default: This is not an error message; everything may continue to work properly,
default: in which case you may ignore this message.
==> default: Configuring and enabling network interfaces...
Any ideas how to troubleshoot this? Not sure if it's vagrant or the VM or something else.
Thank you for your time!
Same happened to me but after updating Vagrant to 1.9.1 version the problem was solved.
I am using OSX but it might be the same for all others OS.
the easiest is to install the vagrant vbguest plugin and let it install and configure the Virtual Box Guest Addition for the right version of your VirtualBox
The capability 'nfs_mount' could not be found. This is an internal error
that users should never see. Please report a bug.
Cmd
C:\var\www\cc-dev-env>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> 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: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 4.3.36
default: VirtualBox Version: 5.0
==> default: [vagrant-hostsupdater] Checking for host entries
==> default: [vagrant-hostsupdater] found entry for: 192.168.100.100 cc.dev
==> default: Mounting NFS shared folders from guest...
The capability 'nfs_mount' could not be found. This is an internal error
that users should never see. Please report a bug.
I am using
Windows 10 64-bit
Vagrant 1.8.1
vagrant-hostsupdater (1.0.2)
vagrant-nfs_guest (0.1.8)
vagrant-share (1.1.5, system)
vagrant-winnfsd (1.1.0)
Of course I would like to not see this error and see the VM that I am trying to boot open.
I try to create an NFS share directory in the vagrant box, but for some reasons I can not see the shared directory when I login to the box via ssh.
This is my Vagrantfile:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "hashicorp/precise32"
config.vm.synced_folder "./shared", "/st/data", :nfs => true
config.vm.network "private_network", ip: "192.168.33.10"
end
Vagrant reload output:
vagrant reload
==> default: Attempting graceful shutdown of VM...
==> default: Checking if box 'hashicorp/precise32' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> 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: Machine booted and ready!
GuestAdditions 5.0.6 running --- OK.
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
==> default: Mounting NFS shared folders...
==> default: Mounting shared folders...
default: /vagrant => /Users/stk/Documents/vagrant
==> default: Check for insecure vagrant key: OK (not present)
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
After vagrant ssh I can't see any nfs directory.
vagrant -v
Vagrant 1.7.4
OSX:
10.10.3
I tried most of the solutions mentioned here, but still no luck.
I want to spin up a Fedora-20 VM using Vagrant and Chef on my Windows 7 PC and provision it as a LAMP server. I have Vagrant 1.6.5. and the vagrant-omnibus plugin (1.4.1) is installed.
My Vagrantfile includes the "config.omnibus.chef_version = :latest" statement, but after running "vagrant up", expected provisioning does not occur. Instead,
==> default: Running provisioner: chef_solo...
The chef binary (either `chef-solo` or `chef-client`) was not found on
the VM and is required for chef provisioning. Please verify that chef
is installed and that the binary is available on the PATH.
It appears that the omnibus plugin did not install Chef on the VM. What else do I need to do to get this working on my PC?
This is my Vagrant file:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "chef/fedora-20"
config.omnibus.chef_version = :latest
config.vm.network "forwarded_port", guest: 80, host: 4567
config.vm.synced_folder "shared-files", "/var/www"
config.vm.provision "chef_solo" do |chef|
chef.cookbooks_path = "chef-recipes/cookbooks"
chef.roles_path = "chef-recipes/roles"
chef.add_role "lamp_stack"
end
end
and here is STDOUT:
C:\Users\wbj\f20>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'chef/fedora-20'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'chef/fedora-20' is up to date...
==> default: Setting the name of the VM: f20_default_1413836754304_46591
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 80 => 4567 (adapter 1)
default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> 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: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
default: /var/www => C:/Users/wbj/f20/shared-files
default: /vagrant => C:/Users/wbj/f20
default: /tmp/vagrant-chef-3/chef-solo-2/roles => C:/Users/wbj/f20/chef-recipes/roles
default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks => C:/Users/wbj/f20/chef-recipes/cookbooks
==> default: Running provisioner: chef_solo...
The chef binary (either `chef-solo` or `chef-client`) was not found on
the VM and is required for chef provisioning. Please verify that chef
is installed and that the binary is available on the PATH.
Thank you!
I ran into this exact problem. The solution was to downgrade to Vagrant 1.6.2 until Vagrant version 1.7.1 was released. Both versions fixed the problem for me.