Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Creating VM With Vagrant 1.3.5 and VirtualBox 4.3.0 #2392

Closed
pauloelr opened this issue Oct 18, 2013 · 50 comments
Closed

Error Creating VM With Vagrant 1.3.5 and VirtualBox 4.3.0 #2392

pauloelr opened this issue Oct 18, 2013 · 50 comments

Comments

@pauloelr
Copy link

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
Copy link
Author

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

@trappar
Copy link

trappar commented Oct 18, 2013

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
Copy link

Experiencing the issue as well.

@panique
Copy link

panique commented Oct 20, 2013

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.

@brunowego
Copy link

Thanks @panique!

@capilkey
Copy link

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
Copy link

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
Copy link

panique commented Oct 23, 2013

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

@pauloelr
Copy link
Author

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
Copy link
Author

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
Copy link

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
Copy link

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

@pauloelr
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link

@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
Copy link

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
Copy link

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
Copy link

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

@WMeldon
Copy link

WMeldon commented Oct 30, 2013

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

Downgrading for now.

@alexsell
Copy link

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
Copy link

alexsell commented Nov 3, 2013

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
Copy link
Author

pauloelr commented Nov 3, 2013

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
Copy link

tuxinaut commented Nov 4, 2013

@alexsell

We could reproduce it last Friday with Windows7 Vagrant 1.3.5

@philippgerard
Copy link

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

@kokareff
Copy link

kokareff commented Nov 5, 2013

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

@LPAlex
Copy link

LPAlex commented Nov 7, 2013

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
Copy link

alexsell commented Nov 7, 2013

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
Copy link

capilkey commented Nov 7, 2013

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

@walkleyn
Copy link

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

@prakmyl
Copy link

prakmyl commented Dec 7, 2013

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

@gengxuelei
Copy link

4.3.26有bug,换成4.3.24就正常了,覆盖安装不影响之前配置的虚拟机

@panique
Copy link

panique commented Jun 6, 2015

@dianniu Why are you commenting in chinese ? Nobody is able to understand you. What is wrong with these people :/ ?

@BryceHayden
Copy link

@pauloelr your solution worked for me. Thank you.

@helgatheviking
Copy link

@pauloelr @gmanfunky I know it has been almost 2 years, but the problem still exists in VirtualBox 4.3.28 + Win 7. Your collective solution is the only thing that worked for me after several hours of searching. Thank you!

@gengxuelei
Copy link

Virtualbox 4.3.26 buggy, change to 4.3.24 is normal, reinstall does not affect the virtual machine configuration.This is the simplest solution

@Master-Chief-2007
Copy link

Will confirm.... I also installed VirtualBox 4.3.24 after a lot of frustration. (Should 'v found the bottom of this thread sooner!) . I am also using Windows 7 as host.
Now it is resolved. Phew!
Thanks to all who have commented above.

Just for reference or search engines, my log output was:

==> 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_FAIL
VBoxManage.exe: error: Failed to create the host-only adapter
VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available)
VBoxManage.exe: error: Context: "int __cdecl handleCreate(struct HandlerArg *,int,int *)" at line 68 of file VBoxManageHostonly.cpp

@MichelAraujo
Copy link

I'm having this same problem now with windows 10

@sfengyuan
Copy link

Hey, @MichelAraujo , @pauloelr 's method still works for windows 10.

You don't need to uninstall or restart anythings. Below is under VirtualBox 5.0 ,

  1. Run VirtualBox(GUI program)
  2. press ALT-F then ALT-G to open the 'global settings'( I am not sure what are the texts in English.)
  3. Network->Host-only Networks

Edit the adapter address which has the largest number to match your vagrant settings.
In my machine, the ip of vagrant box is : "192.168.10.10",(check it in the .yaml file under your box directory), so I fill the #3 adapter' field with 192.168.10.1 and 255.255.255.0.

  1. close VirtualBox GUI and Run :vagrant up .

@ghost
Copy link

ghost commented Jul 31, 2015

Thanks, @sensui7.

This fixed the issue I was having as well. Same one as above. deleted all the unused adapaters edited the highest one and ran vagrant up. Thanks!

@panique
Copy link

panique commented Jul 31, 2015

FYI Vagrant is on 1.7.x now, VirtualBox on 5.x, so may I ask the poeple still having the problem: Which versions are you using ?

@pietervanh
Copy link

Still happening Vagrant 1.7.4 and VirtualBox 5.0.0
Can we bypass that vagrant doesn't remove / create the network adapters?

@ITDudeJeroen
Copy link

I had the same problem after installing Windows 10.
Changing the host-only network finaly fixed the problem for me.

I first installed the latest VirtualBox 5 and Vagrant 1.7.4 which didn't help but after changing the host-only network it started working again.

Thank you @pauloelr

@Reklino
Copy link

Reklino commented Aug 2, 2015

@ITDudeJeroen I am still having this issue on Windows 10 and can't seem to get it working by changing the host-only network. Can you share your settings?

@Reklino
Copy link

Reklino commented Aug 2, 2015

@yellajaswanth
Copy link

Uff Finally!! Thanks @sensui7
That fixed the issue.

@bjorngrunde
Copy link

I can confirm @gmanfunky is right. Uninstalled virtualbox 5.0 and installed 5.0.2 on Windows 10. worked like a charm.

@bambangsarif
Copy link

Thanks @sensui7
I did the opposite, change the vagrantfile setting to match the virtualbox's host-only adapter network address. It works.

@t-rekttt
Copy link

Just turn off your Hyper-V and restart your computer. That worked for me

@aelsharif
Copy link

This worked for me: Open Virtualbox and remove the VM then run vagrant up. This is an easy fix. No need to uninstall anything.

@hashicorp hashicorp locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests