vagrant up failed on Windows server enterprise without hyper-v

767 views
Skip to first unread message

Irene

unread,
Apr 18, 2016, 11:21:44 AM4/18/16
to Vagrant
Hi,

I am seeking for help to create VirtualBox VM on Windows server enterprise without hyper-v 32 bit host.

I am using the VagrantFile below to run vagrant up. It's forced to shut down in the end with the Error below.  In the VagrantFile, I turned on the VM GUI. The VM prompted  for login without seeing errors.  I have no ideas what prevents me from booting up a VM and how to fix it because I tried the same VagrantFile on Windows 7 but it worked.   Any advices are greatly appreciated.

c:\linux-vm>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'bento/centos-6.7-i386'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'bento/centos-6.7-i386' is up to date...
==> default: Setting the name of the VM: linux-vm_default_1460659183735_96224
==> 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: 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: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/socket.rb:60:in `connect_nonblock': Invalid argument - connect(2) for 127.0.0.1:2222 (Errno::EINVAL)
        from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/socket.rb:60:in `rescue in connect_internal'
        from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/socket.rb:53:in `connect_internal'
        from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/socket.rb:140:in `connect'
        from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/socket.rb:338:in `block in tcp'
        from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/socket.rb:232:in `each'
        from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/socket.rb:232:in `foreach'
        from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/socket.rb:328:in `tcp'
        from C:/Users/Administrator/.vagrant.d/gems/gems/net-ssh-3.0.2/lib/net/ssh/transport/session.rb:70:in `initialize'
        from C:/Users/Administrator/.vagrant.d/gems/gems/net-ssh-3.0.2/lib/net/ssh.rb:225:in `new'
        from C:/Users/Administrator/.vagrant.d/gems/gems/net-ssh-3.0.2/lib/net/ssh.rb:225:in `start'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/communicators/ssh/communicator.rb:389: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.8.1/plugins/communicators/ssh/communicator.rb:368:in `block in connect'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/retryable.rb:17:in `retryable'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/communicators/ssh/communicator.rb:367:in `connect'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/communicators/ssh/communicator.rb:64: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.8.1/plugins/communicators/ssh/communicator.rb:42:in `wait_for_ready'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/wait_for_communicator.rb:16:in `block in call'

----------------------------------------------------------------------------------------------------------------------------------------------------

Host::   VirtualBox VM on Windows server enterprise without hyper-v 32 bit system
VM :     bento/centos-6.7-i386    (32 bits)
Installed software on host:   Vagrant,   VirtualBox (5.0.14),    Git(2.8.1.windows.1).     Added "C:\Program Files\Git\bin" to system PATH

VagrantFile   file:

# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
  # The most common configuration options are documented and commented below.
  # For a complete reference, please see the online documentation at
  # https://docs.vagrantup.com.
  # Every Vagrant development environment requires a box. You can search for
  # boxes at https://atlas.hashicorp.com/search.
  config.vm.box = "bento/centos-6.7-i386"
  config.vm.boot_timeout = 700

  # Disable automatic box update checking. If you disable this, then
  # boxes will only be checked for updates when the user runs
  # `vagrant box outdated`. This is not recommended.
  # config.vm.box_check_update = false
  # Create a forwarded port mapping which allows access to a specific port
  # within the machine from a port on the host machine. In the example below,
  # accessing "localhost:8080" will access port 80 on the guest machine.
  # config.vm.network "forwarded_port", guest: 80, host: 8080
  # Create a private network, which allows host-only access to the machine
  # using a specific IP.
  # config.vm.network "private_network", ip: "192.168.33.10"
  # Create a public network, which generally matched to bridged network.
  # Bridged networks make the machine appear as another physical device on
  # your network.
  # config.vm.network "public_network"
  # Share an additional folder to the guest VM. The first argument is
  # the path on the host to the actual folder. The second argument is
  # the path on the guest to mount the folder. And the optional third
  # argument is a set of non-required options.
  # config.vm.synced_folder "../data", "/vagrant_data"
  # Provider-specific configuration so you can fine-tune various
  # backing providers for Vagrant. These expose provider-specific options.
  # Example for VirtualBox:
  #
  config.vm.provider "virtualbox" do |vb|
 
  #   # Display the VirtualBox GUI when booting the machine
     vb.gui = true
  #
  #   # Customize the amount of memory on the VM:
     vb.memory = "1024"
   end

  #
  # View the documentation for the provider you are using for more
  # information on available options.
  # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
  # such as FTP and Heroku are also available. See the documentation at
  # https://docs.vagrantup.com/v2/push/atlas.html for more information.
  # config.push.define "atlas" do |push|
  #   push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
  # end
  # Enable provisioning with a shell script. Additional provisioners such as
  # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
  # documentation for more information about their specific syntax and use.
  # config.vm.provision "shell", inline: <<-SHELL
  #   sudo apt-get update
  #   sudo apt-get install -y apache2
  # SHELL
end

 

Alvaro Miranda Aguilera

unread,
Apr 18, 2016, 4:39:27 PM4/18/16
to vagra...@googlegroups.com

On Tue, Apr 19, 2016 at 3:21 AM, Irene <ire8...@gmail.com> wrote:
C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/socket.rb:60:in `connect_nonblock': Invalid argument - connect(2) for 127.0.0.1:2222 (Errno::EINVAL)

Hello,

Haven't seen that error before, so lets dig on the usual suspects.

1. You are in the current version of Vagrant. 1.8.x
2. You did reboot after the install.
3. You are running this as your normal user.


Can you provide the following output.

vagrant version
vagrant plugin list

mkdir precise32
cd precise32
vagrant init -m hashicorp/precise32
set VAGRANT_LOG=debug 
vagrant up


Thanks!
alvaro.

Jan

unread,
Apr 20, 2016, 4:35:10 PM4/20/16
to vagra...@googlegroups.com
Hello,

Did you find already a solution for this problem? I'm having the same
problem. I discovered that the VM boots when I don't have an internet
connection. But with internet connection I always get this error. I tried
already turning off Windows Firewall and antivirus, but that doesn't help.
Let me know if you found a solution.

Thx,
Jan


Alvaro Miranda Aguilera

unread,
Apr 20, 2016, 7:49:35 PM4/20/16
to vagra...@googlegroups.com
Hello,

Can you provide screenshots and logs on your error?

if you are using cmd.exe use

mkdir precise64
cd precise64
vagrant init -m hashicorp/precise64

set VAGRANT_LOG=debug
vagrant up

and share the verbose output.

Thanks
Alvaro.



--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/loom.20160420T222916-818%40post.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Jan

unread,
Apr 21, 2016, 5:21:21 PM4/21/16
to vagra...@googlegroups.com
Hi Alvaro,

I'm using the laravel/homestead box.
Operating system: Windows Vista
VirtualBox 5.0.16
Vagrant 1.8.1
Git 2.8.1.windows.1


Here the output and vagrantfile:

OUTPUT
------


$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'laravel/homestead'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Setting the name of the VM: test
==> 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: 80 (guest) => 8000 (host) (adapter 1)
default: 443 (guest) => 44300 (host) (adapter 1)
default: 3306 (guest) => 33060 (host) (adapter 1)
default: 5432 (guest) => 54320 (host) (adapter 1)
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: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/socket.rb:60:in
`connect_nonblock': Invalid argument - connect(2) for 127.0.0.1:2222
(Errno::EINVAL)
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/socket.rb:60:in `rescue in
connect_internal'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/socket.rb:53:in
`connect_internal'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/socket.rb:140:in `connect'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/socket.rb:338:in `block in tcp'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/socket.rb:232:in `each'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/socket.rb:232:in `foreach'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/socket.rb:328:in `tcp'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-3.0.1/lib/net/ssh
/transport/session.rb:70:in
`initialize'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-3.0.1/lib
/net/ssh.rb:222:in
`new'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-3.0.1/lib
/net/ssh.rb:222:in
`start'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins
/communicators/ssh/communicator.rb:389:in
`block (2 levels) in connect'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:88:in `block in
timeout'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:32:in `block in
catch'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:32:in `catch'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:32:in `catch'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:103:in `timeout'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins
/communicators/ssh/communicator.rb:368:in
`block in connect'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant
/util/retryable.rb:17:in
`retryable'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins
/communicators/ssh/communicator.rb:367:in
`connect'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins
/communicators/ssh/communicator.rb:64:in
`block in wait_for_ready'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:88:in `block in
timeout'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:32:in `block in
catch'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:32:in `catch'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:32:in `catch'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:103:in `timeout'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins
/communicators/ssh/communicator.rb:42:in
`wait_for_ready'
from C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action
/builtin/wait_for_communicator.rb:16:in
`block in call'




-------------------------------------------------------------------------

VAGRANTFILE
-----------


require 'json'
require 'yaml'

VAGRANTFILE_API_VERSION ||= "2"
confDir = $confDir ||= File.expand_path("vendor/laravel/homestead",
File.dirname(__FILE__))

homesteadYamlPath = "Homestead.yaml"
homesteadJsonPath = "Homestead.json"
afterScriptPath = "after.sh"
aliasesPath = "aliases"

require File.expand_path(confDir + '/scripts/homestead.rb')

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
if File.exists? aliasesPath then
config.vm.provision "file", source: aliasesPath, destination:
"~/.bash_aliases"
end

if File.exists? homesteadYamlPath then
Homestead.configure(config, YAML::load(File.read(homesteadYamlPath)))
elsif File.exists? homesteadJsonPath then
Homestead.configure(config, JSON.parse(File.read(homesteadJsonPath)))
end

if File.exists? afterScriptPath then
config.vm.provision "shell", path: afterScriptPath
end

config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = true

# Customize the amount of memory on the VM:
vb.memory = "1024"

end

config.vm.boot_timeout = 1000

end

-------------------------------------------------------------------------

Let me know if you need more info.

Thanks in advance,
Jan


Alvaro Miranda Aguilera

unread,
Apr 21, 2016, 6:20:30 PM4/21/16
to vagra...@googlegroups.com

On Fri, Apr 22, 2016 at 9:21 AM, Jan <janvan...@gmail.com> wrote:
C:/Program Files
(x86)/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/socket.rb:60:in
`connect_nonblock': Invalid argument - connect(2) for 127.0.0.1:2222
(Errno::EINVAL)


hello,

the underlying libs that vagrant use, have some issues with spaces and special characters.

That apply for the installer and the home of the user.

Can you please uninstall and install again ?

Keep the default path if possible

c:\hashicorp\vagrant

Thanks
Alvaro.

Jan

unread,
Apr 22, 2016, 4:41:21 PM4/22/16
to vagra...@googlegroups.com
Hi,

Thanks for the tip. I reinstalled Vagrant using the default path, but it
didn't help. I still get the same error.

BR,
Jan

Irene

unread,
Apr 22, 2016, 5:25:01 PM4/22/16
to Vagrant
Thanks very much for your help!

Yes, I booted the machine after installed vagrant.  I tried to run vagrant up as a normal user or Administrator. Both are failed for Centos 6.7 from Windows console.

vagrant version: 
           Installed Version: 1.8.1

           Latest Version: 1.8.1


vagrant plugin list: 

           vagrant-share (1.1.5, system)

           vagrant-vbguest (0.11.0)



Following the steps you provided,  run vagrant up under the precise32.  It seemed work.  I saved the last lines from the screen in the attached file "precise32_screen.log", and some output redirect to "precise32.log".


But run vagrant up for "bento/centos-6.7-i386",  it failed. I also saved last lines of the screen in the attached file "centos67-screen.log",  and some output redirect to "centos67.log".   I also attached the "VagrantFile" for Centos6.7.

I have no idea why Centos 6.7 VM boot failed.

Thanks,
Irene
centos67.log
centos67-screen.log
precise32.log
precise32-screen.log
Vagrantfile

Irene

unread,
Apr 26, 2016, 10:06:53 AM4/26/16
to Vagrant
Hi,

Did anyone successfully "vagrant up" bento/centos-6.7-i386 on Windows server enterprise without hyper-v system ( service pack 2)?   Any help will be very appreciated!

Thanks,

Alvaro Miranda Aguilera

unread,
Apr 26, 2016, 5:18:57 PM4/26/16
to vagra...@googlegroups.com

On Wed, Apr 27, 2016 at 2:06 AM, Irene <ire8...@gmail.com> wrote:
bento/centos-6.7-i386"


Hello,

After the VM is deployed, you should be able to run Virtualbox gui and see the VM there.

If you stop start the VM you should be able to see the console and that may provide more information.

If your server is connected to a domain, please check the home directory between the command prompt and the GUI is the same.

In some cases due profiles, and that the user did logon on/off AD the home directory change.

Vagrant and Virtualbox create folders based on the home directory they see.

Thanks
alvaro.

Irene

unread,
Apr 28, 2016, 12:30:39 PM4/28/16
to Vagrant
Hi Alvaro,

Thank you very much for your help.

I redo  "vagrant up" for  the precise32 and centos6.7-i386 under the same Windows user directory. It still failed with centos6.7-i386.  But the errors is different.

Both are able to deploy VM in VirtualBox. 

precise32 is able to SSH to the VM,  and saw the shared folder "/vagrant" from the VM console. 

However, for Centos6.7-i386, it only deployed the VM,  and showed connection "timeout" info on Windows console.  It was not able to SSH to  Centos6.7 VM.  When logon to the Centos6.7 VM, there was no shared folder "/vagrant"from the VM console.

In this case, the home directory is the same for both precise32 and centos6.7-i386 at the same machine. 

What is the difference between precise32 and centos6.7-i386 when "vagrant up"?  What may cause the communicate with VM failure for Centos6.7 but success for precise32 ?


Here is the Windows console output for centos6.7-i386
---------------------------------------------------------------------------------------------
C:\Users\dev\vm_test>vagrant up

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'bento/centos-6.7-i386' 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: 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
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
C:\Users\dev\vm_test>vagrant ssh
ssh_exchange_identification: Connection closed by remote host


Thanks,
Irene
Reply all
Reply to author
Forward
0 new messages