Prevent auto populate a missing NIC, when a second one is still present.

Here you can provide suggestions on how to improve the product, website, etc.
Post Reply
Thomas_B
Posts: 5
Joined: 23. Apr 2021, 02:38

Prevent auto populate a missing NIC, when a second one is still present.

Post by Thomas_B »

I have setup a VM with 2 bridged-NICs from the host system. When I remove one of the NICs from the host and start the VM without adjusting its network settings VirtualBox throws an Error. So far so good.
But when I now access the network settings of the VM, the "missing" nic is replaced with the remaining NIC from the host system, while also remaining configured as the second network adapter.
At this point you have to remember which one was the original adapter as to not loose the network configuration of the remaining NIC within the VM, when removing one of the two.

Please prevent auto populate a missing NIC when, a second one is still present.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Prevent auto populate a missing NIC, when a second one is still present.

Post by mpack »

Thomas_B wrote: Please prevent auto populate a missing NIC when, a second one is still present.
That is slightly tricky but doable.

Slightly tricky. How I imagine the current code for the settings dialog goes: it will populate a pulldown listbox with a list of all host NICs which have the VirtualBox bridging service enabled on it. It will then select the listbox entry matching the current setting. Of course, slight flaw: what if the current setting doesn't match any device in the list? That's an error condition, so I guess the current code handles the error by selecting the first item in the list, which is what the dialog will show as the setting. And understandable fallback, except it has the confusing effect that you mention.

The only solution that occurs to me is to handle the error by adding the missing item to the list, then select the new entry.

You should raise this on BugTracker as an enhancement request.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Prevent auto populate a missing NIC, when a second one is still present.

Post by mpack »

That said, I just had to deal with this very problem and guess what? It handled it exactly as I outlined above.

This was with VirtualBox 6.1.32. What VBox version are you talking about?
Post Reply