virtualbox 2 machines that communicate with each other

uuidgen

Generates the UUID for a network card

Machine Boots etc...

  • see the current network
    • enpos3 in my case
  • shutdown
  • Leave 1st Network card as NAT (I am guessing)
  • VirtualBox
    • Preferences
    • Network
    • HostOnly
    • Check the IP Address range
    • 192.168.59.3 Is the IP For this HostOnly
    • Now Add New Network Adapter
    • Network is vboxnet0 (192.168.59.1)
    • Reset Mac Addresses
    • Boot the Machine
    • cd /etc/sysconfig/networking-scripts
    • vi ifcfg-enp0s8
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=enp0s8
UUID=c7a23258-9452-4e9a-9c2f-c53f03862eed
DEVICE=enp0s8
ONBOOT=yes
IPADDR=192.168.59.4
PREFIX=24
GATEWAY=192.168.59.0
PEERDNS=yes
PEERROUTES=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes

TO Calculate the UUID of the networkcard uuidgen enp0s8

At this point you should have 1 machine sorted.

Now Clone the machine (linked is fine for short tests)

Edit the hostname, and the ip-address (in network and /etc/hosts)

reboot

And we should be done.