Running a Ubuntu Server VM in Virtualbox 🌱

  1. Download Ubuntu Server Download
  2. Launch Virtualbox
  3. Create a New VM by selecting Machine > New

    Name: Ubuntu Server
    Machine Folder: C:\VMs
    Type: Linux
    Version: Ubuntu (64-bit)
    Memory Size: 2048MB
    Hard disk: Create a virtual hard disk now

  4. Click Create
  5. On the Create Virtual Hard Disk dialog

    Name the virtual disk image Ubuntu Server.vdi
    File size: 30 GB
    Hard disk file type: VDI
    Storage on physical hard disk: Dynamically Allocated

  6. Click Create
  7. Select the VM and Click Settings
  8. Select System > Processor
  9. Give the VM at least 2 processors
  10. Select Network
  11. Set the attached to dropdown to Bridged Adapter
  12. Select Storage
  13. Click on the CD-ROM drive
  14. Select the disc dropdown to the right > Choose a virtual optical disc file...
  15. Browse to and select the downloaded Ubuntu Server .iso file
  16. Click OK
  17. Make sure the Ubuntu Server VM is selected and click Start > Normal
  18. Select a language > Press Enter
  19. Select a keyboard layout > Arrow down to select Done > Press Enter
  20. Press Enter to accept the network configuration
  21. Leave the proxy address empty > Press Enter
  22. Leave the mirror address the default value > Press Enter
  23. Leave the storage configuration default > Arrow down to select Done > Press Enter
  24. Press Enter to accept the storage configuration
  25. Arrow down to select Continue > Press Enter
  26. Complete the profile form > Arrow down to select Done > Press Enter
  27. Press spacebar to select installing the SSH server > Arrow down to select Done > Press Enter
  28. Use spacebar to select any additional software installations > Arrow down to select Done > Press Enter
  29. Wait while Ubuntu copies files and installs
  30. Once the installation completes > Arrow down to select Reboot Now > Press Enter
  31. If the reboot gets stuck, manually restart the VM by select Machine > Reset
  32. Welcome to Ubuntu Server

Optional Steps

  1. Log in with the credentials setup during the installation
  2. Run the following commands to install updates
    sudo apt update
    sudo apt upgrade -y
    sudo apt clean
  3. Select Devices > Insert Guest Additions CD image...
  4. Run the following commands to install VirtualBox Guest Additions
    sudo mkdir /media/cdrom
    sudo mount /dev/cdrom /media/cdrom
    sudo apt dkms build-essential linux-headers-generic linux-headers-$(uname -r)
    sudo /media/cdrom/
    sudo reboot
  5. The VM will reboot
  6. Log back into Ubuntu Server