Created
April 6, 2013 21:46
-
-
Save sdoro/5327746 to your computer and use it in GitHub Desktop.
Howto add/remove in VirtualBox a fifth NIC (without GUI) in hostonly networking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VBoxManage modifyvm "vm" --hostonlyadapter5 vboxnetX | |
VBoxManage modifyvm "vm" --nic5 hostonly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VBoxManage modifyvm "vm" --nic5 none |
Listing your hosts network interfaces is done with:
VBoxManage list intnets|bridgedifs|hostonlyifs|natnets
In my case, I have 2 physical net-cards on my server (host) eth0 and eth1
$ VBoxManage list bridgedifs
Name: eth0
GUID: 30687465-0000-4000-8000-109836a72593
DHCP: Disabled
IPAddress: 1.2.3.4
NetworkMask: 255.255.255.xxx
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: <mac-address>
MediumType: Ethernet
Wireless: No
Status: Up
VBoxNetworkName: HostInterfaceNetworking-eth0
Name: eth1
GUID: 31687465-0000-4000-8000-109836a72594
DHCP: Disabled
IPAddress: 0.0.0.0
NetworkMask: 0.0.0.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 10:98:36:a7:25:94
MediumType: Ethernet
Wireless: No
Status: Down
VBoxNetworkName: HostInterfaceNetworking-eth1
Those are the ones I can attach a guest VM network interface to.
So, for example, I want to create a interface on guest vm-name attached to host nic eth0
VBoxManage modifyvm "vm-name" --nic1 bridged --nictype1 82545EM --bridgeadapter1 eth0
Okay, now I want to create a second interface on guest vm-name attached to host nic eth1
VBoxManage modifyvm "vm-name" --nic2 bridged --nictype2 82545EM --bridgeadapter2 eth1
And that's pretty much it 👍
How do I create vboxnetx or list all the vboxnetX without GUI?
Create a new host-only if:
$ VBoxManage hostonlyif vboxnetXY
List host-only if's:
$ VBoxManage list hostonlyifs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do I create vboxnetx or list all the vboxnetX without GUI?