Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Error Creating VM With Vagrant 1.3.5 and VirtualBox 4.3.0 #2392

Closed
pauloelr opened this Issue · 31 comments
@pauloelr

Hi,

I'm having this error:

Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'precise64'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "create"]

Stderr: 0%...
Progress state: E_INVALIDARG
VBoxManage.exe: error: Failed to create the host-only adapter
VBoxManage.exe: error: Assertion failed: [!aGuid.isValid()] at 'D:\tinderbox\win-4.3\src\VBox\Main\src-server\HostNetworkInterfaceImpl.cpp' (74) in long __cdecl HostNetworkInterface::init(class com::Bstr,class com::Bstr, class com::Guid,enum __MIDL___MIDL_itf_VirtualBox_0000_0000_0034).
VBoxManage.exe: error: Please contact the product vendor!
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component HostNetworkInterface, interface IHostNetworkInterface
VBoxManage.exe: error: Context: "int __cdecl handleCreate(struct HandlerArg *,int,int *)" at line 66 of file VBoxManageHostonly.cpp

when running vagrant up on Windows 8 Host to create a new virtual machine with the following Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "precise64"
  config.vm.box_url = "http://files.vagrantup.com/precise64.box"

  config.vm.network :private_network, ip: "192.168.2.3"
  config.vm.network "public_network"
  config.ssh.forward_agent = true

  #[...]

  config.vm.provider :virtualbox do |v|
    v.customize ["modifyvm", :id, "--nictype1", "virtio"]
    v.customize ["modifyvm", :id, "--nictype2", "virtio"]
    v.customize ["modifyvm", :id, "--nictype3", "virtio"]
    v.customize ["modifyvm", :id, "--memory", 2048]
    v.customize ["modifyvm", :id, "--name", "VagrantMachineTest"]
  end

  #[...]

  config.vm.provision :puppet do |puppet|
    puppet.manifests_path = "puppet/manifests"
    puppet.module_path = "puppet/modules"
    puppet.manifest_file  = "default.pp"
    puppet.options = ['--verbose']
  end
end

The problem is solved commenting this line:

#config.vm.network :private_network, ip: "192.168.2.3"

I was executing the same Vagrantfile with Vagrant 1.3.3 and VirtualBox 4.2.x without any error, but i had to update VirtualBox due to incompatibility of the previous version with Kernell 3.11 on other non-Vagrant machines so i upgraded Vagrant to 1.3.5 either for compatibility.

I've tried already run VirtualBox.exe restart without success

But i really need to configure private_network on my VM, so i'm asking if there is something i can do to bypass this error even temporally?

Thanks

@pauloelr

Issue #1671 may be related, but i'm not really sure about that since this issue is old and a little different

@trappar

Having the exact same issue, but with a virtual machine that I have been running for months. Downgrading Virtualbox to 4.2.18 has things running smoothly again: https://www.virtualbox.org/wiki/Download_Old_Builds_4_2

@jgeorge300

Experiencing the issue as well.

@panique

Copy that! The parallel update to Vagrant 1.3.5 and VirtualBox 1.4.3 totally destroyed all vagrant boxes (they are empty/resetted). Tried several combinations of down/updgrade, I can also recommend NOT to update or go back to Vagrant 1.3.4 and VirtualBox 4.2.18.

@capilkey

I too am running into the same issue and it seems like Vagrant is creating a new VirtualBox Host-Only Ethernet Adapter every time I run "vagrant up". I'm now up to "VirtualBox Host-Only Network 5". Shouldn't Vagrant be reusing the existing host-only adapter(s)?

@alexsell

Same problem here (on Windows only) since upgrading Virtualbox to 4.3.0.
System: Windows 8.1, Vagrant 1.3.5, VirtualBox 4.3.0

Error message:
Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "create"]

Stderr: 0%...
Progress state: E_INVALIDARG
VBoxManage.exe: error: Failed to create the host-only adapter
VBoxManage.exe: error: Assertion failed: [!aGuid.isValid()] at 'D:\tinderbox\win
-4.3\src\VBox\Main\src-server\HostNetworkInterfaceImpl.cpp' (74) in long __cdecl
 HostNetworkInterface::init(class com::Bstr,class com::Bstr,class com::Guid,enum
 __MIDL___MIDL_itf_VirtualBox_0000_0000_0034).
VBoxManage.exe: error: Please contact the product vendor!
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component HostNetworkI
nterface, interface IHostNetworkInterface
VBoxManage.exe: error: Context: "int __cdecl handleCreate(struct HandlerArg *,in
t,int *)" at line 66 of file VBoxManageHostonly.cpp

I re-packaged my basebox a couple of days ago, after an update of the the guest tools to 4.3.0. Using the same software versions combination on OS X and Ubuntu host systems with the same Vagrantfile and basebox seems to work well, so it might be a Windows-specific issue.

My Vagrantfile:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|

    config.vm.box = "dev"
    config.package.name = "dev.box"
    config.vm.box_url = "../../images/dev.box"

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

    config.vm.hostname = "dev"
    config.ssh.forward_agent = true

    # Only enable NFS shares on *nix systems (Windows doesn't need).
    # Ref: http://vagrantup.com/v1/docs/nfs.html
    nfs_flag = (RUBY_PLATFORM =~ /linux|darwin/)

    config.vm.synced_folder "../../../", "/srv/mnt", :nfs => nfs_flag

    config.vm.provider :virtualbox do |vb|
        vb.customize ["modifyvm", :id, "--memory", 1536]
        # Enabling share symlinks on Windows systems
        vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/devel", "1"]
    end

    config.vm.provision :puppet do |puppet|
        puppet.module_path = "../../puppet/modules"
        puppet.manifest_file = "default.pp"
    end

end

Vagrantfile has not been modified since weeks and worked on all hosts (including Windows) with the 4.2.16 version of VirtualBox.

I hope someone can look at this bug :).

Many regards

@panique

Every error message in every post on the web regarding this has D:\tinderbox\win... in it. Seems like a hardcoded string bug ;)

@pauloelr

True history...

But if it is the cause of the problem, i don't think the problem is with vagramt since there is no references of this string anywhere arround the vagrant code.

@pauloelr

There is an open issue at virtualbox tracker also about something similar to that here:
https://www.virtualbox.org/ticket/12182

There is a possible fix on the comments below, but i'm away of my other computer right now so i can't test if it work, if someone can do this test and share the results i'll appreciate, otherwise i'll do it myself as soon as i have accces to the other computer.

@alexsell

I tried the suggested sollution from the comments on the oracle bugtracking forum with negative results, problem persists.
It is also reproduceable by manually removing (works) and trying to create (doesn't work) host-only network interfaces directly in the VirtualBox network management GUI. VirtualBox immediately fails on the action with similar error message. More weird thing though: when vagrant fails doing the same via VBoxManage, additional network adapters are added on every try to setup the networking. You need to clean them up manually.

I guess it's a problem of VirtualBox, so I will try to go back to the previous version and see if it works.

@mechastorm

I am confirm that the same thing occurs on Windows 7 Professional 64-bit

@pauloelr

I tried the suggested solution too without success, i even try remove unninstal both vagrant and virtual box and install all over again but the error persist.

@pauloelr

Finally found the solution (workarround)

I did all these steps, i don't know if you need to do then all... but this way worked for me

  1. Unninstall VirtualBox and Vagrant
  2. Remove VirtualBox and Vagrant entire installation directory
  3. Remove direcories ~/.vagrant.d and ~/.VirtalBox (if you have important things here make a backup)
  4. Restart PC
  5. Install VirtualBox and Vagrant Again
  6. Restart again
  7. Open VirtuaBox
  8. Go to File->Preferences->Network->Host-only Networks
  9. Create Manually a new adapater like as follow:
    • IPv4: 192.168.2.1 (in my example my vm ip is 192.168.2.2 you must use the 3 first parts equal as your ip address and replace the last one by 1)
    • Mask: 255.255.255.0
  10. Restart again
  11. Open Prompt as Admin
  12. do a vagrant up

It worked for me but in highly recommend to make a backup of every machine, box or config you think is important before start this

@pauloelr pauloelr closed this
@pauloelr

I'm closing this one since i'ts not a Vagrant problem and there is a workarround already.
If someone want to reopen just post a comment with the reason and i'll do it

@gmanfunky

@pauloelr , I also see this is a problem with virtual box, from what i can tell. It is failing to create host-only interfaces... or at least it is creating them, but returning an error before setting the needed properties.

The important part of the work around is to manually make sure you have an existing host-only interface that services whatever IP address you guest needs.

For example, if your Vagrantfile has:
config.vm.network :private_network, ip: "192.168.2.3"
Then go into File..Properties..Network.. and add an interface. This may result in an error.
Press Okay and navigate back to this dialog to refresh.
Edit one of the adapters to server the network your guest will want. E.g. Set IPv4 address to 192.168.56.1 255.255.255.0

Now, when you vagrant up, Vagrant won't call
vboxmanage.exe hostonlyif create
And you won't get that crazy error that needs to be fixed.

Depending on when the VirtualBox fix happens, maybe vagrant could work around this by handling the error, ID the interface that was created anyway and then re-configure it as needed.

@benatkin

I uninstalled and installed VirtualBox and the error went away. Didn't touch vagrant. Seems the workaround requires fewer steps than it took for @pauloelr.

@millisami

After upgrading to Marvericks, I am getting this error too.
But after google, found the neat way which fixed it.
Just running sudo /Library/StartupItems/VirtualBox/VirtualBox restart and doing vagrant up went smoothly.

@bdcravens

@millisami Thanks a ton - same situation here, that fixed it

@WMeldon

Still giving me issues, even on a 100% fresh machine with no existing VBox installation.

Downgrading for now.

@alexsell

sudoing might work on OS X, but on Windows none of the solutions worked for me, except the one proposed by @gmanfunky (removing all VirtualBox network adapters and creating a new one in the subnet of the vagrant box.)
I always execute vagrant (and therefore vboxmanage) with elevated privileges on Windows anyway, so user rights doesn't seem to be the problem. The issue is not vagrant-related.

Just as a side information for anyone bumping into problems with the current VirtualBox on Win: it seems like 4.3.0 is completely unstable on Windows 8.1 64bit. I can always reproduce an annoying BSOD since upgrading.
See
http://social.technet.microsoft.com/Forums/windows/en-US/2c9418e4-c551-4df7-b86c-15458192b735/critical-structure-corruption-when-using-windows-81-as-a-virtualbox-host?forum=w8itproperf
and
https://forums.virtualbox.org/viewtopic.php?f=6&t=57893

Not funny.

@alexsell

Update: VirtualBox 4.3.2 is out. Oracle fixed the BSOD problem, which is good for me.
Unfortunately, our host interface problem reported in this thread is still there :-/ Reproduceable even without vagrant:
Open VirtualBox GUI, go to File->Global Settings->Network. Try to manually add a host-only interface.You get the error saying:
"Assertion failed: [!Guid.isValid() at 'D:\tinderbox\win-4.3\src\VBox\Main\src-server\HostNetworkInterfaceImpl.cpp" ... etc.etc.
If you close and open the VBox manager again, you see the new interface added correctly (despite the error thrown before).

I wonder if this is a Win8.1. specific problem or all people facing it have all some setting / hardware causing it.

@pauloelr

I Just upgrade to 4.3.2 right now and the error while creating the virtual network adapter is still there
In fact they deleted my previous manually created adapter and i had to create it again to work
But i'm not getting this error while manually adding a host-only interface on the virtualbox, perhaps because i'm using windows 8 and not 8.1

@tuxinaut

@alexsell

We could reproduce it last Friday with Windows7 Vagrant 1.3.5

@philippgerard

Same here with Windows 8.1 x64 and Vagrant 1.3.5 with VirtualBox 4.3.2.

@kokareff

Got same error yesterday. Windows 7 SP1 x64. Reinstalling doesn't helps.

@AlexandreLepretre

VirtualBox 4.3 is a massive failure on Windows and network interface issues occur on all my VMs (even non Vagrant ones).

There's an open ticket on the official bugtracker that I keep checking out every second day: https://www.virtualbox.org/ticket/12182

@alexsell

Guys, it seems like they finally fixed it (I also added report to VBox forum regarding the issue):
See https://www.virtualbox.org/ticket/12182#comment:9
Maybe Win7 users can test this it as well with the new build and confirm.

Cheers,

Alex

@capilkey

The test build version fixes the issue for me on Windows 7 64-bit.

@walkleyn

I can also confirm the issue is fixed now in VBox version 4.3.3 build 90468 on Win8.1 64bit.

@prakmyl

got the same issue.. deleted the folder virtualbox and deleted folders in vagrant.d folder except boxes..it fixed :) cheers,
R.Prakash

@ikoniaris ikoniaris referenced this issue in leucos/ansible-tuto
Closed

Add guidance on setting up Vagrant IP-addresses #37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.