Code: Select all
vboxmanage dhcpserver add --netname intnet2 --ip 10.10.0.1 --netmask 255.255.255.0 --lowerip 10.10.0.2 --upperip 10.10.0.254 --enableCode: Select all
vboxmanage dhcpserver add --netname intnet2 --ip 10.10.0.1 --netmask 255.255.255.0 --lowerip 10.10.0.2 --upperip 10.10.0.254 --enableYou make a new internal network by assigning two or more guests to the same internal network name. You don't need to make the internal network ahead of time. Your posted command makes the network because it's attaching a DHCP server to the network. You can attach guests to the desired network with these Vboxmanage commands (from the manual):Internal networks are created automatically as needed, i.e. there is no central configuration. Every internal network is identified simply by its name. Once there is more than one active virtual network card with the same internal network ID, the VirtualBox support driver will automatically "wire" the cards and act as a network switch.
You can use
VBoxManage modifyvm "VM name" --nic<x> intnet
Optionally, you can specify a network name with the command
VBoxManage modifyvm "VM name" --intnet<x> "network name"
If you do not specify a network name, the network card will be attached to the network intnet by default.