Running an Amazon Linux (AL2) VM in VirtualBox 🌱

What is Amazon Linux?

Amazon Linux 2 is a Linux operating system from Amazon Web Services (AWS). It provides a security-focused, stable, and high-performance execution environment to develop and run cloud applications. -https://aws.amazon.com/amazon-linux-2

Preparation

  1. Download ImgBurn Download
  2. Download the Amazon Linux virtual disk image (.vdi) Download
  3. Download the sample Amazon Linux cloud init (seed.iso) Download
  4. Extract the downloaded seed.iso file with 7-Zip
  5. Edit meta-data in a text editor
  6. Update local-hostname as needed > Save the changes > Close
  7. Edit user-data in a text editor
  8. Update as needed to create users in the VM > Save the changes > Close
  9. Extract the downloaded ImgBurn .exe file with 7-Zip
  10. Launch ImgBurn.exe inside the extracted folder
  11. Select Build mode from the main menu
  12. Click Browse for a file > Browse to and select the updated meta-data and user-data files edited earlier > Click Open
  13. At the top right of the window, select the Options tab
  14. Set the File System to ISO9660 + Joliet
  15. Select the Labels tab
  16. Set the two labels to cidata
  17. Click the browse icon next to the destination folder
  18. Browse to the downloads location and name the file updated-seed.iso > Click Save
  19. Click the large icon at the bottom left of the window to build the iso

Creating the VM

  1. Launch VirtualBox Manager
  2. Create a New VM by selecting Machine > New

    Name: Amazon Linux
    Folder: C:\VMs
    ISO Image: <not selected>
    Type: Linux
    Version: Other Linux (64-bit)
    Base Memory: 2048 MB (or more)
    Processors: 1 (or more)
    Hard disk: Do Not Add a Virtual Hard Disk

  3. Click Finish
  4. Right click the VM > Show in Explorer
  5. Copy the downloaded .vdi file and the updated-seed.iso files inside the VM folder
  6. Back in VirtualBox Manager, select the VM and Click Settings
  7. Select Storage
  8. Click the Add hard disk icon > Browse to and select the Amazon Linux .vdi downloaded earlier
  9. Click the Add optical disc icon > Browse to and select the updated-seed.iso file created earlier
  10. Select Network
  11. Set the attached to dropdown to Bridged Adapter
  12. Click OK
  13. Make sure the Amazon Linux VM is selected and click Start > Normal
  14. Once the boot process completes, login using the credentials created in user-data
  15. Welcome to Amazon Linux