Skip to content

Instantly share code, notes, and snippets.

@Dagimal
Last active August 17, 2022 09:12
Show Gist options
  • Select an option

  • Save Dagimal/0ea1d8c7ee5dc75220c003b85ec11751 to your computer and use it in GitHub Desktop.

Select an option

Save Dagimal/0ea1d8c7ee5dc75220c003b85ec11751 to your computer and use it in GitHub Desktop.
solusi untuk adapter nomor 2 tidak terdeteksi di ubuntu virtual box

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment