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

Make destroying and recreating of hostonly adapter optional #1733

Closed
fsimmend opened this issue May 14, 2013 · 8 comments
Closed

Make destroying and recreating of hostonly adapter optional #1733

fsimmend opened this issue May 14, 2013 · 8 comments

Comments

@fsimmend
Copy link

On Windows systems destroying and recreating the hostonly adapter every time you run a vagrant destroy and a vagrant up has two major drawbacks:

  • creating adapters requires admin rights and you need to click on UAC popup or you aren't even allowed to do so in restricted environments. We have lots of customers, where devs aren't allowed to have admin rights. For those customers an initial installation with VirtualBox/VMware + one correct configured adapter would mean that they could use vagrant as their workflow and man they loved it.
  • windows/VirtualBox does not like it when create adapters in 50% of the creations windows runs into problems and then provides the adapter with an APIPA address (169.254.x.x) plus default subnet mask (255.255.0.0). When this happes you are screwed, vagrant continues runs the providers and probably everything wen't well but hey you cannot talk to your box any more or in multiple vm case the boxes can't talk to each other.

@mitchellh : we talked about this at chefconf and you told me that i should create the issue, here it is.

@fsimmend
Copy link
Author

you can close #1014 btw.

@thasmo
Copy link

thasmo commented May 14, 2013

I've also encountered the problem with a host adapter being created with the mentioned IP (169.254.x.x) and subnet mask (255.255.0.0) and somehow really had problems to delete the adapter again.

@akshah123
Copy link

I have also seen this problem with windows 8. Has anyone found a work around that might get this to work until this issue is resolved? I have tried pretty much everything including re-installing virtualbox and destroying and rebuilding the box.

@fsimmend
Copy link
Author

as i've written in #1014 , you can create a dummy VBox definition, that uses a once correctly configured adapter and by doing that, prevent Vagrant from destroying and recreating it.

@akshah123
Copy link

Hi fsimmend,

Thanks for the reply. The problem is that I don't have any "correctly" configured adapters. Every adapter has this problem. Also, when I try to update it in "Network and security center" in windows, I get following error:

"in order to configure tcp/ip, you must install and enable a network adapter card"

I tried manually creating a box (outside of vagrant) but even that doesn't succeed.

@mpiasta-ca
Copy link

Having major issues with this as well. I'm on "Windows 8" and it really screws up the network adapters. I used to be able to create a host-only adapter with an IP like "192.168.30.1", but after using vagrant for a while, whenever I try even making a manual host-only adapter, it always changes to "169.254.xxx.xxx". There is serious issues when combining Windows 8, Virtualbox, and Vagrant -- to the point that my internet connection gets corrupted, and I have to uninstall and reinstall the Ethernet adapter driver on my machine to get it working again. Wasted so much time in the past few weeks because of these issues.

@mpiasta-ca
Copy link

Here I am still a month later. I updated my network adapter to latest driver, but no help there. Windows 8 still refuses to let me use my own IP address and always returns to a random APIPA address (169.254.x.x). I can't even choose my own APIPA address. Everytime I restart Vagrant, it launches a new host-only connection.

As @fsimmend originally mentioned, we need a way to block Vagrant from trying to create a new host-only adapter. ie. something like this:

config.vm.network :private_network, ip: "169.254.40.71", create_new: false

Where setting "create_new" to false would skip trying to create a new host-only adapter.

@mitchellh
Copy link
Contributor

@mpiasta-ca Vagrant only attempts to create a new host only network adapter if no other host only network adapter exists that matches your IP subnet/mask.

As for the original issue, as I said in #1324, I might just disable host only network creation in Vagrant, so this will be fixed. Watch that issue!

@ghost ghost locked and limited conversation to collaborators Apr 15, 2020
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

5 participants