Bridge Adapter's Host Interface Selection - How to List

Discussions related to using VirtualBox on Mac OS X hosts.

Bridge Adapter's Host Interface Selection - How to List

Postby Dj Sison » 18. Mar 2014, 05:54

How does Virtual Box filter the host interfaces on the screen where the user can select the interface that the Bridged Adapter is attached to? (please see attached file)

I am currently using VBoxManage to create VMs and set properties such as network settings.
In one of my Linux VMs (that I create on the command line), I assign NIC1 (Network Adapter 1) to a Bridged Adapter using the following command:
Code: Select all   Expand viewCollapse view
VBoxManage modifyvm myLinux --nic1 bridged

But when I start the VM, I get the following error:
Could not start the machine
myLinux because the following
physical network interfaces were not found:

Realtek PCIe GBE Family Controller (adapter
1)

You can either change the machine's network
settings or stop the machine.

It seems that the value "Realtek PCIe GBE Family Controller" is set as the attached interface to the Bridged Adapter (this value maybe from the previously selected value), which is not present in the host (not a network interface of the Mac host).

When I issue the following command, the VM will start correctly.
Code: Select all   Expand viewCollapse view
VBoxManage modifyvm myLinux  --bridgeadapter1 en0

The problem is, I do not want to hardcode the "en0" part.
I want the "en0" part to be the same with Virtual Box's default selected interface when a Bridged Adapter is created.
How can I achieve this?
Attachments
BridgedAdapter.png
BridgedAdapter.png (28.71 KiB) Viewed 6260 times
Dj Sison
 
Posts: 4
Joined: 18. Mar 2014, 05:32
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Fedora, Windows

Re: Bridge Adapter's Host Interface Selection - How to List

Postby socratis » 18. Mar 2014, 09:42

  1. You have to use both commands to make it work. If you use the "--bridgeadapter1" alone it does nothing. See user manual, section 8.8.2.
  2. You can list the bridged adapters by issuing "VBoxManage list bridgedifs" and do some (heavy duty) parsing to figure out the default and then use the "VBoxManage modifyvm myLinux --bridgeadapter1 <adapter>".
  3. This is what the GUI is doing. There is no "default", because default changes. Try to change the order of your NICs in the System Preferences, then create a new VM. Your "default" will be assigned to the first (available/connected?) NIC.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 25865
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: Bridge Adapter's Host Interface Selection - How to List

Postby Dj Sison » 18. Mar 2014, 09:49

I have confirmed 1,2, and 3, and it is exactly as what you have said.
Thank you very much for your help! :D
Dj Sison
 
Posts: 4
Joined: 18. Mar 2014, 05:32
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Fedora, Windows


Return to VirtualBox on Mac OS X Hosts

Who is online

Users browsing this forum: GarryMartin, marvin42 and 42 guests