Virtualization Management
Vapor provides comprehensive virtual machine management using KVM/Libvirt. You can create, manage, and monitor VMs with advanced features like PCI passthrough, snapshots, and live migration.
Prerequisites
- KVM kernel modules loaded
- Libvirt daemon running
- QEMU/KVM installed
- Appropriate permissions for VM management
- Sufficient CPU virtualization support (Intel VT-x or AMD-V)
Navigating to Virtualization
- From the main menu, click on Virtualization
- Three main sections are available:
- Virtual Machines
- Storage Pools
- Networks
Virtual Machines
The VMs tab displays all virtual machines on the system.
VM List View
Each VM shows:
- Name and UUID
- State (Running, Paused, Shutoff, etc.)
- vCPUs and Memory allocation
- Operating System
- IP addresses (if guest agent installed)
- Uptime
- Actions menu
Creating a Virtual Machine
Quick Create
- Click Create VM
- Basic configuration:
- Name: VM identifier
- vCPUs: Number of virtual CPUs
- Memory: RAM allocation (MB)
- OS Type: Linux, Windows, etc.
- OS Variant: Specific distribution/version
- Storage configuration:
- Storage Pool: Where to create the disk
- Disk Size: Size in GB
- Boot ISO: Installation media
- Click Create
Advanced Create
For more control, use Advanced Create:
General Settings
- Architecture: x86_64, aarch64
- Firmware: BIOS or UEFI
- Secure Boot: Enable for Windows 11
- TPM: Add virtual TPM device
- Machine Type: Q35 (PCIe) or i440FX (PCI)
CPU Configuration
- CPU Model: Host passthrough or specific model
- Topology: Sockets, cores, threads
- Features: Enable/disable CPU features
- NUMA: Configure NUMA topology
Memory Settings
- Current Memory: Runtime allocation
- Maximum Memory: Upper limit for hotplug
- Huge Pages: Enable for better performance
- Memory Ballooning: Dynamic memory management
Storage Configuration
Multiple disk support:
System Disk:
- Format: qcow2, raw, vmdk
- Bus: virtio, SATA, IDE, SCSI
- Cache mode: none, writeback, writethrough
- I/O mode: native, threads
Additional Disks:
- Add multiple data disks
- Attach existing disks
- Create from templates
CD/DVD:
- Attach ISO images
- Physical device passthrough
Network Configuration
Network Interfaces:
- Model: virtio, e1000, rtl8139
- Network: NAT, Bridge, Host-only
- MAC address: Auto or manual
- VLAN tagging
Multiple NICs:
- Add up to 8 network interfaces
- Configure each independently
Graphics and Display
Display Type:
- VNC: Remote access display
- SPICE: Enhanced remote display
- None: Headless operation
Graphics Settings:
- Listen address and port
- Password protection
- Auto-port allocation
PCI Device Passthrough
GPU Passthrough:
- Select GPU device
- VFIO configuration
- ROM file (if needed)
- Primary GPU option
Other PCI Devices:
- Network cards
- Storage controllers
- USB controllers
Managing Virtual Machines
Power Operations
- Start: Boot the VM
- Shutdown: Graceful shutdown via ACPI
- Force Off: Immediate power off
- Reboot: Restart the VM
- Reset: Hard reset
- Pause: Suspend VM execution
- Resume: Continue from pause
Console Access
- Click Console button
- Choose connection type:
- VNC Console: Web-based VNC viewer
- SPICE Console: Enhanced features
- Serial Console: Text-based access
Console features:
- Full keyboard and mouse support
- Clipboard sharing (SPICE)
- File transfer (SPICE)
- Multiple monitor support
- Full-screen mode
- Screenshot capture
Snapshots
Creating Snapshots
- Click Snapshots in VM details
- Click Create Snapshot
- Enter:
- Name: Snapshot identifier
- Description: Optional notes
- Memory State: Include RAM contents
- Click Create
Managing Snapshots
- Revert: Restore VM to snapshot state
- Delete: Remove snapshot
- Clone: Create new VM from snapshot
Live Migration
Move running VMs between hosts:
- Click Migrate in VM actions
- Select:
- Target Host: Destination server
- Migration Type: Live or offline
- Storage Migration: Move disks too
- Configure options:
- Bandwidth limit
- Auto-converge
- Post-copy mode
- Click Migrate
VM Configuration
Edit VM Settings
- Click Edit in VM details
- Modify:
- CPU and memory allocation
- Boot order
- Network interfaces
- Storage devices
- Changes requiring restart are marked
- Click Apply
Hot-Plug Operations
While VM is running:
- Add/remove vCPUs
- Adjust memory (within limits)
- Attach/detach disks
- Add/remove network interfaces
Storage Pools
Manage storage locations for VM disks.
Storage Pool Types
- Directory: Filesystem directory
- LVM: Logical Volume Manager
- NFS: Network File System
- iSCSI: Network block storage
- Ceph RBD: Distributed storage
- GlusterFS: Distributed filesystem
Creating Storage Pools
- Click Create Pool
- Select type and configure:
- Directory: Path on filesystem
- NFS: Server and export path
- iSCSI: Target and initiator
- Set permissions and ownership
- Click Create
Managing Storage Pools
- Refresh: Scan for changes
- Start/Stop: Activate/deactivate pool
- Delete: Remove pool (preserves data)
- Browse: View pool contents
Storage Volumes
Within each pool:
- Create new volumes
- Upload ISO images
- Clone existing volumes
- Resize volumes
- Delete unused volumes
Virtual Networks
Configure networking for VMs.
Network Types
- NAT: Network address translation
- Bridge: Direct network bridge
- Isolated: No external connectivity
- Routed: Layer 3 routing
- Open vSwitch: SDN networking
Creating Networks
- Click Create Network
- Configure:
- Name: Network identifier
- Mode: NAT, Bridge, etc.
- Bridge Name: Linux bridge name
- IP Configuration: DHCP settings
- DNS: Forwarder settings
- Click Create
Network Features
- DHCP Server: Automatic IP assignment
- DNS Forwarder: Name resolution
- IPv6 Support: Dual-stack networking
- Bandwidth Control: QoS settings
- VLAN Tagging: 802.1Q support
- Port Isolation: Security feature
Templates
Create reusable VM configurations.
Creating Templates
- Configure a VM as desired
- Click Convert to Template
- Template is saved for reuse
Using Templates
- Click Create from Template
- Select template
- Customize as needed:
- Change name
- Adjust resources
- Modify network settings
- Click Create
Monitoring and Metrics
Real-time Monitoring
View live metrics:
- CPU usage per core
- Memory utilization
- Disk I/O rates
- Network throughput
- Block device statistics
Performance Graphs
Historical data:
- CPU usage over time
- Memory trends
- I/O patterns
- Network activity
Best Practices
- Resource Planning: Don't overcommit CPU/memory
- Storage Performance: Use virtio for best performance
- Network Optimization: Use virtio-net when possible
- Backup Strategy: Regular snapshots and backups
- Security: Enable SELinux/AppArmor for VMs
- Monitoring: Watch resource usage trends
- Updates: Keep guest tools updated
Troubleshooting
VM Won't Start
- Check libvirt logs:
/var/log/libvirt/qemu/
- Verify resources available
- Check storage pool is active
- Ensure network is started
- Verify permissions
Poor Performance
- Enable virtio drivers
- Check CPU pinning
- Verify huge pages configuration
- Monitor host resource usage
- Check disk cache settings
Network Issues
- Verify network is active
- Check firewall rules
- Ensure bridge configuration
- Test with different network types
- Check DHCP server status
Console Not Working
- Verify display settings
- Check VNC/SPICE ports
- Ensure graphics driver loaded
- Try different console type
- Check firewall for console ports
PCI Passthrough Problems
- Verify IOMMU enabled in BIOS
- Check VFIO modules loaded
- Ensure device not in use
- Verify device in same IOMMU group
- Check ROM file if GPU passthrough
Advanced Topics
Cloud-Init Integration
Configure VMs automatically:
- User data scripts
- Network configuration
- SSH key injection
- Package installation
- Custom commands
Nested Virtualization
Enable VMs within VMs:
- Intel:
kvm_intel nested=1
- AMD:
kvm_amd nested=1
SR-IOV
Single Root I/O Virtualization:
- Virtual functions for network cards
- Near-native network performance
- Reduced CPU overhead