Recipe "Connecting VirtualBox VMs among each other by VirtualBox host-only network"

From SMW CindyKate by dataspects
Component 947742
Jump to navigation Jump to search
[edit]
Keywords/Contexts

VirtualBox

Annotations
{{#compound_query:Component 947742Property "-Has subobject" has a restricted application area and cannot be used as annotation property by a user.UseCaseMotivation;?HasDirection;?IsMotivating;?IsMotivatedBy;?HasReasoning
Property "-Has subobject" has a restricted application area and cannot be used as annotation property by a user.Recipe "Connecting VirtualBox VMs among each other by VirtualBox host-only network";?HasDirection;?IsMotivating;?IsMotivatedBy;?HasReasoning Property "-Has subobject" has a restricted application area and cannot be used as annotation property by a user.Recipe "Connecting VirtualBox VMs among each other by VirtualBox host-only network";?HasDirection;?IsMotivating;?IsMotivatedBy;?HasReasoning
name=MotivationsDeclaredOnThisPageResultItem|link=none}}
Motivations
Lua error in Module:Motivations at line 23: attempt to concatenate field 'hasReasoning' (a nil value).
[edit]

Content


Set up host-only network

user@host:~$ set_up_host-only_network.sh
#!/bin/bash

VBoxManage hostonlyif create #Creates a new vboxnet<N> interface on the host OS.
VBoxManage hostonlyif ipconfig vboxnet0 -ip 172.16.0.254 -netmask 255.255.255.0
VBoxManage dhcpserver add --ifname vboxnet0 --ip 172.16.0.1 --netmask 255.255.255.0 --lowerip 172.16.0.2 --upperip 172.16.0.10
VBoxManage dhcpserver modify --ifname vboxnet0 --disable

Configure VMs

For each VM supposed to be part of the host-only network:

Configure network adapter

VirtualBox VM Settings Network Adapter Host-onlyAdapter vboxnet0.png

Enable interface

/etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet dhcp

https://gist.github.com/pjdietz/5768124