Skip to main content

VMWare: Install Ubuntu 24.04

Below is a comprehensive, step‐by‐step guide for deploying an Ubuntu 24.04 headless server as a virtual machine in VMware vCenter (version 7 or 8). This tutorial covers everything from obtaining the ISO and uploading it to your datastore, creating a new VM, performing the installation, and carrying out basic post-deployment configuration.

Important:

  • Ensure you have administrative privileges in vCenter.
  • Back up any important data before making changes.
  • A headless server does not include a desktop GUI.

1. Pre-Deployment Preparations

a. Verify Requirements

  • vCenter Access: VMware vCenter 7/8 environment with rights to create VMs.
  • Hardware Resources: Ensure the host/cluster has enough CPU, RAM, and storage for your VM.
  • ISO Image: Download the Ubuntu 24.04 Server ISO from Ubuntu Server Downloads.

b. Upload the Ubuntu ISO to a Datastore

  1. Log In to vCenter:
    Open the vSphere Client and log in to your vCenter instance.

  2. Select a Datastore:
    Navigate to Storage and choose the datastore where you’d like to store the ISO.

  3. Upload the ISO:

    • Right-click the datastore and select Upload Files.
    • Browse for the downloaded ubuntu-24.04-live-server-amd64.iso file and upload it.
    • Note the datastore path for later use.

2. Create a New Virtual Machine in vCenter

a. Launch the New VM Wizard

  1. Right-Click Host/Cluster:
    In the vSphere Client inventory, right-click your desired host or cluster and select New Virtual Machine.

  2. Choose Creation Method:

    • Select Create a new virtual machine and click Next.

b. Configure VM Settings

  1. Name and Location:

    • Name: Enter a meaningful name (e.g., Ubuntu24-Server).
    • Folder/Resource Pool: Choose the appropriate folder or resource pool.
  2. Select a Compute Resource:

    • Choose the host or cluster where the VM will run.
  3. Select a Storage:

    • Choose the datastore where the VM’s virtual disk will reside.
  4. Compatibility & Guest OS:

    • Compatibility: Use the default or choose one that fits your environment.
    • Guest OS:
      • Family: Linux
      • Version: Ubuntu Linux (64-bit)

      Note: Ubuntu 24.04 may not be explicitly listed; select the closest match (Ubuntu 64-bit).

  5. Configure Virtual Hardware:

    • CPU: Allocate at least 1–2 vCPUs.
    • Memory: Allocate at least 2 GB (more if your workloads require it).
    • Disk: Create a virtual disk of 20 GB or more (adjust based on your needs).
    • Network: Add a network adapter (VMXNET3 is recommended) and ensure it’s connected.
    • CD/DVD Drive:
      • Select Datastore ISO File.
      • Browse to the location where you uploaded the Ubuntu 24.04 ISO.
      • Check the option Connect At Power On.
  6. Finish the Wizard:
    Review your settings and click Finish to create the VM.


3. Booting and Installing Ubuntu 24.04 Server

a. Power On the VM and Open the Console

  1. Start the VM:
    Right-click the newly created VM and select Power On.
  2. Launch Console:
    Open the VM console from the vSphere Client to interact with the installation.

b. Boot from the ISO and Begin Installation

  1. Boot Menu:
    • The VM should boot from the ISO automatically. If not, enter the VM’s BIOS/UEFI (using the console’s key prompts) and adjust the boot order to boot from the CD/DVD drive.
  2. Select “Install Ubuntu Server”:
    • At the text-based installer menu, select Install Ubuntu Server and press Enter.

c. Follow the Text-Based Installation Wizard

  1. Language and Keyboard:

    • Select Language: Choose your preferred language.
    • Keyboard Layout: Confirm or adjust the layout.
  2. Network Configuration:

    • The installer will attempt to configure networking via DHCP.
    • If you need a static IP, follow the prompts to set it manually.
  3. Storage Configuration:

    • Partitioning Options:
      • Choose Guided – use entire disk for simplicity (this will erase any data on the virtual disk).
      • Optionally, choose Manual if you wish to customize partitions.
    • EFI Partition:
      • For UEFI-based VMs, ensure an EFI System Partition is created (usually around 300–500 MB, formatted as FAT32).
  4. User and SSH Setup:

    • Profile Setup:
      • Enter your full name, username, and a secure password.
    • SSH Server:
      • When prompted, choose to install and enable the OpenSSH server. This is essential for remote management of your headless server.
  5. Finalizing Installation:

    • Review your configuration on the summary screen and confirm to begin the installation.
    • The installer will copy files and configure the system. This may take several minutes.
  6. Complete Installation:

    • Once the installation is complete, you’ll be prompted to remove the installation media.
    • In vCenter, edit the VM’s settings to disconnect the ISO from the CD/DVD drive.
    • Reboot the VM.

4. Post-Installation Configuration

a. Log In to Your New Server

  • Console or SSH:
    Use the VM console or connect via SSH (if configured during installation) using:
    ssh yourusername@<vm_ip_address>

b. Update and Upgrade Packages

  1. Update Package Lists:
    sudo apt update
  2. Upgrade Packages:
    sudo apt upgrade -y

c. Secure Your Server

  1. Disable Root SSH Login (if not already done):
    sudo nano /etc/ssh/sshd_config
    • Find the line PermitRootLogin and set it to no.
    • Save and exit (Ctrl+X, then Y, then Enter).
  2. Restart SSH Service:
    sudo systemctl restart ssh

d. Configure the Firewall with UFW

  1. Allow SSH Connections:
    sudo ufw allow ssh
    • If you changed the SSH port, allow that port instead (e.g., sudo ufw allow 2222/tcp).
  2. Enable UFW:
    sudo ufw enable
  3. Check Firewall Status:
    sudo ufw status verbose

e. Install Essential Tools

  • For basic system administration, install packages such as:
    sudo apt install build-essential curl git vim htop -y

5. Final Thoughts

  • Snapshots:
    Use vCenter’s snapshot feature to create a restore point after configuring your server.
  • Monitoring & Backups:
    Consider setting up monitoring tools and regular backups to safeguard your VM.
  • Further Customization:
    Explore additional packages and configurations based on your server’s intended role.

Your Ubuntu 24.04 headless server is now deployed on VMware vCenter and ready for further customization and application deployment. Enjoy your new virtual server environment!