Post

Installing And Configuring Proxmox VE (Virtual Environment)

Introduction –

Proxmox Virtual Environment (Proxmox VE) is an open-source server virtualization environment that is ideal for deploying virtual machines and containers. Whether you’re looking to set up a simple home lab or a complex enterprise network, Proxmox offers a wide range of features to suit your virtualization needs. In this guide, we will walk through the installation and basic configuration of Proxmox.

Prerequisites Before you begin the installation, you will need:

  1. A dedicated server or computer with at least:
    • Intel 64-bit CPU (Recommended 4+ cores)
    • 4GB RAM (Recommended 32GB+)
    • One NIC (Network Interface Card)
    • Minimum 8GB Disk Space (Recommended two 256GB+ solid state drives in RAID1 or RAIDz1 if using ZFS software raid)
  2. A Proxmox VE ISO file, which you can download from the official website.
  3. A USB drive for the installation media.
  4. A tool to create a bootable USB stick. I recommend using Ventoy or Rufus. If you’re on an enterprise server, consider mounting the ISO via iDRAC, iLO, or a similar remote management solution.

Create a Bootable USB Drive

Using Ventoy

  1. Download and install Ventoy from their official website.
  2. Insert your USB drive into your computer.
  3. Run Ventoy and select the appropriate USB drive.
  4. Click Install to format the drive and make it bootable.
  5. Drag and drop the Proxmox VE ISO file into the Ventoy USB drive.

Using Rufus

  1. Download and install Rufus from their official website.
  2. Insert your USB drive into your computer.
  3. Run Rufus and select the USB drive, partition scheme, and target system.
  4. Browse to your Proxmox VE ISO file by clicking the Select button.
  5. Click Start to create the bootable USB drive.

Note: For enterprise servers, you can skip this mount the ISO via iDRAC, iLO, or a similar solution.


Boot from USB Drive and Start the Installer

  1. Insert the bootable USB drive into the target server/computer.
  2. Power on the machine and boot from the USB drive. You may need to adjust the boot order in BIOS/UEFI settings.
  3. On the boot screen, select Install Proxmox VE and hit Enter. https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-07000082.png The Proxmox installer will begin. Note that it could take 15 - 20 minutes for the installer to load and initialize even on modern hardware.

Proxmox Installer Walkthrough

  1. Agree to the terms and conditions to proceed. https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-07000084.png
  2. Select the target disk for installation and click Next. https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-07000086.png
  3. Enter your country, time zone, and keyboard layout; then click Next. https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-07000087.png
  4. Configure the password and email address for the root user. https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-07000088.png
  5. Set the hostname, IP address, netmask, gateway, and DNS server for your Proxmox server. Confirm and click Next. https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-07000089.png
  6. Review your settings and click Install. The installation will now begin. https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-07000090.png https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-07000091.png

Initial Configuration

  1. Once the installation is complete, the machine will reboot provided you left the checkbox checked to automatically reboot after installation. If you unchecked the box, then reboot the machine manually.
  2. Access the Proxmox web interface by navigating to https://<your_server_IP>:8006 in a web browser. https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-07000092.png
  3. Log in using the root credentials you set up during the installation.
  4. You’ll be presented with the Proxmox dashboard. Here, you can start creating virtual machines, containers, and configuring storage.

Network Configuration

To ensure the network settings are configured correctly:

  1. Navigate to Datacenter -> System -> Network. https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-07000094.png
  2. Add or modify network interfaces as required.

Update Proxmox

Proxmox VE updates can be fetched from either the enterprise repository, which requires a paid subscription, or from the no-subscription repository, which is free but considered less stable. In this guide, we’ll utilize the latter to keep things budget-friendly.

Backup Current APT Sources

  1. SSH into your Proxmox server.
  2. Before making any changes, backup your existing APT sources for safekeeping.
    1
    2
    
    cp /etc/apt/sources.list /etc/apt/sources.list.backup
    cp -r /etc/apt/sources.list.d/ /etc/apt/sources.list.d.backup
    

Disable Enterprise Repository

  1. Use nano to edit the pve-enterprise.list file in the /etc/apt/sources.list.d/ directory.
    1
    
     nano /etc/apt/sources.list.d/pve-enterprise.list
    
  2. Comment out the existing enterprise repository line by placing a # at the beginning of the line.
    1
    
     # deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise
    
  3. Save the file and exit nano.

Add the No-Subscription Repository

  1. Create or edit a new list file specifically for the no-subscription repository.
    1
    
     nano /etc/apt/sources.list
    
  2. Add the following line to this new file.
    1
    
     deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription
    
  3. Save the file and exit nano.

Reload

Update and Upgrade Packages

  1. Run the package update and upgrade commands to fetch and install the latest updates.
    1
    2
    
     apt-get update
     apt dist-upgrade -y
    
  2. Reboot the system.

Debugging and Error Handling

If you encounter errors during this process, make sure to refer to the terminal output and system logs to identify the issues. These details often provide valuable insights for troubleshooting.


By following this updated -de, you should be able to securely update your Proxmox system without requiring a subscription. Note that while this is a viable method for test environments or personal use, a paid subscription is recommended for enterprise-level or critical production systems.


Certainly! Here’s a -de designed to fit into your blog as “ detailing how to add an additional disk to Proxmox, format it with a filesystem, and configure it for storing virtual disks.


Add Additional Disk for Virtual Machine Storage

When expanding your Proxmox server, you might find the need to add more storage specifically designated for your virtual machines. This storage can then be used for things like VM disks, backups, or snapshots. This -de will walk you through the process of adding a new disk to your Proxmox machine, formatting it, and setting it up to be used for virtual disks.

Identify the New Disk

  1. SSH into your Proxmox server.
  2. List all the available disks by using the lsblk or fdisk -l command.
    1
    
     lsblk
    

    This will display a list of all storage devices. Identify the one you want to add, for example /dev/sdb. https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-07000095.png

Partition the New Disk

  1. Run fdisk to start partitioning the new disk.
    1
    
     fdisk /dev/sdb
    
  2. Follow the on-screen instructions to create a new partition. Usually, you’d press n to create a new partition, then p for primary, and accept the default values to use the entire disk.
  3. Write the partition table and exit by pressing w. https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-07000096.png

Format the Partition with a Filesystem

  1. Once the partition is created, format it with your preferred filesystem. For this example, we’ll use the ext4 filesystem.
    1
    
     mkfs.ext4 /dev/sdb1
    

    https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-07000097.png

  2. Confirm the partition is formatted correctly by listing the available filesystems.
    1
    
     lsblk -f
    

    https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-07000098.png

Mount the New Disk and Configure Proxmox Directory Structure

  1. Create a mount point for the new partition within the Proxmox directory structure. This is crucial for Proxmox to manage storage effectively.
    1
    
    mkdir -p /var/lib/vz/vms
    
  2. Mount the partition to this mount point.
    1
    
    mount /dev/sdb1 /var/lib/vz/vms
    
  3. Edit /etc/fstab to ensure the partition mounts at boot.
    1
    
    nano /etc/fstab
    
  4. Add the following line:
    1
    
    /dev/sdb1  /var/lib/vz/vms ext4 defaults 0 0
    

    Save and exit the editor.

  5. Test Mount with mount -a – This command will attempt to mount all filesystems described in /etc/fstab and give an error message if there is an issue:
    1
    
    sudo mount -a
    

Configure Proxmox to Use the New Storage

  1. Navigate to the Proxmox web interface and go to Datacenter -> Storage -> Add -> Directory.
  2. Fill in the details, pointing Directory to /var/lib/vz/vms. Provide an ID such as vmstorage and select Disk Image for the Content. https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-07000100.png
  3. Click Add to finalize the storage addition.

Debugging and Error Handling

If you encounter any issues during this process, refer to system logs and terminal outputs for debugging information.


By following this guide, you’ve successfully added a new disk to your Proxmox server, formatted it, and configured it to be used for storing virtual machine disks. This adds a lot more flexibility and scalability to your virtualized setup.

How to Create, Configure, and Manage Virtual Machines in Proxmox

Step 1: Access Proxmox Web Interface and Upload an Operating System ISO

  1. Open your preferred web browser.
  2. Navigate to https://<your-proxmox-server-IP>:8006/.
  3. Log in with your Proxmox credentials.
  4. Navigate to the Proxmox web interface and go to Datacenter -> <Proxmox-machine> -> local -> ISO Images. https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-08000103.png
  5. Click on Upload, select your ISO Image, then click Upload. https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-08000104.png
  6. Wait for the upload to complete then click the X in the upper right hand of the window. https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-08000105.png

Step 2: Create a New VM

  1. On the left-hand sidebar, click on your Proxmox server’s name.
  2. Click the Create VM button at the top-right corner of the interface. https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-08000101.png

Step 3: VM Configuration Wizard

General Tab

  1. Name: Give your VM a unique name.
  2. VM ID: Give your VM a unique ID.
  3. Resource Pool: Leave it as default unless you have specific resource pools.
  4. Node: Select the Proxmox node where you want to create the VM. https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-08000102.png

OS Tab

  1. ISO Image: Select the OS ISO you wish to install.
  2. OS Type: Choose the appropriate type (e.g., Linux, Windows). https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-08000106.png

System Tab

  1. BIOS: Choose the BIOS mode for the VM. For modern OS support and features like secure boot, select OVMF (UEFI).
  2. SCSI Controller: Choose VirtIO SCSI for better performance.
  3. EFI Disk: If you’ve selected UEFI, you’ll need to specify an EFI disk storage location. Select the appropriate storage pool where the EFI disk will be created.
  4. Format: For the disk image format, select QEMU image format (qcow2) which is the default and most flexible option.
  5. Qemu Agent: Check this box to enable the QEMU Guest Agent, which provides improved management capabilities and performance statistics.
  6. Add TPM: If you need to secure the VM at the hardware level, you can enable TPM (Trusted Platform Module) by checking this box. Reccomended to turn this on if you plan on using Bitlocker (Windows) or LUKS disk encryption (Linux). https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-08000107.png

Click Next to continue.

Hard Disk

  1. Storage: Choose the storage pool where you want the VM’s disk image to be stored (e.g., local-lvm, VM_Storage).
  2. Cache: Opt for None for data integrity or Write back for better performance but a potential risk of data loss on power failure.
  3. Disk Size: Enter the initial size of the disk. This can usually be expanded later (e.g., 32G for 32 gigabytes).
  4. Discard: Check this box if you want to allow the guest OS to send TRIM/DISCARD commands to the host. Useful for SSDs and thin-provisioned storage.
  5. IO Thread: Increase this number to allocate additional IO threads for disk access. Useful for VMs requiring high disk I/O.
  6. SSD Emulation: Check this box if you want to emulate an SSD instead of an HDD, even if the underlying storage is not an SSD. This may affect the guest OS’s optimization algorithms.
  7. Skip Replication: If you have a Proxmox cluster and do not want this disk to be replicated to other nodes, check this box. https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-08000108.png

Click Next to continue.

CPU

  1. Sockets: Number of CPU sockets.
  2. Cores: Number of cores per socket.
  3. Type: Usually host-model or x86-64-v2-AES as per the Proxmox version. https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-08000109.png

Click Next to continue.

Memory

  1. Memory: Set the amount of RAM you want to allocate. https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-08000110.png

Click Next to continue.

Network

  1. Model: Choose VirtIO (paravirtualized).
  2. Bridge: Choose your network bridge, usually vmbr0. https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-08000111.png

Click Next to continue.

Create the VM

  1. Review the virtual machines settings and click Finish. https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-08000112.png

Step 4: Start the VM and Install the OS

  1. Go to the Summary tab of your newly created VM.
  2. Click Start.
  3. Open the Console to proceed with the OS installation. https://f002.backblazeb2.com/file/rcdevops/proxmox/proxmox2023-09-08000113.png

Step 5: Basic VM Operations

Start, Stop, and Reboot

You can perform these operations from the Proxmox web interface by using the buttons on the top-right corner.

Snapshots

  1. Navigate to the Snapshot tab.
  2. Click Take Snapshot.
  3. Give the snapshot a name and click OK.

Backups

  1. Go to Backup tab.
  2. Click Backup Now.
  3. Choose your backup options and click Backup.

Setting up VLans - Allow Proxmox to be VLAN Aware

Backup and edit the interfaces configuation file located in /etc/network.

1
2
3
cd /etc/network
cp interfaces interfaces.bak
nano interfaces

Edit the interfaces configuarion file to create sub interfaces so we can assign them to Vlans:

1
2
3
4
auto vmbr0.{Vlan Number}
iface vmbr0 inet static
        address {IP Address}/{Subnet Mask}
        gateway {Gateway IP Address}

Make sure to remove address and gateway from the bridge interface.

Basic Security Measures

Here are some fundamental security ou can take:

  1. Enable the firewall under Datacenter -> Node -> Firewall.
  2. Use strong authentication methods for SSH and Proxmox web access.
  3. Regularly update and upgrade the system to receive security patches.

Conclusion

You have successfully installed and configured Proxmox VE on your server or computer. This guide should serve as a foundation, allowing you to start deploying virtual machines and containers effectively. For advanced configurations and optimizations, refer to the Proxmox documentation and community resources.



Featured Tweet

</blockquote>
This post is licensed under Apache License 2.0 by the author.