Skip to content

Instantly share code, notes, and snippets.

@rkbalgi
Last active April 8, 2020 09:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rkbalgi/646f62c3700a50cb16ebbbd8583f992a to your computer and use it in GitHub Desktop.
Save rkbalgi/646f62c3700a50cb16ebbbd8583f992a to your computer and use it in GitHub Desktop.
Setting up Ubuntu 19.10 server edition on VirtualBox (osboxes)

Ubuntu 19.10 on VirtualBox (Using osboxes server edition image)

I had few problems setting up Ubuntu 19.10 using a osbox image on my windows 10 (NAT mode). Hopefully, this gist will help those trying the same

Set up networking as NAT mode in Virtual Box

  • Attached Mode: NAT
  • Promiscuos Mode: Allow All
  • Cable Attached - Selected (Port forwarding if necessary - I included 22 as I work by ssh'ing into the box)

Figure out your network interface name

In my case - enp0s3

rkbalgi@osboxes:~$ ip a
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp0s3:  mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:ff:db:cb brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic enp0s3
       valid_lft 85409sec preferred_lft 85409sec
    inet6 fe80::a00:27ff:feff:dbcb/64 scope link
       valid_lft forever preferred_lft forever

Edit /etc/netplan/50-cloud-init.yaml

The name of the file could be different, but it's a YAML file - Edit it so that it looks like this

network:
    version: 2
    ethernets:
            enp0s3:
              dhcp4: yes
$ sudo netplan apply 

Restart the VM and Thats all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment