3

I am trying to setup public network for the vagrant box am setting up and i use Windows 10. If i do not put the interface name, vagrant asks for the interface name and without putting what vagrant wants it won't work.

So my question is how do i get the exact interface name from my windows 10 PC to use for vagrant?

OR

How can i let vagrant asks me to choose from list of interface names it can detect?

I have searched and search for how to achieve this but just can't.

config.vm.network "public_network", bridge: "???"

Window's ipconfig doesn't help

Thanks

uberrebu
  • 3,597
  • 9
  • 38
  • 73
  • why can't you just leave `config.vm.network "public_network"` ? else put `bridge: ` like `bridge: "en1: Wi-Fi (AirPort)"` – Frederic Henri Oct 18 '15 at 09:15
  • you can't just put `config.vm.network "public_network"` and leave like that, vagrant will still ask you for the interface name. The example you gave here `bridge: "en1: Wi-Fi (AirPort)"` is for MAC, i am on windows and have no way to find the name i can put out here `bridge: ` when i do `ipconfig` and put the different variation of names possible, vagrant does NOT take it, so my question is, how do i find the name that vagrant want? – uberrebu Oct 18 '15 at 15:23

1 Answers1

3

you can use the VBoxManage tool to find out what are your interfaces.

so you can run - if VBoxManage is not in your PATH, you need to run this from your VBoxManage directory

VBoxManage.exe list bridgedifs

Name:            en0: Wi-Fi (AirPort)
GUID:            00306e65-0000-4000-8000-b8f6b1126bcf
DHCP:            Disabled
IPAddress:       192.168.1.33
NetworkMask:     255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: b8:f6:b1:12:6b:cf
MediumType:      Ethernet
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-en0

Name:            en1: 1 Thunderbolt
GUID:            00316e65-0000-4000-8000-3200139bff20
DHCP:            Disabled
IPAddress:       0.0.0.0
NetworkMask:     0.0.0.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 32:00:13:9b:ff:20
MediumType:      Ethernet
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-en1

Name:            en2: 2 Thunderbolt
GUID:            00326e65-0000-4000-8000-3200139bff21
DHCP:            Disabled
IPAddress:       0.0.0.0
NetworkMask:     0.0.0.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 32:00:13:9b:ff:21
MediumType:      Ethernet
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-en2

etc etc

if you have cygwin or something you can even run VBoxManage list bridgedifs | grep -e "^Name:*" and you'll get the exact name to use in your Vagrantfile.

on windows box with VirtualBox 5.0.6 running

C:\Program Files\Oracle\VirtualBox>vboxmanage list
Oracle VM VirtualBox Command Line Management Interface Version 5.0.6
(C) 2005-2015 Oracle Corporation
All rights reserved.

Usage:

VBoxManage list [--long|-l] vms|runningvms|ostypes|hostdvds|hostfloppies|
                            intnets|bridgedifs|hostonlyifs|natnets|dhcpservers|
                            hostinfo|hostcpuids|hddbackends|hdds|dvds|floppies|
                            usbhost|usbfilters|systemproperties|extpacks|
                            groups|webcams|screenshotformats


C:\Program Files\Oracle\VirtualBox>vboxmanage list bridgedifs
Name:            Intel(R) PRO/1000 MT Network Connection
GUID:            754f0866-bd85-43bc-b403-3c85945b3226
DHCP:            Enabled
IPAddress:       172.16.42.165
NetworkMask:     255.255.255.0
IPV6Address:     fe80:0000:0000:0000:64b8:b1cf:962f:7aa1
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 00:0c:29:64:09:f3
MediumType:      Ethernet
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-Intel(R) PRO/1000 MT Network Connection


Name:            Juniper Network Connect Virtual Adapter
GUID:            ed9c3519-e796-42ce-b782-14ec6819b743
DHCP:            Enabled
IPAddress:       169.254.251.149
NetworkMask:     15.0.0.0
IPV6Address:     fe80:0000:0000:0000:5525:2e65:10a8:fb95
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 00:ff:10:e0:06:1a
MediumType:      Ethernet
Status:          Down
VBoxNetworkName: HostInterfaceNetworking-Juniper Network Connect Virtual Adapter
Frederic Henri
  • 51,761
  • 10
  • 113
  • 139
  • When i run that command `VBoxManage list bridgedifs | grep -e "^Name:*"` i get empty output, and i have tried different iterations `VBoxManage list bridgedifs`, `VBoxManage.exe list bridgedifs` nothing shows anything, and i tried to make sure VBoxManage works with other options and i was able to get output, just not for `bridgedifs` ..what do i do next? – uberrebu Oct 19 '15 at 03:13
  • which version of VB are you using ? I checked a few (4.3.6 and 5.0.6) and always get the option, just try `VBoxManage list` will print you the list of available options. – Frederic Henri Oct 19 '15 at 07:30
  • I did tried `VBoxManage list` and tried other options to make sure VBoxManage is working, and got output for the other options but not for `bridgedifs`. I am using VB 5.0.3 i think, i will update to latest and see if that fixes it. – uberrebu Oct 19 '15 at 14:51