NeuroAgent

Virtual Machines on One Server

Complete guide to creating isolated virtual machines on a single physical server using Proxmox VE, KVM, and LXC for optimal resource allocation.

How to create multiple virtual machines on one physical server?

We have purchased a physical server for the office and plan to deploy the following components on it:

  • A local repository with source code
  • Sentry service (as a Docker image)
  • Test server for the testing team
  • MySQL database replication node for providing local access to the production database within the office

It is necessary to isolate each component in a separate virtual machine. What technologies and tools can be used to implement such an architecture?

NeuroAgent

Creating multiple virtual machines on a single physical server is possible using virtualization technologies such as KVM, VMware, or Proxmox VE. For your architecture with separate isolated environments for a local repository, Sentry, test server, and MySQL replication node, it is recommended to use the Proxmox VE platform, which combines KVM for full virtualization and LXC containers for lightweight solutions.

Table of Contents


Basic Virtualization Technologies

Virtualization allows running multiple independent virtual machines on a single physical server, each with its own operating system and applications. According to research, modern virtualization provides powerful capabilities for server consolidation and resource optimization [https://www.scalecomputing.com/resources/server-hardware-virtualization-maximizing-resource-utilization-and-flexibility].

Main approaches to virtualization include:

KVM (Kernel-based Virtual Machine)

LXC (Linux Containers)

Hypervisors


Platform Selection for Your Architecture

For your specific task with four components, the optimal choice will be Proxmox VE, which offers a unique combination of technologies:

Why Proxmox VE?

Alternatives for Comparison

Platform License Type KVM Support Features
Proxmox VE Open source + commercial Yes Clustering, ZFS storage
VMware ESXi Commercial Yes HA, DRS, advanced clustering
KVM (Vanilla) Open source Yes Requires manual setup
XCP-ng Open source Yes XenServer alternative

Important: Unlike VMware, Proxmox VE does not require a license for basic functionality, making it cost-effective for your case https://medium.com/@PlanB./proxmox-vs-vmware-can-open-source-virtualization-meet-enterprise-demands-a9edcf9ee921.


Step-by-Step Implementation with Proxmox VE

Step 1: Install Proxmox VE

  1. Download ISO from the official website
  2. Create a bootable USB drive
  3. Install the system on your physical server:
    • Recommended system partition: 50-100 GB
    • Allocate remaining space to ZFS storage

Step 2: Configure Storage

bash
# Create ZFS pool for VM storage
zpool create -o ashift=12 tank raidz1 /dev/sdb /dev/sdc /dev/sdd

# Configure Proxmox to use the pool
pvesm add zfs tank --content rootdir,vzdir,images

Step 3: Create Virtual Machines

VM 1: Local source code repository

  • Technology: LXC (container)
  • Resources: 2 vCPU, 4GB RAM, 50GB disk space
  • OS: Ubuntu 22.04 LTS
  • Purpose: GitLab or similar service

VM 2: Sentry (Docker)

  • Technology: LXC with Docker
  • Resources: 4 vCPU, 8GB RAM, 100GB disk space
  • OS: Ubuntu 22.04 LTS
  • Purpose: Running Docker containers for Sentry

VM 3: Test server

  • Technology: KVM (full VM)
  • Resources: 4 vCPU, 16GB RAM, 200GB disk space
  • OS: Windows Server or Linux depending on requirements
  • Purpose: Environment for testers

VM 4: MySQL replication node

  • Technology: KVM (full VM)
  • Resources: 2 vCPU, 8GB RAM, 150GB disk space
  • OS: Ubuntu 22.04 LTS
  • Purpose: MySQL replication and local access

Step 4: Configure Networking

bash
# Create bridge for network isolation
pvesh create /network bridge --name vmbr1 --bridge-stp off --bridge-fd 0

# Configure VLAN if needed
pvesh create /network/vlan --bridge vmbr1 --vlan-raw-device vmbr1 --vlan-id 100

Alternative Solutions

VMware vSphere/ESXi

Advantages:

  • High reliability and advanced HA (High Availability) features
  • Automatic resource allocation (DRS)
  • Enterprise support

Disadvantages:

XCP-ng

Advantages:

  • Free and open source alternative to XenServer
  • Good performance
  • Clustering support

Disadvantages:

  • Less functionality compared to Proxmox
  • Limited documentation

Vanilla KVM + libvirt

Advantages:

  • Maximum flexibility
  • Full control over configuration
  • Customization capabilities

Disadvantages:

  • Requires manual setup and management
  • No default web interface

Performance Optimization

Resource Allocation

For your architecture with four VMs, the following resource allocation is recommended:

Component vCPU RAM Disk Technology
Repository 2 4GB 50GB LXC
Sentry 4 8GB 100GB LXC + Docker
Test server 4 16GB 200GB KVM
MySQL replication 2 8GB 150GB KVM
Total 12 36GB 500GB

Optimization Tips:

  1. Use ZFS for the disk subsystem - provides compression and deduplication
  2. Configure NUMA for multi-core processors
  3. Use SSD for operating systems and active disks
  4. Optimize network settings for VMs with high network activity https://www.unitrends.com/blog/what-is-proxmox-virtual-environment/

Security and Isolation

Isolation Levels in Proxmox VE

1. Hypervisor Level

2. Network Isolation

bash
# Create separate network bridges
pvesh create /network bridge --name vmbr1 --bridge-stp off
pvesh create /network bridge --name vmbr2 --bridge-stp off

# Configure firewall rules
pvesh create /nodes/[node]/firewall/ipset --name sentry-vm
pvesh create /nodes/[node]/firewall/rules --action DROP --type IN --source NOT ipset!sentry-vm

3. Security Configuration for Each VM

VM Type Recommended Security Settings
Repository Only incoming SSH connections, disable root access
Sentry Isolated network, access only from test VM
Test server Limited privileges, prohibit access to other VMs
MySQL Data encryption, internal access only

Additional Security Measures:

  1. Regular updates of Proxmox VE and guest systems
  2. Backup configurations and data
  3. Monitoring of resources and security
  4. Uninterruptible power supply for the physical server

Sources

  1. Future of Desktop Virtualization in 2024 and Beyond - V2 Cloud
  2. Server Virtualization Trends & Solutions 2024
  3. Maximize Efficiency with Server Hardware Virtualization
  4. Virtualization in 2024: Hypervisors, Competition and More
  5. 18 Best Virtualization Software in 2025
  6. Server Virtualization Software and Management
  7. Proxmox Virtual Environment - Overview
  8. What is Server Virtualization? A Complete Guide
  9. What Is Virtualization? | IBM
  10. Top 5 Virtualization Solutions for Your Business in 2024
  11. What is Proxmox Virtual Environment (Proxmox VE)? | Datto
  12. The Complete Guide to Virtualization Technologies in 2025
  13. Proxmox Virtual Environment - Features
  14. Proxmox 🆚 VMware: What’s Right for You?
  15. Proxmox VE vs. VMware ESXi vs. Hyper-V – 4sysops
  16. Proxmox vs. VMware: Can Open-Source Virtualization Meet Enterprise Demands?
  17. Proxmox Alternatives in 2024: Comparing 10 Hypervisors Pros and Cons
  18. What is Proxmox VE (Virtual Environment)? | Unitrends
  19. Proxmox vs VMware | Virtualization Platform Comparison

Conclusion

For creating multiple isolated virtual machines on a single physical server for your architecture, it is recommended to use Proxmox VE, which optimally combines performance, flexibility, and cost.

Key Recommendations:

  1. Use a hybrid approach: KVM for resource-intensive VMs (test server, MySQL) and LXC for lightweight services (repository, Sentry)
  2. Optimize resource allocation: Allocate sufficient memory and CPU for each component considering future load
  3. Ensure network isolation: Create separate network bridges and configure firewalls to protect VMs
  4. Implement backup: Set up regular backup of configurations and important data
  5. Plan for scaling: Allocate additional resources on the physical server for possible expansion

This architecture will allow you to efficiently use the resources of a single physical server while ensuring full isolation and security for each component of your IT infrastructure.