VirtualBox Host-Only Networking Configuration: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
No edit summary
 
Line 2: Line 2:


* [[VirtualBox Networking Concepts#Host-Only_Networking_Configuration]]
* [[VirtualBox Networking Concepts#Host-Only_Networking_Configuration]]
=GUI=
==Create the Host-Only Virtual Interface==
Create the host "host-only" virtual interface.
VirtualBox -> Preferences -> Network -> Host-only Networks -> +
They will be automatically named "vboxnet0", "vboxnet1", etc.
This is the name of the interface created on host and is also the the name of the private virtual Ethernet switch this interface and the guest's interfaces will connect to.
==Configure the Host-Only Virtual Interface==
Click on the host-only network name, then on the "screwdriver" icon.
You will be able to configure the Adapter (IPv4 address and mask, IPv6 address and mask length) and the DHCP server for that network.
==Configure Guests==
Network -> Adapter X -> Enable Network Adapter -> Host-only Adapter -> Name:
Use the name of the host-only network just created.
The network interface configuration will then be set using guest-specific means. You can use static addresses or DHCP.
After the guest's reboot, you will able to ssh into guest from the host using the new address.
=Command Line=
<font color=red>
TODO
<pre>
VBoxManage hostonlyif create
VBoxManage modifyvm "VM name" --nic<x> hostonly
</pre>
</font>

Latest revision as of 22:54, 7 January 2016

Internal

GUI

Create the Host-Only Virtual Interface

Create the host "host-only" virtual interface.

VirtualBox -> Preferences -> Network -> Host-only Networks -> +

They will be automatically named "vboxnet0", "vboxnet1", etc.

This is the name of the interface created on host and is also the the name of the private virtual Ethernet switch this interface and the guest's interfaces will connect to.

Configure the Host-Only Virtual Interface

Click on the host-only network name, then on the "screwdriver" icon.

You will be able to configure the Adapter (IPv4 address and mask, IPv6 address and mask length) and the DHCP server for that network.

Configure Guests

Network -> Adapter X -> Enable Network Adapter -> Host-only Adapter -> Name:

Use the name of the host-only network just created.

The network interface configuration will then be set using guest-specific means. You can use static addresses or DHCP.

After the guest's reboot, you will able to ssh into guest from the host using the new address.

Command Line

TODO

VBoxManage hostonlyif create
VBoxManage modifyvm "VM name" --nic<x> hostonly