solusi host dan guest bisa saling ping dan guest tetap mendapatkan akses internet.
- adapter 1 : host only
- adapter 2 : NAT
source : https://unix.stackexchange.com/questions/37122/virtualbox-two-network-interfaces-nat-and-host-only-ones-in-a-debian-guest-on In Ubuntu 18.04 host, VirtualBox 6.1, using Ubuntu 19.04 as guest
In the guest edit /etc/netplan/50-cloud-init.yaml file, add two lines as shown below (before the version line). Looks like the network configuration in the guest is set up only to handle one network and the second one has to be added manually
network:
ethernets:
enp0s3:
dhcp4: true
addresses: [192.xx.xx.xx/24]
enp0s8:
dhcp4: true
version: 2
tambahkan config secara manual.
sudo netplan apply
kalau tidak ada config tersebut di /etc/netplan/ generate secara manual
sudo netplan generate