Background
HOME / IT / PROXMOX-UBUNTU-INSTALLATION

Installing Ubuntu Instances on Proxmox: Complete Guide

Step-by-step guide to creating, installing, and configuring Ubuntu virtual machines in Proxmox VE for your home lab

rnrran's profile picture
rnrran
Jan 20, 202520 min read
rnrran's avatar

Written by

rnrran

Feature added soon

Installing Ubuntu Instances on Proxmox: Complete Guide

Introduction

Ubuntu Server is one of the most popular Linux distributions for virtualized environments, making it an excellent choice for Proxmox VMs. This guide will walk you through the complete process of creating and configuring Ubuntu Server instances in Proxmox VE, from initial VM creation to post-installation optimization.

Whether you're setting up web servers, application servers, or development environments, this guide covers everything you need to know.

Prerequisites

  • Proxmox VE installed and accessible via web interface
  • Ubuntu Server ISO image downloaded
  • Basic understanding of Linux command line
  • Network access to download packages

Part 1: Preparing the Ubuntu ISO

Download Ubuntu Server

  1. Visit the Ubuntu Server download page
  2. Download the latest LTS (Long Term Support) version
    • Currently: Ubuntu 24.04 LTS (Noble Numbat)
    • LTS versions receive 5 years of support
  3. Verify the ISO checksum (optional but recommended):
# Download checksum file
wget https://releases.ubuntu.com/24.04/SHA256SUMS

# Verify ISO
sha256sum ubuntu-24.04-server-amd64.iso

Upload ISO to Proxmox

  1. Access Proxmox Web Interface: Navigate to https://your-proxmox-ip:8006

  2. Upload ISO:

    • Go to local storage (or your preferred storage)
    • Click on Content tab
    • Select ISO Images from the dropdown
    • Click Upload button
    • Select your Ubuntu Server ISO file
    • Wait for upload to complete (may take several minutes)

Alternatively, upload via command line:

# SSH into Proxmox host
scp ubuntu-24.04-server-amd64.iso root@proxmox-ip:/var/lib/vz/template/iso/

Part 2: Creating the Ubuntu VM

Step 1: Create New Virtual Machine

  1. Click Create VM button (top right corner)

  2. General Tab:

    • VM ID: 100 (or any available number, 100-999 for VMs)
    • Name: ubuntu-server-01 (descriptive name)
    • Resource Pool: Leave default or select a pool
    • Click Next

Step 2: Operating System Configuration

  1. Use CD/DVD disc image file (iso): Select this option
  2. Storage: Select local (or your ISO storage location)
  3. ISO image: Select your uploaded Ubuntu Server ISO
  4. Guest OS:
    • Type: Linux
    • Version: 6.x - 2.6 Kernel (or 5.x - 2.6 Kernel for older Ubuntu)
  5. Click Next

Step 3: System Settings

  1. Graphics Card: Default (VGA) - sufficient for server installations
  2. Machine: Default (i440fx) or q35 (for newer features)
  3. Qemu Agent: Enable this - allows better VM management
  4. SCSI Controller: VirtIO SCSI single (recommended for performance)
  5. Click Next

Step 4: Hard Disk Configuration

  1. Bus/Device: SCSI (recommended) or VirtIO Block
  2. Storage: local-lvm (or your preferred storage)
  3. Disk size (GB):
    • Minimum: 20GB for basic server
    • Recommended: 40GB for development
    • Production: 100GB+ depending on needs
  4. Cache:
    • Write back: Best performance (recommended for lab)
    • None: Safest (for production)
  5. Discard: Enable if using thin provisioning (saves space)
  6. SSD emulation: Enable if using SSD storage
  7. Click Next

Step 5: CPU Configuration

  1. Sockets: 1 (standard)
  2. Cores:
    • Minimum: 1 core
    • Recommended: 2-4 cores
    • Adjust based on host resources and VM needs
  3. Type:
    • host: Best performance (uses host CPU features)
    • kvm64: Better compatibility
  4. Enable NUMA: Only if using multiple CPU sockets
  5. Click Next

Step 6: Memory Configuration

  1. Memory (MB):
    • Minimum: 1024 MB (1GB) for basic Ubuntu Server
    • Recommended: 2048-4096 MB (2-4GB) for most use cases
    • Development: 4096-8192 MB (4-8GB)
    • Adjust based on applications you'll run
  2. Ballooning Device: Enable for dynamic memory management
  3. Click Next

Step 7: Network Configuration

  1. Bridge: vmbr0 (default bridge, connects to your physical network)
  2. Model:
    • VirtIO: Best performance (recommended)
    • Intel E1000: Better compatibility
  3. MAC Address: Auto-generated (or set custom)
  4. VLAN Tag: Leave empty unless using VLANs
  5. Firewall: Enable if using Proxmox firewall
  6. Click Next

Step 8: Confirm and Create

  1. Review all settings
  2. Check Start after created if you want to boot immediately
  3. Click Finish

Part 3: Installing Ubuntu Server

Step 1: Start the VM

  1. Find your VM in the left sidebar
  2. Click on the VM name
  3. Click Start button (or it may start automatically if you enabled it)

Step 2: Open Console

  1. Click Console tab
  2. You should see the Ubuntu Server installer boot screen

Step 3: Ubuntu Installation Process

Language and Keyboard

  1. Language: Select your preferred language (English recommended)
  2. Keyboard Layout: Select your keyboard layout
  3. Press Done (F10 or Enter)

Network Configuration

  1. Hostname: Enter a hostname (e.g., ubuntu-server-01)
  2. Network Interface: Usually ens18 or eth0
  3. IPv4 Configuration:
    • Method:
      • DHCP: Automatic (easiest for lab)
      • Static: Manual configuration (recommended for servers)
    • If Static:
      • Subnet: Your network subnet (e.g., 192.168.1.0/24)
      • Address: Desired IP (e.g., 192.168.1.100)
      • Gateway: Router IP (e.g., 192.168.1.1)
      • Name Servers: DNS servers (e.g., 8.8.8.8 1.1.1.1)
  4. Proxy: Leave empty unless behind a proxy
  5. Press Done

Storage Configuration

  1. Storage Setup:
    • Use An Entire Disk: Simplest option (recommended for VMs)
    • Custom Storage Layout: Advanced partitioning
  2. Disk: Select your virtual disk
  3. Storage Configuration:
    • Set Up This Disk As An LVM Group: Recommended
    • Encrypt The LVM Group: Optional (adds security overhead)
  4. Press Done
  5. Confirm disk changes: Continue

Profile Setup

  1. Your Name: Enter your name
  2. Server Name: Hostname (usually pre-filled)
  3. Username: Create a username (avoid root or admin)
  4. Password: Set a strong password
  5. Confirm Password: Re-enter password
  6. Press Done

SSH Setup

  1. Install OpenSSH Server: Enable this (recommended)
  2. Import SSH Identity: Optional (for key-based auth)
  3. Press Done

Featured Server Snaps

  1. Select any additional software you want:
    • Docker: Container platform
    • MicroK8s: Kubernetes distribution
    • LXD: System container manager
    • Others as needed
  2. Press Done

Installation Complete

  1. Wait for installation to complete (5-15 minutes)
  2. When finished, select Reboot Now
  3. The VM will reboot into your new Ubuntu Server

Part 4: Post-Installation Configuration

Step 1: Initial Login

  1. After reboot, login with your username and password
  2. You should see the Ubuntu welcome message

Step 2: Update System

# Update package lists
sudo apt update

# Upgrade installed packages
sudo apt upgrade -y

# Install additional useful packages
sudo apt install -y curl wget git vim net-tools

Step 3: Install Qemu Guest Agent

The Qemu Guest Agent improves VM management in Proxmox:

# Install Qemu Guest Agent
sudo apt install -y qemu-guest-agent

# Enable and start the service
sudo systemctl enable qemu-guest-agent
sudo systemctl start qemu-guest-agent

# Verify it's running
sudo systemctl status qemu-guest-agent

In Proxmox: After installing, go to VM → HardwareOptionsQemu Guest AgentEnable

Step 4: Configure Network (if needed)

If you need to change network settings:

# Edit network configuration
sudo nano /etc/netplan/00-installer-config.yaml

Example configuration:

network:
  version: 2
  ethernets:
    ens18:
      dhcp4: false
      addresses:
        - 192.168.1.100/24
      routes:
        - to: default
          via: 192.168.1.1
      nameservers:
        addresses:
          - 8.8.8.8
          - 1.1.1.1

Apply changes:

sudo netplan apply

Step 5: Configure Firewall (UFW)

# Enable UFW
sudo ufw enable

# Allow SSH (important!)
sudo ufw allow 22/tcp

# Allow other services as needed
sudo ufw allow 80/tcp   # HTTP
sudo ufw allow 443/tcp  # HTTPS

# Check status
sudo ufw status

Step 6: Set Up SSH Key Authentication (Recommended)

# On your local machine, generate SSH key (if you don't have one)
ssh-keygen -t ed25519 -C "your_email@example.com"

# Copy public key to Ubuntu server
ssh-copy-id username@ubuntu-server-ip

# Test SSH key login
ssh username@ubuntu-server-ip

Step 7: Configure Timezone

# Set timezone
sudo timedatectl set-timezone America/New_York  # Replace with your timezone

# Verify
timedatectl

Step 8: Install Common Development Tools

# Build essentials
sudo apt install -y build-essential

# Python and pip
sudo apt install -y python3 python3-pip

# Node.js (using NodeSource repository)
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs

# Docker (optional)
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER

Part 5: Proxmox VM Management

Creating VM Templates

Once you have a configured Ubuntu VM, create a template for faster deployment:

  1. Shutdown the VM: VM → Shutdown
  2. Convert to Template:
    • Right-click VM → Convert to Template
    • Or: VM → MoreConvert to Template
  3. Clone from Template:
    • Right-click template → Clone
    • Set new VM ID and name
    • Start cloned VM

Taking Snapshots

Before making major changes:

  1. VMSnapshotsTake Snapshot
  2. Enter snapshot name and description
  3. Restore Snapshot: If needed, select snapshot → Rollback

Backup Configuration

  1. VMBackupAdd
  2. Configure:
    • Storage: Backup storage location
    • Schedule: Set backup frequency
    • Mode: Snapshot (recommended) or Suspend
    • Compression: ZSTD (good balance)

Resource Monitoring

Monitor VM performance:

  1. VMSummary: View CPU, memory, disk usage
  2. VMMonitor: Real-time statistics
  3. Use command line:
# On Proxmox host
pvesh get /nodes/proxmox-host/qemu/100/status/current

Part 6: Optimization Tips

Performance Optimization

  1. Use VirtIO Drivers: Already configured in our setup
  2. Enable CPU Type "host": Uses host CPU features
  3. Use SSD Storage: Faster I/O performance
  4. Allocate Appropriate Resources: Don't overallocate

Storage Optimization

  1. Thin Provisioning: Saves disk space
  2. Enable Discard: Allows space reclamation
  3. Use Compression: For backup storage

Network Optimization

  1. VirtIO Network: Best performance
  2. SR-IOV: For high-performance networking (advanced)
  3. Bridge Optimization: Use dedicated bridges for high traffic

Troubleshooting

Common Issues

VM Won't Boot:

  • Check VM resources (RAM, CPU)
  • Verify ISO image integrity
  • Check boot order in VM options

Network Not Working:

  • Verify bridge configuration
  • Check firewall rules
  • Verify IP configuration in Ubuntu

Poor Performance:

  • Ensure VirtIO drivers are used
  • Check resource allocation
  • Verify storage type and cache settings

Can't Access via SSH:

  • Check UFW firewall rules
  • Verify SSH service is running: sudo systemctl status ssh
  • Check network connectivity

Useful Commands

# Check system resources
htop
free -h
df -h

# Check network
ip addr show
ip route show
ping 8.8.8.8

# Check services
sudo systemctl status service-name
sudo systemctl enable service-name
sudo systemctl start service-name

# View logs
sudo journalctl -xe
sudo tail -f /var/log/syslog

Best Practices

  1. Regular Updates: Keep Ubuntu and packages updated
  2. Backup Strategy: Regular VM backups
  3. Security:
    • Use strong passwords
    • Enable firewall
    • Use SSH keys instead of passwords
    • Keep system updated
  4. Documentation: Document your VM configurations
  5. Resource Management: Don't overallocate resources
  6. Network Isolation: Use VLANs for different environments

Conclusion

You now have a fully configured Ubuntu Server instance running in Proxmox! This VM can serve as:

  • Web Server: Host websites and web applications
  • Application Server: Run applications and services
  • Development Environment: Code and test applications
  • Database Server: Host databases
  • Container Host: Run Docker containers
  • Base for Other Services: Expand as needed

Remember to:

  • Keep your system updated
  • Configure proper backups
  • Follow security best practices
  • Monitor resource usage
  • Document your configurations

Additional Resources

Happy virtualizing! 🚀