Cloud server technologies allow deploying several fully functional virtual machines on a single physical server and using any operating system on them without any limitations. Software products like Proxmox significantly simplify centralized virtualization management. Additionally, they save company resources since the system administrator can view all VMs from a single workspace.
To explain virtualization in simpler terms, it's worth mentioning that the hypervisor acts as a controller. The program distributes hardware resources and priorities between VMs and emulates the necessary components following the standards adopted in the installed operating system. With Proxmox VE, the choice of operating system (Windows, Linux, etc.) is not restricted.
Hypervisor: Special programs designed for creating virtual machines, configuring them, launching, backing up, restoring, and transferring them to another server. Proxmox uses KVM and LXC as hypervisors.
Virtual Machine: A system that represents a software server with its own set of "hardware" (processor, RAM, storage, network card, etc.). During operation, it takes up some of the physical server's actual resources. Such systems are commonly abbreviated as VMs.
Virtualization Host: The physical server on which the virtual machine or multiple VMs will be deployed. Its parameters determine how powerful the logical computers will be. For example, if it has a 24-core processor, it can create the same number of 1-core systems. A mandatory requirement for hosts is that their processor must support at least one virtualization technology: Intel VT or AMD-V (hardware support for resource allocation to logical computers). An interesting feature of this system is direct access to all available "hardware" from any VM. At the same time, they remain isolated from each other and have individual settings.
Critical failure or errors in one VM do not affect the others.
Scaling is done by simply copying the virtual server.
Hardware failure does not affect the system's integrity, provided a backup exists.
The same VM can be easily deployed on a server from any manufacturer.
The latter significantly simplifies the task of upgrading data center equipment. The provider can change any "hardware" to more modern ones without considering software compatibility. By using disk arrays like RAID 5, Proxmox won't even notice the replacement of one or several drives. Virtualization of physical servers works seamlessly to ensure the declared availability level of Tier 3 (at least 99.9%).
There are several popular hypervisors: VMware ESXi, Microsoft Hyper-V, Oracle VM VirtualBox, and Open Virtualization Alliance KVM. Each product has its own features and different costs. Price plays an important role when comparing, and KVM, as part of a ready-made solution based on Debian Linux—Proxmox Virtual Environment or Proxmox VE—definitely wins. This is partly because it is completely free and also open-source.
The Proxmox installation procedure usually does not raise any questions. The installer works through a standard graphical interface, and the user only needs to select the necessary settings from drop-down lists or manually enter names, passwords, etc. It is recommended to download the disk image with the new version of the program from the official website. Then it can either be mounted from the KVM console or deployed on any external drive.
Order a dedicated server.
Mount the downloaded image as a removable disk.
Select the disk where Proxmox will be installed.
Set additional parameters in the Option section (if necessary).
Enter regional settings.
Set a password for superuser authorization and specify the email.
Specify the domain, server IP address, subnet mask, main gateway, and DNS server.
Reboot.
If deploying the system from an ISO image based on Debian rather than installing it with the Proxmox Debian Install file, the last step is mandatory. In any case, it is better to do this to exclude possible failures due to other software installed in the same session. Launch Proxmox and proceed with configuring the virtual machine. The web interface address looks like this: https://IP_server_address:8006
.
Before getting started with Proxmox, update to the latest version and configure security settings. This will ensure the availability of all the functions the developer provides and minimize possible problems.
The first thing to do is to disconnect the paid repository from the system. It is installed by default but requires purchasing a paid subscription. Without it, the user will see an error when downloading new package sources. You can disable it by performing the following steps:
Open the apt configuration file for editing:
nano /etc/apt/sources.list.d/pve-enterprise.list
Add the symbol #
before the only line in it:
#deb https://enterprise.proxmox.com/debian/pve stretch pve-enterprise
Exit the editor using the key combination <CTRL + X>, answering Y to the prompt to accept changes.
Now you can update the package sources:
apt update
It is recommended to download the new versions of all available packages:
apt -y upgrade
The next step is to ensure the security of the Proxmox Virtualization Environment. VMs are most often used by companies with a lot of information that should be kept out of public access (commercial, personal client data, etc.). At a minimum, you need to protect the system from password brute-force attacks. Statistics show that within just 7 days of operating a server with an open port 22 and an external IP address, up to 5,000 password guessing attempts are made.
To handle this, you can use the Fail2Ban utility. It allows you to control the number of authorization attempts. If someone exceeds the specified limit, their IP address is blocked. The system administrator specifies the number of attempts and the ban period in the configuration file.
Update the package sources:
apt update
Install the program:
apt install fail2ban
Open the configuration file for editing:
nano /etc/fail2ban/jail.conf
Change the variables bantime
(ban period in seconds for the attacker's IP address) and maxretry
(number of authorization attempts). This is done separately for each service.
Exit the editor, saving the changes. This operation is performed by pressing <CTRL + X> and confirming with the Y button.
Restart the service:
systemctl restart fail2ban
Now, you need to check the current status of the utility. This can be done by getting the statistics of IP address blocks from remote hosts attempting attacks. The check is available after entering the command:
fail2ban-client -v status sshd
The response looks like this:
root@hypervisor:~# fail2ban-client -v status sshd
INFO Loading configs for fail2ban under /etc/fail2ban
INFO Loading files: ['/etc/fail2ban/fail2ban.conf']
INFO Loading files: ['/etc/fail2ban/fail2ban.conf']
INFO Using socket file /var/run/fail2ban/fail2ban.sock
Status for the jail: sshd
|- Filter
| |- Currently failed: 4
| |- Total failed: 4327
| `- File list: /var/log/auth.log
`- Actions
|- Currently banned: 0
|- Total banned: 516
`- Banned IP list:
Proxmox software is immediately ready to virtualize machines based on Windows Server, Ubuntu, or other platforms. However, there are a few settings to configure before deploying the first VM.
For example, it's wise to store the program and virtual machines on different drives. This step increases the system's fault tolerance and improves performance.
The same applies to storing backups. It is important to keep them separately from other files, allowing you to quickly restore VMs even in the case of serious hardware failures on the physical server. Such failures are almost excluded when you use disk arrays like RAID 5 and 10, but it's better to provide additional protection against data loss risks. We suggest you test this configuration on a platform that yet has no important data.
As an example, let's take a system with two disks, with the Proxmox hypervisor installed on /dev/sda
and /dev/sdb
remaining empty for future deploying of the virtual machines. When configuring the partitioning, it is recommended to connect the storage as a regular directory.
Partition the disk by creating a new partition on it:
fdisk /dev/sdb
This opens the editor, where you need to press the N
key, select the primary partition, specify its number and size, then press the W
button.
Create a file system:
mkfs.ext4 /dev/sdb1
Create a new directory and mount the file system on it:
mkdir /mnt/data
mount /dev/sdb1 /mnt/data
Automatically mount the file system after each restart by adding the following line to the /etc/fstab
file:
echo "/dev/sdb1 /mnt/data ext4 defaults 0 0" >> /etc/fstab
Go to the web interface and add the created storage in the web interface: Datacenter -> Storage -> Add -> Directory.
In the Path field, enter the new mount point /mnt/data
.
First, you will need to download the ISO image with the required operating system. Then, mount the image in the system through the Storage menu. In it, you need to click Content – Upload, then select the file and click Upload.
The next steps:
Click Create VM.
Fill in the parameters: name, ISO Image, size and type of hard disk, number of processors, amount of RAM, network adapter.
After filling in the specified fields, click on Finish and make sure that the newly created virtual machine appears in the list.
Select it and click Start.
Go to the Console section and install the operating system in the same sequence as when installing on a physical server.
This procedure can be repeated as many times as necessary to create the required number of VMs with the needed operating systems. After launching any of them, there will be an opportunity to install the necessary application programs, and upload user files to the internal storage.
If you decide to add a network drive from a NAS or similar storage device to the Proxmox system, the settings slightly differ. But, with the initial setup and basic administration skills, you won't need much time for this operation. It is important to remember that on some devices, you must manually permit the protocol. For example, in some versions of the popular Qnap NAS, only NFS v4 is enabled by default, but Proxmox works only with version 3.
Example:
Connect to the server console via a browser or SSH.
Install the NFS package (if not already available):
apt install nfs-common
Create a mount point:
mkdir /mnt/nfs
Add the following line to the /etc/fstab
file:
echo "192.168.0.2:/nfsshare /mnt/nfs nfs defaults 0 0" >> /etc/fstab
Replace the IP address and /nfsshare
with the actual values of your NAS.
Manually mount the file system or reboot the server:
mount -a
Proxmox VE provides powerful features for creating and managing virtual machines and containers. Through the web-based management interface, you can configure resource allocation, set up backup schedules, and monitor system performance. Moreover, Proxmox supports clustering, enabling the management of multiple Proxmox servers from a single web interface, simplifying the administration of large-scale virtual environments.
To create a Proxmox cluster:
Install Proxmox VE on multiple servers.
Ensure all servers are in the same network.
Choose one server as the master and configure it to manage the cluster.
Use the following command to create a cluster on the master server:
pvecm create mycluster
Replace mycluster
with your desired cluster name.
Add the other servers to the cluster by running the following command on each node:
pvecm add IP_of_master_node
Replace IP_of_master_node
with the IP address of the master server.
Proxmox VE also supports High Availability (HA) configurations to ensure critical virtual machines remain available even if one of the nodes fails. To set up HA:
Configure a shared storage accessible by all cluster nodes.
Define the resources (virtual machines or containers) that require HA.
Use the Proxmox web interface to enable HA for these resources.
With HA enabled, Proxmox automatically detects node failures and restarts the affected virtual machines on another node within the cluster.
Proxmox Virtual Enviroment offers a robust and flexible solution for virtualization, catering to both small-scale deployments and large enterprise environments. Its open-source nature, combined with an extensive feature set, makes it a preferred choice for many IT administrators and businesses looking to optimize their server infrastructure. By understanding the installation process, security configurations, and advanced features like clustering and HA, users can effectively leverage Proxmox VE to meet their virtualization needs.