Updated on 2023-06-09 GMT+08:00

Installing a Linux OS on the VM

The procedure varies depending on the image file you use. This section uses Ubuntu 20.04 as an example to describe how to install a Linux OS on the VM.

Prerequisites

You have obtained the ISO image file, for example, Ubuntu-20.04-server.iso.

Procedure

Use the ISO file to install Linux for the empty VM.

  1. In VirtualBox Manager, select the new VM and click Settings.
    Figure 1 Setting the VM
  2. Choose Storage > Empty, click in the Attributes area, and select the ISO image file Ubuntu-20.04-server.iso.
    Figure 2 Selecting the ISO file to be mounted
    Figure 3 Mounted ISO file
  3. Click OK.
  4. In VirtualBox Manager, select the new VM and click Start.
    Figure 4 Starting the VM
  5. Install the OS.
    1. Select English and press Enter.

    2. Select Continue without updating.

    3. Retain the default settings for the keyboard. Select Done

    4. Retain the default settings for the installation base. Select Done.

    5. Retain the default settings for the network. Select Done.

      The installation program will automatically identify the IP address. If the network cannot be found, the installation program can still continue and you can configure the network again after the installation is complete.

    6. Retain the default settings for the proxy. Select Done.

    7. Retain the default settings for the software source. Select Done.

    8. Retain the default settings for disk partitioning (use an entire disk and set up this disk as an LVM group). Select Done.

      The file system information will be displayed. Check it and select Done.

      Confirm the destructive action and select Continue.

    9. Configure the server name, username, and password. Select Done.

      Your name: It is not a username for logging in to the server. You can consider it as server description.

      Your Server's name: It is a unique server name on the same network. The name cannot contain uppercase letters.

      Pick a username: It is a username for logging in to the server. If you forget it or its password, you will not be allowed to log in to the server.

      Choose a password: It is the password for logging in to the server.

      Confirm your password: Enter your password again.

    10. Install SSH so that you can remotely connect to the Linux server.

      Select Install OpenSSH server. Then, press Tab to select Done.

    11. Select Done to start the OS installation.

    12. After the installation is complete, select Reboot to restart the system.