Stuck Installing Ubuntu 24.04 LTS on VirtualBox 7.0.20 (Windows 11 PC)
In this article, we will provide a detailed guide on how to install Ubuntu 24.04 LTS on VirtualBox 7.0.20 on a Windows 11 PC. We will cover the key concepts and provide step-by-step instructions to help you successfully install Ubuntu on your virtual machine.
Prerequisites
Before we begin, make sure that your Windows 11 PC has virtualization enabled and that you have allocated sufficient resources to your virtual machine. In this example, we have allocated 16GB of RAM, 6 CPUs, and 64GB of storage.
Step 1: Download Ubuntu 24.04 LTS
The first step is to download the Ubuntu 24.04 LTS ISO image from the official Ubuntu website. Once the download is complete, save the ISO image to a location that is easy to find.
Step 2: Create a New Virtual Machine
Open VirtualBox and click on the "New" button to create a new virtual machine. Enter a name for your virtual machine, select "Linux" as the type, and "Ubuntu (64-bit)" as the version. Click "Next" to continue.
In the next screen, allocate the amount of memory (RAM) you want to use for your virtual machine. We recommend allocating at least 4GB of RAM for a smooth experience. Click "Next" to continue.
In the "Hard Disk" section, select "Create a virtual hard disk now" and click "Create". Choose "VDI (VirtualBox Disk Image)" as the disk format and click "Next". Select "Dynamically allocated" as the storage on physical hard disk, and click "Next". Finally, allocate the amount of storage you want to use for your virtual machine and click "Create".
Step 3: Configure the Virtual Machine
Select the virtual machine you just created and click on the "Settings" button. In the "System" section, make sure that the "Acceleration" tab is enabled and that "Enable VT-x/AMD-V" and "Enable Nested Paging" are checked.
In the "Display" section, set the "Screen" to "Scaled" and choose a resolution that matches your Windows 11 display. In the "Storage" section, click on the "Add Hard Disk" button and select "Add Optical Drive". Choose "Host Drive" and select the Ubuntu 24.04 LTS ISO image you downloaded earlier.
Step 4: Install Ubuntu 24.04 LTS
Start the virtual machine and follow the on-screen instructions to install Ubuntu 24.04 LTS. When prompted, select "Install Ubuntu" and choose your preferred language and keyboard layout. Select "Erase disk and install Ubuntu" to use the entire virtual hard disk for Ubuntu. When prompted, select "Continue" to write the changes to disk.
Enter your name, username, and password when prompted. When the installation is complete, remove the Ubuntu 24.04 LTS ISO image from the virtual optical drive and restart the virtual machine.
Troubleshooting
If you encounter any issues during the installation process, make sure that virtualization is enabled in your Windows 11 BIOS settings. You may also need to allocate more resources to your virtual machine or adjust the virtual machine settings in VirtualBox.
- Downloaded Ubuntu 24.04 LTS ISO image
- Created a new virtual machine in VirtualBox with 16GB of RAM, 6 CPUs, and 64GB of storage
- Configured the virtual machine settings, including enabling acceleration and setting the display resolution
- Installed Ubuntu 24.04 LTS on the virtual machine
References
- Ubuntu Desktop Download
- Oracle VM VirtualBox User Manual: Installing VirtualBox
- How to Install Ubuntu on VirtualBox on Windows
#!/bin/bash
# Install VirtualBox
sudo apt update
sudo apt install virtualbox
# Create a new virtual machine
VBoxManage createvm --name "Ubuntu 24.04 LTS" --ostype Ubuntu\_64 --register
# Set the amount of memory (RAM)
VBoxManage modifyvm "Ubuntu 24.04 LTS" --memory 4096
# Create a virtual hard disk
VBoxManage createhd --filename "Ubuntu 24.04 LTS.vdi" --size 64000 --format VDI
# Add the virtual hard disk to the virtual machine
VBoxManage storagectl "Ubuntu 24.04 LTS" --name "SATA Controller" --add sata --controller IntelAhci
VBoxManage storageattach "Ubuntu 24.04 LTS" --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "Ubuntu 24.04 LTS.vdi"
# Add the Ubuntu 24.04 LTS ISO image to the virtual optical drive
VBoxManage storagectl "Ubuntu 24.04 LTS" --name "IDE Controller" --add ide
VBoxManage storageattach "Ubuntu 24.04 LTS" --storagectl "IDE Controller" --port 0 --device 0 --type dvddrive --medium /path/to/ubuntu-24.04-desktop-amd64.iso
# Enable acceleration
VBoxManage modifyvm "Ubuntu 24.04 LTS" --accelerate3d on
VBoxManage modifyvm "Ubuntu 24.04 LTS" --accelerate2d on
VBoxManage modifyvm "Ubuntu 24.04 LTS" --cpu-profile "Intel Core i7-6700K"
# Set the display resolution
VBoxManage setextradata "Ubuntu 24.04 LTS" "CustomVideoMode1" "1920x1080x32"
# Start the virtual machine
VBoxManage startvm "Ubuntu 24.04 LTS" --type headless