====== proxmox command cheatsheet ====== ===== containers (LXC) ===== ==== list containers ==== $ pct list VMID Status Lock Name 200 running proxy 201 running adguard 202 running wireguard 203 running unifi ==== start/stop a container ==== $ pct start 200 $ pct stop 200 ==== display container logical volumes ==== $ lvdisplay | grep "LV Path\|LV Size" LV Path /dev/pve/swap LV Size <7.70 GiB LV Path /dev/pve/root LV Size 69.57 GiB LV Size <141.81 GiB LV Path /dev/pve/vm-200-disk-0 LV Size 8.00 GiB LV Path /dev/pve/vm-201-disk-0 LV Size 16.00 GiB LV Path /dev/pve/vm-202-disk-0 LV Size 10.00 GiB LV Path /dev/pve/vm-203-disk-0 LV Size 15.00 GiB ==== run filesystem check on container LV ==== $ e2fsck -fy /dev/pve/vm-200-disk-0 e2fsck 1.46.5 (30-Dec-2021) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information /dev/pve/vm-200-disk-0: 36575/524288 files (0.1% non-contiguous), 315796/2097152 blocks ==== manually resize the filesystem ==== $ resize2fs /dev/pve/vm-200-disk-0 4G resize2fs 1.46.5 (30-Dec-2021) Resizing the filesystem on /dev/pve/vm-200-disk-0 to 1048576 (4k) blocks. The filesystem on /dev/pve/vm-200-disk-0 is now 1048576 (4k) blocks long. ==== resize the local volume ==== $ lvreduce -L 4G /dev/pve/vm-200-disk-0 WARNING: Reducing active logical volume to 4.00 GiB. THIS MAY DESTROY YOUR DATA (filesystem etc.) Do you really want to reduce pve/vm-200-disk-0? [y/n]: y Size of logical volume pve/vm-200-disk-0 changed from 8.00 GiB (2048 extents) to 4.00 GiB (1024 extents). Logical volume pve/vm-200-disk-0 successfully resized. /!\ note: edit also the "rootfs" entry in /etc/pve/lxc/200.conf ===== virtual machines (VM) ===== ==== list VMs ==== $ qm list VMID NAME STATUS MEM(MB) BOOTDISK(GB) PID 900 cryptowallets stopped 8192 50.00 0