Why does VBoxNetworkName use InterfaceDescription?

Discussions related to using VirtualBox on Windows hosts.

Why does VBoxNetworkName use InterfaceDescription?

Postby jsung » 23. Oct 2021, 12:42

This is somewhat related to [1] and [2].

Why does VBoxNetworkName (from "vboxmanage list bridgedifs") use InterfaceDescription (in PowerShell, "Get-NetAdapter") instead of InterfaceAlias (in "Get-NetIPInterface")?

The reason why I'm asking is because InterfaceDescription is set by the driver and not modifiable [3]. It is not inconceivable that > 1 network adapter that use the same driver, so we end up with "<InterfaceDescription> #<N>". Not the most user friendly way.

In contrast, InterfaceAlias is easily set by the user.

Maybe I'm not understanding something.

I don't see any activity to [2] for 3 y.

[1] "VirtualBox on Windows Hosts" Discussion #88354. viewtopic.php?f=6&t=88354

[2] VirtualBox Ticket #17819. https://www.virtualbox.org/ticket/17819

[3] Google search for "Rename-NetAdapter".
Last edited by scottgus1 on 24. Oct 2021, 14:39, edited 1 time in total.
Reason: added links
jsung
 
Posts: 2
Joined: 23. Oct 2021, 12:09

Re: Why does VBoxNetworkName use InterfaceDescription?

Postby scottgus1 » 24. Oct 2021, 14:52

As best I gather this question and the supporting links, 'vboxmanage list bridgedifs' shows the host network adapters that the Virtualbox Bridged binding has attached to. The linked topics relate to trying to use the UUID of the network adapter instead of the name of the adapter as the identifying information for which adapter to Bridge a VM to. Apparently it is possible to have different accounts on the same computer (or some similar situation) call a network adapter by different names based on locale setting, and the different names upset the VM's Bridged connection. However the UUID is apparently always the same, so using UUID instead of name would help prevent such breaks.

jsung wrote:Why does VBoxNetworkName (from "vboxmanage list bridgedifs") use InterfaceDescription (in PowerShell, "Get-NetAdapter") instead of InterfaceAlias (in "Get-NetIPInterface")?

I'm not sure what 'InterfaceAlias' is. Is that the UUID?

Only a source code guru could hunt through and see if there is a reason why name instead of UUID was chosen. Since the three-year-old enhancement-request Bugtracker ticket has not been acted on, either the devs missed it or there is a compelling reason among Oracle's paying customers not to allow the change. We on the forum would not know the reason.

User code can be contributed, so the 'jsung patch' to allow Bridged use of UUID instead of name would be considered for inclusion.
scottgus1
Site Moderator
 
Posts: 13760
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Why does VBoxNetworkName use InterfaceDescription?

Postby jsung » 24. Oct 2021, 15:25

As best I gather this question and the supporting links, 'vboxmanage list bridgedifs' shows the host network adapters that the Virtualbox Bridged binding has attached to. The linked topics relate to trying to use the UUID of the network adapter instead of the name of the adapter as the identifying information for which adapter to Bridge a VM to. Apparently it is possible to have different accounts on the same computer (or some similar situation) call a network adapter by different names based on locale setting,


OK, I did not know that.

However the UUID is apparently always the same, so using UUID instead of name would help prevent such breaks.


Agree.

I'm not sure what 'InterfaceAlias' is. Is that the UUID?


No, it is just the adapter name ("Get-NetIPInterface" in PowerShell lists the column as "InterfaceAlias").

User code can be contributed, so the 'jsung patch' to allow Bridged use of UUID instead of name would be considered for inclusion.


Got it. I'll see if my time allows.

You can close this discussion.
jsung
 
Posts: 2
Joined: 23. Oct 2021, 12:09


Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: No registered users and 47 guests