Vagrant: Windows boxes give me: uninitialized constant WinRM::WinRMWebService (NameError)

Created on 19 Nov 2017  ยท  6Comments  ยท  Source: hashicorp/vagrant

I want to run Windows boxes on my Debian server, but with every box I try to run I get the error "uninitialized constant WinRM::WinRMWebService (NameError)".

Vagrant version

Vagrant 1.9.1
winrm (2.2.3)

Host operating system

Debian stretch 4.9.0-4-amd64 headless

Guest operating system

Windows 2012R2

Vagrantfile

Vagrant.configure(2) do |config|

    config.vm.box = "mwrock/Windows2012R2"

    config.vm.network :private_network, ip: "192.168.1.20"

    config.vm.provider "virtualbox" do |vb|

        vb.gui = false
        vb.name = "windows_2012_server"
        vb.memory = 1024
        vb.cpus = 1
        vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]

    end

end

Debug output

https://gist.github.com/sevaho/1e7bf3d05af6bbac11e304d4ab0346ca

Expected behavior

Normal booting of Windows 2012 R2.

Actual behavior

    default: WinRM address: 127.0.0.1:55985
    default: WinRM username: vagrant
    default: WinRM execution_time_limit: PT2H
    default: WinRM transport: negotiate
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
/usr/share/rubygems-integration/all/gems/vagrant-1.9.1/plugins/communicators/winrm/shell.rb:169:in `new_session': uninitialized constant WinRM::WinRMWebService (NameError)
Did you mean?  WinRM::WinRMWMIError
    from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/plugins/communicators/winrm/shell.rb:176:in `session'
    from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/plugins/communicators/winrm/shell.rb:65:in `cmd'
    from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/plugins/communicators/winrm/communicator.rb:107:in `block in ready?'
    from /usr/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
    from /usr/lib/ruby/2.3.0/timeout.rb:33:in `block in catch'
    from /usr/lib/ruby/2.3.0/timeout.rb:33:in `catch'
    from /usr/lib/ruby/2.3.0/timeout.rb:33:in `catch'
    from /usr/lib/ruby/2.3.0/timeout.rb:106:in `timeout'
    from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/plugins/communicators/winrm/communicator.rb:106:in `ready?'
    from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/plugins/communicators/winrm/communicator.rb:57:in `block in wait_for_ready'
    from /usr/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
    from /usr/lib/ruby/2.3.0/timeout.rb:33:in `block in catch'
    from /usr/lib/ruby/2.3.0/timeout.rb:33:in `catch'
    from /usr/lib/ruby/2.3.0/timeout.rb:33:in `catch'
    from /usr/lib/ruby/2.3.0/timeout.rb:106:in `timeout'
    from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/plugins/communicators/winrm/communicator.rb:31:in `wait_for_ready'
    from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/action/builtin/wait_for_communicator.rb:16:in `block in call'
    from /home/sevaho/.vagrant.d/gems/2.3.3/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'

Steps to reproduce

  1. vagrant up

References

waiting-reply

Most helpful comment

Yes, it resolved my issue, 2.01 is not yet in the Debian stable repositories, manual download fixed the issue.

Thanks!

All 6 comments

Hey @sevaho, did you solve this error? I've got the same problem.

No not yet, still getting it, I tried other Windows machines but the problem is not with the machines it's with my machine. I am running headless without any display server so I guess the problem lies with that.

This looks to be a constant that is no longer in Vagrant. Please upgrade to the latest version of Vagrant and let me know if that resolves your issue. Thanks!

Yes, it resolved my issue, 2.01 is not yet in the Debian stable repositories, manual download fixed the issue.

Thanks!

Thanks a lot @briancain and @sevaho. I had the same problem and this solve

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jazzfog picture jazzfog  ยท  3Comments

janw-me picture janw-me  ยท  3Comments

bbaassssiiee picture bbaassssiiee  ยท  3Comments

RobertSwirsky picture RobertSwirsky  ยท  3Comments

tomhking picture tomhking  ยท  3Comments