Download Amazon Linux 2 to install on VirtualBox

Well, we already have RHEL based operating system to install on a virtual machine such as CetnOS, Rocky Linux, and AlmaLinux. However, if you are Amazon cloud User, then you would like to use Amazon Machine Linux Image (AMI) on your local virtual machine created on VirtualBox, Vmware, and Hyper-V. As Amazon Linux is based on RedHat codes, we can use the same YUM package manager and other commands of RHEL to install and handle various tools and software. Here we will learn the steps to set up and run Amazon Linux 2 on Virtualbox.

How to Install Amazon Linux 2 on VirtualBox

1. Download Amazon Linux VDI Image

The AMI image to install on Virtualbox is not available in ISO format instead directly in the form of Virtual Image as per what kind of virtual machine plaltform you are using. Currently, Amazon Machine Image is available for Hyper-V, KVM, VMware, and VirtualBox. Whereas, while writing this article the latest image was Amazon Linux 2.0.2019 with Long term support that will end in 2023.

Download Amazon Linux VDI Image

2. Seed.ISO file- for root user password

By default, you won’t be able to access or login to your Amazon Linux 2 root user, for that we have to download one more file called Seed.ISO. Here is the link. On the page click- Seed.ISO and you will have it on your system.

Seed ISO for Amazon Linux root password


3. Get VirtualBox

If you already have VirtualBox on your system then you can move to the next, whereas those who have not, can visit and download the setup.

For Ubuntu – you can use: sudo apt install virtualbox


4. Create Amazon Linux Virtual Machine

Step 1: Click on the NEW button on VirtualBox to create a new virtual machine.

Create New  Amazon Linux VirtualBox machine


Step 2: Name your operating system on Virtualbox, you can go for – Amazon Linux and the rest of the things such as Type and Version will automatically get selected.

Create a New Virtual Machine dor AMI


Step 3: Set RAM- Select the amount of memory you want to assign – a minimum of 1 GB or more should be selected for good performance.

Set Memory for Amazon Linux 2


Step 4: As we already have downloaded the Amazon Linux VDI Image, thus we don’t need to create a new one. Instead, we use the one we have on our system. Select “User an existing Virtual hard disk file” and then click on the Folder icon.

Use exisitng Virtual Hard disk on VirtualBox

Step 5: Click on the Add button and select the download Amazon Linux 2 VDI machine image. After that, it will appear in the display area along with other hard disk images. Just select that and hit the Choose button. Then click on Create to finish the process.

Amazon Linux Image Virtual Hard disk add to Virtual BOx


5. Add Seed.ISO file to VirtualBox VM

Step 1: Select the created VM from the left side and hit the Settings button given in the Menu.

Open VM settings

Step 2: From the Settings – Click on the Storage and select the Empty CD icon under Controller: IDE. Then click on the Attributes CD icon and Choose/Create a Virtual Optical Disk.

Select Virtual CD drive

Step 3: Click on the Add button, file explorer will open, select the downloaded Seed ISO file. After that, it will appear in the display area. Select it from there as well and hit the Choose button.

add AWS Seed ISO file to virtualbox

Step 4: Press the OK button.

Seed ISO selected


6. Start AMI Virtual Machine

Now, select AmazonLinux 2 VM from the left side of VirtualBox and hit the Start button.

Start Linux Virtual Machine


7. Boot Screen

Let the default option selected and hit the Enter key.

Amazon Linux 2 Boot menu1


8. Amazon Machine Image Login as root

As Amazon Linux 2 is meant for server usage, there will be no graphical user interface on it by default, instead of a command line. However, you can install GUI manually as per your choice.

To login to the system type username – ec2-user and password – amazon 

Amazon Machine Image Login as root


9. Set Root user password

We don’t want to use the seed.iso file to log in to our AWS Linux on Virtualbox every time, thus let’s set the root user password so that you can easily remove the Seed.ISO file.

sudo passwd root

Set Root user password 1

After that you can remove the Attached Seed.ISO in virtual CD ROM, we don’t need it anymore.  Devices >> Optical Devices >> click Seed.iso and then Force unmount. 

Remove CD rom min

Learn how to install KDE GUI on Amazon Linux-  and if you want some other tutorial on AWS Linux, let us know the comment section is all yours.


Other Articles:


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.