finding the names of the host's network adapters

This is for discussing general topics about how to use VirtualBox.
Post Reply
adrianh
Posts: 46
Joined: 26. Aug 2009, 21:42
Primary OS: Other
VBox Version: OSE other
Guest OSses: Win7

finding the names of the host's network adapters

Post by adrianh »

Is there a way to find the names of the host's network adapters so that through some scripting means I can bridge to them automagically?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: finding the names of the host's network adapters

Post by Perryg »

As mentioned before yes. Whether or not you can actually do this is depending on your programming abilities. The method that VirtualBox uses can be found in the source code located HERE, but there are a lot of other examples.
adrianh
Posts: 46
Joined: 26. Aug 2009, 21:42
Primary OS: Other
VBox Version: OSE other
Guest OSses: Win7

Re: finding the names of the host's network adapters

Post by adrianh »

I meant with the tools currently available without modifying the source.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: finding the names of the host's network adapters

Post by Perryg »

Who said anything about modifying the source? You asked if it was possible and it is. The source shows you one way. Or there are other ways, and you can even build your own.
adrianh
Posts: 46
Joined: 26. Aug 2009, 21:42
Primary OS: Other
VBox Version: OSE other
Guest OSses: Win7

Re: finding the names of the host's network adapters

Post by adrianh »

Ok, so what you are saying is, that buried in the source is some place that contains the data that I'm looking for where I can trace back to some interface somewhere to get the names of the host adapters?

Do you have an engineering document of the system's structure? This would be a lot to have to go through to find out how to do this.

Or perhaps I'm not understanding your suggestion?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: finding the names of the host's network adapters

Post by Perryg »

It is fairly well spelled out and easy to follow the structure, or you can download the SDK

Google also has a lot of entries on how to detect network adapters. (format specific and generic).
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: finding the names of the host's network adapters

Post by mpack »

@adrianh: I think the problem here is that you are asking how to perform a host OS function (enumerating available devices), using VirtualBox. In fact that isn't VirtualBox's purpose, you should be asking your Q on a appropriate developers forum for the host OS.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: finding the names of the host's network adapters

Post by Perryg »

That and it is still not going to solve the issue unless you modify the VBox source to accept the newly found data.
adrianh
Posts: 46
Joined: 26. Aug 2009, 21:42
Primary OS: Other
VBox Version: OSE other
Guest OSses: Win7

Re: finding the names of the host's network adapters

Post by adrianh »

All I'm asking for is to find the names of the local physical network devices as understood by virtualbox so that I can use VBoxManage to attach them to the guest OS's VM.

Why is that so difficult? It shouldn't be Host OS dependent.
adrianh
Posts: 46
Joined: 26. Aug 2009, 21:42
Primary OS: Other
VBox Version: OSE other
Guest OSses: Win7

Re: finding the names of the host's network adapters

Post by adrianh »

mpack wrote:@adrianh: I think the problem here is that you are asking how to perform a host OS function (enumerating available devices), using VirtualBox. In fact that isn't VirtualBox's purpose, you should be asking your Q on a appropriate developers forum for the host OS.
adrianh wrote:All I'm asking for is to find the names of the local physical network devices as understood by virtualbox so that I can use VBoxManage to attach them to the guest OS's VM.

Why is that so difficult? It shouldn't be Host OS dependent.
BTW, I'm saying it shouldn't be Host OS dependent since if I'm using the VBoxManage interface, it should be able to state the parameters that it would accept if they aren't something as simple as an enumeration. Why should it be something that needs to be interrogated from the Host OS?
Post Reply