Page 1 of 1

Creating network adpaters

Posted: 11. Apr 2015, 23:05
by pirog
This is more a question.

What does VB do behind the scenes to create a network adapter on Windows as is the case for the host-only adapter. Is it wrapping netsh at some point? Wondering how to script the creation/changing of adapters without the dreaded "run as administrator" pre-condition. Ideally you run the script and get the "allow this action" pop up that VB has.

Re: Creating network adpaters

Posted: 11. Apr 2015, 23:23
by mpack
The only host level NIC provided by VirtualBox is the host-only adapter, which is just a Windows NIC device driver working just above the hardware level. Software level protocol APIs such as netsh are not relevant at hardware level. Yes, Windows does require admin rights for installing kernel level drivers.

Re: Creating network adpaters

Posted: 12. Apr 2015, 00:39
by pirog
Right. I am talking specifically about creating host-only adapters.

So VB just uses the windows NIC driver? Or is there some extra glue there? Could you point me to the relevant windows drivers or VB code that does this? Would be SO AWESOME :)

Re: Creating network adpaters

Posted: 12. Apr 2015, 07:00
by BillG
The host only adapter on the host is simply an interface for the vm to connect to. It sets itself with a static IP and has a built-in allocator to give the guest vm NIC a network config in the same IP subnet. It is very similar to a Microsoft loopback interface.

Have you tried using an MLA instead?