Creating network adpaters

Discussions related to using VirtualBox on Windows hosts.
Post Reply
pirog
Posts: 2
Joined: 11. Apr 2015, 22:57

Creating network adpaters

Post 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.
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: Creating network adpaters

Post 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.
pirog
Posts: 2
Joined: 11. Apr 2015, 22:57

Re: Creating network adpaters

Post 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 :)
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Creating network adpaters

Post 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?
Bill
Post Reply