Installation & Setup
Install Proxmox VE
bash
1# ISO installation (recommended)2# Download from https://www.proxmox.com/en/downloads3# Boot from ISO and follow installer4
5# After install, remove enterprise repo (if no subscription)6rm /etc/apt/sources.list.d/pve-enterprise.list7
8# Add no-subscription repo9echo "deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription" > \10 /etc/apt/sources.list.d/pve-no-subscription.list11
12# Update13apt update && apt full-upgrade -y14
15# Remove enterprise repo warning (optional)16apt install -y pve-manager17
18# Verify19pveversion20pveversion -vConnect to Web UI & CLI
bash
1# Web UI2https://<proxmox-host>:80063
4# SSH5ssh root@<proxmox-host>6
7# Proxmox shell (in web UI)8# Or use the CLI directly via SSHLicense / Subscription
bash
1# Check subscription status2pvesubscription get3
4# Disable subscription nag (after updates)5cat /etc/apt/apt.conf.d/no-nag > /dev/null6# Or remove the Enterprise repoImportant Paths & Config Files
bash
1/etc/pve/ # Cluster-wide config directory2/etc/pve/qemu-server/ # VM configuration files3/etc/pve/lxc/ # Container configuration files4/etc/pve/storage.cfg # Storage configuration5/etc/pve/pve-cluster/corosync.conf # Cluster config6/etc/pve/firewall/ # Cluster firewall rules7/etc/pve/priv/ # Private keys and secrets8/etc/pve/status/ # Cluster status9/var/lib/vz/ # Default local storage10/var/log/pve/ # Proxmox logs11/var/log/pve/tasks/ # Task logs12/var/log/pveaccess/ # Access logs13/var/lib/pve-cluster/ # Cluster databaseNode Management
Status & Info
bash
1pveversion # Proxmox version2pveversion -v # Detailed version3pveam status # APT repository status4cat /etc/os-release # OS version5uptime # System uptime6pvesh get /nodes/$(hostname)/status # Node statusService Management
bash
1systemctl status pve-cluster # Cluster service2systemctl status pvedaemon # Proxmox daemon3systemctl status pveproxy # Web UI proxy4systemctl status pvestatd # Status daemon5systemctl status pve-ha-lrm # HA local resource manager6systemctl restart pve-cluster # Restart cluster7systemctl restart pvedaemon # Restart daemon8systemctl restart pveproxy # Restart web UIVirtual Machine (VM) Management
Create VM
bash
1# Create VM from command line2qm create 100 \3 --name myvm \4 --ostype l26 \5 --cores 2 \6 --memory 4096 \7 --balloon 2048 \8 --net0 virtio,bridge=vmbr0 \9 --scsihw virtio-scsi-single \10 --scsi0 local-lvm:32 \11 --ide2 local:iso/ubuntu-22.04-server.iso,media=cdrom \12 --boot order=scsi0;ide2 \13 --bios ovmf \14 --efidisk0 local-lvm:1 \15 --machine q3516
17# Import VM from OVA/OVF18qm importovf 999 /path/to/ovm.ovf local-lvm --name imported-vm19
20# Import disk (raw/qcow2)21qm importdisk 100 /path/to/disk.qcow2 local-lvmStart / Stop / Manage VM
bash
1qm start 100 # Start VM2qm stop 100 # Stop VM (ACPI)3qm shutdown 100 # Graceful shutdown4qm shutdown 100 --forceStop 1 # Graceful shutdown, force stop after 1 min5qm suspend 100 # Suspend (pause)6qm resume 100 # Resume from suspend7qm reboot 100 # Reboot VM8qm reset 100 # Hard reset9qm destroy 100 # Destroy VM (remove config + disks)10qm destroy 100 --purge # Remove config, disks, and backups11
12# Clone VM13qm clone 100 101 --name myvm-clone14qm clone 100 101 --full --name myvm-full-clone # Full (independent) clone15
16# Migrate VM (live migration)17qm migrate 100 target-node --online # Live migration18qm migrate 100 target-node # Offline migrationVM Configuration
bash
1qm config 100 # Show VM config2qm set 100 --cores 4 --memory 8192 # Update CPU and memory3qm set 100 --scsi0 local-lvm:64,resize=+32 # Expand disk by 32GB4qm set 100 --net0 virtio,bridge=vmbr0,firewall=1 # Enable firewall on NIC5qm set 100 --agent enabled # Enable QEMU guest agent6qm set 100 --ide2 local:iso/ubuntu.iso,media=cdrom # Attach ISO7qm set 100 --boot order=scsi0 # Set boot order8qm set 100 --cpu host # Pass through host CPU9qm set 100 --balloon 0 # Disable ballooning10
11# Remove device12qm set 100 --delete scsi1 # Remove secondary disk13qm set 100 --delete net1 # Remove second NIC14
15# Resize disk16qm resize 100 scsi0 +50G # Add 50GB to disk17
18# Backup VM19vzdump 100 --storage local --compress zstd --mode snapshot20
21# Move disk22qm disk move 100 scsi0 local-lvm # Move disk to different storageVM Disk Operations
bash
1# List disks2qm disk list 1003
4# Add disk5qm set 100 --scsi1 local-lvm:32 # Add 32GB disk6
7# Add raw disk file8qm set 100 --scsi1 local:100/vm-100-disk-1.raw9
10# Resize disk11qm resize 100 scsi0 +20G # Add 20GB12
13# Import disk from external file14qm importdisk 100 /path/to/disk.qcow2 local-lvm15
16# Check disk health (from VM)17smartctl -a /dev/sdaVM Console
bash
1qm terminal 100 # Serial console2qm terminal 100 --iface serial0 # Specific serial interface3
4# VNC / SPICE5qm vncproxy 100 # VNC proxy6qm spiceproxy 100 # SPICE proxyLXC Container Management
Create Container
bash
1# Create container from template2pveam available # List available templates3pveam update # Update template list4pveam install local:vztmpl/debian-12-standard_12.7-1_amd64.tar.zst5
6pct create 200 local:vztmpl/debian-12-standard_12.7-1_amd64.tar.zst \7 --hostname mycontainer \8 --memory 1024 \9 --swap 512 \10 --cores 2 \11 --net0 name=eth0,bridge=vmbr0,hwaddr=AA:BB:CC:DD:EE:FF,ip=dhcp \12 --rootfs local-lvm:8 \13 --storage local \14 --unprivileged 1 \15 --password secret123Start / Stop / Manage Container
bash
1pct start 200 # Start container2pct stop 200 # Stop container3pct reboot 200 # Reboot container4pct destroy 200 # Destroy container (remove config + rootfs)5pct destroy 200 --purge # Remove config, rootfs, and backups6
7# Clone container8pct clone 200 201 --hostname container-clone9pct clone 200 201 --full # Full (independent) clone10
11# Enter container12pct enter 200 # Enter container shell13pct exec 200 -- ls /etc # Execute command in container14pct exec 200 -- bash # Interactive bash15
16# Migrate container17pct migrate 200 target-node --online # Live migration (if supported)Container Configuration
bash
1pct config 200 # Show container config2pct set 200 --memory 2048 --swap 1024 # Update memory3pct set 200 --cores 4 # Update CPU4pct set 200 --rootfs local-lvm:16 # Expand rootfs to 16GB5pct set 200 --net0 name=eth0,bridge=vmbr0,ip=10.0.0.100/24,gw=10.0.0.1 # Static IP6pct set 200 --mp0 /mnt/data,mp=/mnt/data,bind=1,ro=0 # Add mount point7pct set 200 --password newpassword # Change root password8pct set 200 --ostype debian # Set OS type9
10# Features11pct set 200 --features nesting=1 # Enable nesting (Docker in LXC)12pct set 200 --features fuse=1 # Enable FUSE mount13
14# Remove device15pct set 200 --delete net1 # Remove second NIC16pct set 200 --delete mp0 # Remove mount pointContainer Templates
bash
1pveam available # List available templates2pveam update # Update template index3pveam download local debian-12-standard # Download template4pveam list local # List local templatesStorage Management
Storage Configuration
bash
1# List storage2pvesm status # Storage status3pvesm list # List all storage volumes4pvesm list local-lvm # List volumes in specific storage5
6# Add storage7# NFS8pvesm add nfs nfs-storage \9 --server 10.0.0.5 \10 --export /volume1/data \11 --content images,rootdir,vztmpl,backup \12 --options vers=4.113
14# CIFS/SMB15pvesm add cifs smb-storage \16 --server 10.0.0.6 \17 --share data \18 --username admin \19 --password secret \20 --content images,backup21
22# iSCSI23pvesm add iscsi iscsi-storage \24 --portal 10.0.0.7 \25 --target iqn.2024-01.com.example:storage26
27# ZFS28pvesm add zfspool zfs-storage \29 --pool rpool/data \30 --content images,rootdir31
32# Directory33pvesm add dir local-backup \34 --path /mnt/backup \35 --content backup36
37# GlusterFS38pvesm add glusterfs gluster-storage \39 --server gluster1 \40 --volume gvol041
42# Remove storage43pvesm remove nfs-storageStorage Status
bash
1pvesm status # All storage status2pvesm status --type zfs # Filter by type3pvesm list # List all volumes4pvesm list local-lvm # List specific storage5pvesm prune local # Prune old backups6pvesm status | grep -v active # Inactive storageBackup & Restore
Backup VMs & Containers
bash
1# Backup VM2vzdump 100 --storage local --compress zstd --mode snapshot3
4# Backup container5vzdump 200 --storage local --compress zstd --mode snapshot6
7# Backup multiple VMs8vzdump 100 101 102 --storage local --compress zstd9
10# Backup all VMs11vzdump --all --storage local --compress zstd12
13# Scheduled backup (via web UI or API)14# /etc/pve/vzdump.cron150 2 * * * root vzdump --all --storage local --compress zstd --mail root@example.com16
17# Exclude VMs from backup18vzdump --all --storage local --exclude 100,10119
20# Backup modes21# snapshot: Online backup (requires QEMU agent for quiesce)22# suspend: Offline backup (suspend, dump, resume)23# stop: Stop VM, backup, start (safest but downtime)Restore Backup
bash
1# Restore VM2qmrestore /var/lib/vz/dump/vzdump-qemu-100-*.vma.zst 9993
4# Restore container5pctrestore /var/lib/vz/dump/vzdump-lxc-200-*.vma.zst 999List Backups
bash
1ls /var/lib/vz/dump/ # List backup files2vzdump --list # List backups with detailsNetworking
Network Configuration
bash
1# View network interfaces2ip addr show3ip route show4brctl show # Bridge info (if bridge-utils installed)5
6# Edit network config (Debian/Ubuntu style)7cat /etc/network/interfaces8
9# Restart networking10systemctl restart networking11
12# Proxmox firewall13pve-firewall status # Firewall status14pve-firewall enable # Enable firewall15pve-firewall disable # Disable firewallLinux Bridge
bash
1# /etc/network/interfaces2auto vmbr03iface vmbr0 inet static4 address 10.0.0.1/245 gateway 10.0.0.16 bridge-ports eno17 bridge-stp off8 bridge-fd 0VLAN Configuration
bash
1# /etc/network/interfaces with VLANs2auto eno13iface eno1 inet manual4
5auto vmbr0.1006iface vmbr0.100 inet static7 address 10.100.0.1/248 bridge-ports eno1.1009 bridge-stp off10 bridge-fd 011
12auto vmbr0.20013iface vmbr0.200 inet static14 address 10.200.0.1/2415 bridge-ports eno1.20016 bridge-stp off17 bridge-fd 0Clustering
Create & Manage Cluster
bash
1# Create cluster (first node)2pvecm create mycluster3
4# Join cluster (additional nodes)5pvecm add <existing-node-ip>6
7# Cluster status8pvecm status9pvecm nodes # List cluster nodes10pvecm expected # Expected quorum votes11pvecm qdevice setup # QDevice configuration12
13# Remove node from cluster14pvecm delnode <node-name>15
16# Update cluster config17pvecm updatecerts # Regenerate certificatesHA (High Availability)
bash
1# HA resources (managed via web UI or API)2ha-manager status # HA status3ha-manager config # HA configuration4
5# Add HA resource via API6ha-manager add ha:vm:100 --group ha-group17
8# Remove HA resource9ha-manager remove ha:vm:10010
11# HA groups12ha-manager group create ha-group1 node1,node2Firewall
bash
1# Cluster-level firewall2cat /etc/pve/firewall/cluster.fw # Cluster firewall rules3
4# Host-level firewall5cat /etc/pve/nodes/<node>/host.fw # Node firewall rules6
7# VM-level firewall8qm set 100 --firewall 1 # Enable firewall for VM9qm config 100 | grep firewall # Check firewall status10
11# Manage via API12pvesh get /cluster/firewall/options # Get firewall options13pvesh set /cluster/firewall/options --enable 1 # Enable cluster firewall14
15# IP Sets (groups)16pvesh set /cluster/firewall/ipset/mygroup --cidr 10.0.0.0/2417
18# Security groups19pvesh set /cluster/firewall/securitygroups/web --comment "Web servers"Updates & Package Management
bash
1# Update Proxmox2apt update && apt full-upgrade -y3
4# Check available updates5pveam update6apt list --upgradable7
8# Update repository9pveam update10pveam status # Check repo status11
12# Remove enterprise repo (if no subscription)13rm /etc/apt/sources.list.d/pve-enterprise.list14apt update15
16# Proxmox VE version17pveversion -vUseful Commands
VM & Container Quick Reference
bash
1# List all VMs and containers2qm list # List VMs3pct list # List containers4
5# Quick VM info6qm status 100 # VM status7qm config 100 # VM configuration8qm guest cmd 100 get-network # Get VM network info (requires agent)9qm guest cmd 100 get-osinfo # Get OS info10
11# Quick container info12pct status 200 # Container status13pct config 200 # Container configuration14pct exec 200 -- hostname # Get container hostname15pct exec 200 -- df -h # Disk usage in containerBackup Cron
bash
1# /etc/pve/vzdump.cron2# Format: minute hour day-of-month month day-of-week user vzdump-params3
4# Daily at 2 AM, all VMs, snapshot mode50 2 * * * root vzdump --all --storage local --compress zstd6
7# Weekly full backup80 3 * * 0 root vzdump --all --storage backup-server --mode stop --compress zstd9
10# Specific VMs110 2 * * * root vzdump 100 200 --storage local --compress zstdTroubleshooting
bash
1# Service issues2systemctl status pve-cluster # Cluster service3systemctl status pvedaemon # Proxmox daemon4systemctl status pveproxy # Web UI5journalctl -u pveproxy -f # Web UI logs6journalctl -u pvedaemon -f # Daemon logs7
8# VM won't start9qm config 100 # Check VM config10qm status 100 # Check VM status11cat /var/log/pve/tasks/active # Check active tasks12
13# Container won't start14pct config 200 # Check container config15pct status 200 # Check container status16cat /var/log/pve/tasks/active # Check active tasks17
18# Storage issues19pvesm status # Check storage status20pvesm list # List volumes21zpool status # Check ZFS pools (if using ZFS)22lvs # Check LVM volumes23
24# Network issues25ip addr show # Check interfaces26ip route show # Check routes27brctl show # Check bridges28systemctl restart networking # Restart networking29
30# Cluster issues31pvecm status # Cluster status32pvecm nodes # Node status33corosync-tool -s # Corosync status34
35# Performance issues36top # CPU/memory usage37iotop # Disk I/O38iftop # Network traffic39dmesg | tail # Kernel messages