Host-only networking failing with introductory use case

286 views
Skip to first unread message

Jeff Sussna

unread,
May 19, 2011, 5:05:43 PM5/19/11
to Vagrant
I am trying out Vagrant with the basic setup from the Getting Started
page. Have installed the latest vagrant gem. Am running Ruby 1.9.2p180
and VirtualBox 4.0.8 on Windows XP. I can successfully create and run
a VM from the lucid32 box. As soon as I uncomment 'config.vm.network
"33.33.33.11"' in the default VagrantFile, though, 'vagrant up' fails.
Any insights would be appreciated.

The failure stack trace is:

c:/ruby192/lib/ruby/gems/1.9.1/gems/virtualbox-0.8.6/lib/virtualbox/
com/implementer/mscom.rb:50:in `method_missing': (in OLE method
`CreateHostOnlyNetworkInterface': ) (WIN32OLERuntimeError)
OLE error code:0 in <Unknown>
<No Description>
HRESULT error code:0x8002000e
Invalid number of parameters.
from c:/ruby192/lib/ruby/gems/1.9.1/gems/virtualbox-0.8.6/lib/
virtualbox/com/implementer/mscom.rb:50:in `call_function'
from c:/ruby192/lib/ruby/gems/1.9.1/gems/virtualbox-0.8.6/lib/
virtualbox/com/abstract_interface.rb:134:in `call_function'
from c:/ruby192/lib/ruby/gems/1.9.1/gems/virtualbox-0.8.6/lib/
virtualbox/com/abstract_interface.rb:51:in `block in function'
from c:/ruby192/lib/ruby/gems/1.9.1/gems/virtualbox-0.8.6/lib/
virtualbox/host_network_interface.rb:49:in `create'
from c:/ruby192/lib/ruby/gems/1.9.1/gems/virtualbox-0.8.6/lib/
virtualbox/proxies/collection.rb:25:in `create'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/vm/network.rb:96:in `network_name'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/vm/network.rb:67:in `block in assign_network'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/vm/network.rb:63:in `each'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/vm/network.rb:63:in `assign_network'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/vm/network.rb:22:in `call'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/warden.rb:28:in `call'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/vm/host_name.rb:10:in `call'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/warden.rb:28:in `call'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/vm/share_folders.rb:15:in `call'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/warden.rb:28:in `call'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/vm/clear_shared_folders.rb:14:in `call'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/warden.rb:28:in `call'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/vm/nfs.rb:39:in `call'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/warden.rb:28:in `call'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/vm/provision.rb:17:in `call'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/warden.rb:28:in `call'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/vm/forward_ports.rb:88:in `call'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/warden.rb:28:in `call'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/vm/clear_forwarded_ports.rb:17:in `call'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/warden.rb:28:in `call'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/vm/customize.rb:16:in `call'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/warden.rb:28:in `call'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/vm/clean_machine_folder.rb:17:in `call'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/warden.rb:28:in `call'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action/builder.rb:120:in `call'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action.rb:131:in `block in run'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
util/busy.rb:19:in `busy'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
action.rb:131:in `run'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
vm.rb:144:in `start'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
command/up.rb:11:in `block in execute'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
command/up.rb:8:in `each'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
command/up.rb:8:in `execute'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/task.rb:
22:in `run'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/
invocation.rb:118:in `invoke_task'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/
invocation.rb:124:in `block in invoke_all'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/
invocation.rb:124:in `each'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/
invocation.rb:124:in `map'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/
invocation.rb:124:in `invoke_all'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/
group.rb:226:in `dispatch'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/
invocation.rb:109:in `invoke'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/lib/vagrant/
cli.rb:45:in `block in register'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/task.rb:
22:in `run'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/
invocation.rb:118:in `invoke_task'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor.rb:
263:in `dispatch'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/base.rb:
389:in `start'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/vagrant-0.7.5/bin/vagrant:
15:in `<top (required)>'
from c:/Ruby192/bin/vagrant:19:in `load'
from c:/Ruby192/bin/vagrant:19:in `<main>'

Mitchell Hashimoto

unread,
May 19, 2011, 5:21:10 PM5/19/11
to vagra...@googlegroups.com
Jeff,

On Thu, May 19, 2011 at 2:05 PM, Jeff Sussna <j...@ingineering.it> wrote:
I am trying out Vagrant with the basic setup from the Getting Started
page. Have installed the latest vagrant gem. Am running Ruby 1.9.2p180
and VirtualBox 4.0.8 on Windows XP. I can successfully create and run
a VM from the lucid32 box. As soon as I uncomment 'config.vm.network
"33.33.33.11"' in the default VagrantFile, though, 'vagrant up' fails.

Sorry, I should put a better error message in there for Windows users. Due to a bug in the Ruby WIN32OLE library itself, host only networking doesn't work on Windows (since I can't actually make the API call to enable it, it simply fails).

Windows users are currently stuck with port forwarding only.

Best,
Mitchell

Jeff Sussna

unread,
May 19, 2011, 6:52:25 PM5/19/11
to Vagrant
OK thanks. Speaking of port forwarding, it appears that if I set a
forwarding rule in the VirtualBox UI, vagrant will clear it the next
time I do a "vagrant up". I assume that means I need to use the VB
config file to define my rules? Or is there a way to tell vagrant to
leave well enough alone (I don't know VB well enough to know how
persistent the UI-defined rules are).


On May 19, 4:21 pm, Mitchell Hashimoto <mitchell.hashim...@gmail.com>
wrote:

Jonathan

unread,
May 27, 2011, 1:48:26 AM5/27/11
to Vagrant
Mithcell,

I actually made host only networking working by manually creating an
host-only adapter in the VB GUI with the subnet base address of the IP
configured in the Vagrantfile. Everything seems working till now.

Cheers,
Jonathan

P.S.: The destroy step seems to work... so you have to recreate the
adapter each time you do a "vagrant destroy" :-D

On May 19, 11:21 pm, Mitchell Hashimoto <mitchell.hashim...@gmail.com>
wrote:

fran

unread,
Jun 8, 2011, 5:48:34 AM6/8/11
to Vagrant


On May 19, 11:21 pm, Mitchell Hashimoto <mitchell.hashim...@gmail.com>
wrote:
> Jeff,
>
> On Thu, May 19, 2011 at 2:05 PM, Jeff Sussna <j...@ingineering.it> wrote:
> > I am trying out Vagrant with the basic setup from the Getting Started
> > page. Have installed the latest vagrant gem. Am running Ruby 1.9.2p180
> > and VirtualBox 4.0.8 on Windows XP. I can successfully create and run
> > a VM from the lucid32 box. As soon as I uncomment 'config.vm.network
> > "33.33.33.11"' in the default VagrantFile, though, 'vagrant up' fails.
>
> Sorry, I should put a better error message in there for Windows users. Due
> to a bug in the Ruby WIN32OLE library itself, host only networking doesn't
> work on Windows (since I can't actually make the API call to enable it, it
> simply fails).
>
> Windows users are currently stuck with port forwarding only.
>
> Best,
> Mitchell

Hi,

Thanks for the answer.
I have got the same problem.

Except error, I have not found any issue about this problem on Github
bug tracking. Do you want that I open an issue ?

Thanks,
Fran'
Reply all
Reply to author
Forward
0 new messages