This is an old revision of the document!


Commnads

Get config

pct config <id>

Set cpu core count

pct set <id> --cores 4

Set memory size

pct set <id> --memory 2048

Set disk size

pct resize <id> rootfs 32G

List local images

pveam list local

List available images

pveam available

Download image

pveam download local image.tar.gz

Memory Usage

total=0
for i in $(pct list|grep running|awk '{print $1}'); do
  pct status $i --verbose|yq -r '.|"\(.vmid)"+" "+"\(.maxmem|tonumber/1048576|round)"+"M"+" "+"\(.mem|tonumber/1048576|round)"+"M"'
  total=$((total+$(pct status $i --verbose|yq -r '.|"\(.maxmem|tonumber/1048576|round)"')))
done
echo ${total}M

Fix issue with Zabbix

lxcfs.service
[Service]
ExecStart=/usr/bin/lxcfs -l /var/lib/lxcfs
Navigation
Print/export
QR Code
QR Code wiki:lxc (generated for current page)