Recommendations for Operations and Maintenance Scripts, Applications, Services, and Tools

12006

1. Introduction to Proxmox Virtual Environment (PVE)

Proxmox Virtual Environment (PVE) is an open-source virtualization management platform primarily designed to create, manage, and monitor virtual machines (using KVM virtualization technology) and containers (using LXC container technology) on a host server. The PVE system allows you to manage and deploy virtual machines and containers, and even manage high availability clusters.

The PVE system provides a web-based graphical user interface for managing virtualization resources, including virtual machines, containers, storage, and networks, offering users a user-friendly way to interact with the virtualization platform. This interface is typically accessible via the IP address of the host server.

This platform supports high availability clusters, flexible storage options, backup and restore capabilities, and various network configuration options. It also has an active community and relevant documentation, providing users with resources for help and support.

The PVE system is suitable for building virtualization environments, whether for personal projects or enterprise-level deployments. Its powerful features and flexibility make it a robust tool for managing virtualization workloads.

2. Booting the PVE System Host

  1. Download the ISO image file: https://pve.proxmox.com/wiki/Downloads
  2. Write the image to a USB drive. Tools for writing to USB drives can be found in the references of this article.
  3. Insert the USB drive into the machine where you want to install, boot from the USB drive, and enter the PVE installation process.
  4. Follow the system prompts to sequentially select the hard drive to install, country, time zone, keyboard, password, email, and host IP address (this address will be used to log into the PVE panel), and complete the installation.

3. Accessing the PVE Management Panel

After installation, you will receive an address for the PVE web management panel, which you can access from other machines using a browser.

PVE System - Login.png

Enter your username and password to log in, and you will see the PVE management panel:

PVE System - Panel.png

4. Creating a Debian Virtual Machine in the PVE System

  1. Click on Host-local-ISO Images, and upload the Debian image file here.
  2. Click the "Create Virtual Machine" button in the upper right corner.

PVE System - Create Virtual Machine.png

  1. Switch to "Operating System," and select the uploaded Debian image file as the ISO image.
  2. Switch to "Disk," and set the disk size.
  3. Switch to "CPU," set the number of CPU cores, and select the category as x86-64-v2.
  4. Switch to "Memory," and set the memory size.
  5. Switch to "Network," and select the bridged network card.
  6. Switch to "Confirm," review the virtual machine configuration, and click Finish.
  7. Click on the virtual machine's console, power it on, and proceed with the virtual machine system installation process.

5. Mounting NAS in the PVE System

  1. Click on Datacenter --> Storage --> "Add" button --> Select "NFS."

PVE System - Mount NAS.png

  1. Fill in the configuration for the NAS storage device: ID (identifier), server address, Export, Content (if the NAS stores ISO images, backup files, etc., for PVE, you can select them accordingly; PVE will automatically create the corresponding storage directories).
  • ID (identifier): The id name of the PVE storage.
  • Node: If not selected, all nodes can use this storage device; you can also choose a specific node.
  • Server: Enter the IP address of the NAS device here.
  • Export: Enter the path of the shared folder or subfolder path in the NAS device (Note: This must start with /volume; you need to check the properties in the shared folder on the NAS device).
  • Content: Specify what types of content on this storage device can be used in the PVE system, allowing multiple types such as ISO images, disk images, VZDump backup files; PVE will automatically create the corresponding storage directories.
  1. After confirmation, the left menu will show an additional storage directory, which is the NAS device just added.

6. Backing Up and Restoring Virtual Machines in the PVE System

One significant advantage of using the PVE system is the ease of backing up and restoring virtual machines.

Backup file storage directory:

  • Backup to local: Files will be stored in the host's /var/lib/vz/dump directory.
  • Backup to NAS: You need to check "VZDump backup files" in the content type of the selected NAS device. The virtual machine backup files will be stored in the dump directory of the NAS device.

Backing up a virtual machine:

  • Select the virtual machine - Backup - Immediate Backup.
  • Storage location: Choose the added NAS device to back up the virtual machine to NAS, which does not occupy local storage space.
  • Mode: Select "Snapshot."
  • Notes: Enter appropriate notes to identify the virtual machine for this backup, you can include cluster {{cluster}}, virtual machine name {{guestname}}, host {{node}}, virtual machine ID {{vmid}}, etc.
  • Click the "Backup" button to start the backup. The backup process will be displayed in the taskbar below.
  • After the backup is complete, select the storage device where the backup is stored, and you can see the generated virtual machine backup files in the "Backup" section.

Restoring a virtual machine:

  • Local backup files can be restored directly from the virtual machine's backup list, allowing you to restore the original virtual machine.
  • Backup files on NAS will not appear in the virtual machine's backup list; you can see this file in the management interface of the corresponding storage device, and clicking restore will only create a new virtual machine for recovery.

7. Issues and Solutions During Installation:

The installation process gets stuck at the beginning:

Error: Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices.

The system gets stuck when starting after installation:

  • Reason: Incompatibility between the display and the host causing the display to freeze.
  • Solution:
    • In the same network environment, use another device to ping the IP address of the PVE system; it should generally be reachable. Then log directly into the web management panel.

References

  1. Tools for creating USB boot drives: Rufus and Ventoy are both excellent software for creating USB boot drives: