User Tools

Site Tools


wiki:enable_networking_between_vms_virtualbox

Enable networking between VMs in Virtualbox

In Settings>Network of the VM set “Attached to: Internal network”

On host add DHCP server:

VBoxManage dhcpserver add --netname intnet --ip 10.13.13.100 --netmask 255.255.255.0 --lowerip 10.13.13.101 --upperip 10.13.13.254 --enable

To delete the server:

VBoxManage dhcpserver remove --netname intnet

This only enables communication between the VMs. If a VM needs internet access you should add a new network adapter in Settings>Network>Adapter 2>Attached to NAT and then configure the interface in /etc/network/interfaces e.g.

 
# The loopback network interface
auto lo
iface lo inet loopback
# NAT
auto enp0s3
iface enp0s3 inet dhcp
# Host only
auto enp0s8
iface enp0s8 inet dhcp

Tested on

See also

References

wiki/enable_networking_between_vms_virtualbox.txt · Last modified: 2022/09/30 14:23 by antisa

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki