It's been some time since i wrote something in this blog. I've been pretty busy with product building till i lose track of time. Time sure pass quickly. Recently i've a chance to work on Proxmox again. It is still as powerful as ever and many more version came up and so are the problems. Hence, i figured to list down those command that i come across that might be useful one day. I'll bring it into a few sections for easy navigation in the future.
Proxmox Command
- Get a quick overview on how fast your system is: pveperf
- Verify the subscription status of your hardware node: pvesubscription get
- Start a backup of machine 101: vzdump 101 -compress lzo
- PVE Cluster Manager - see "man pvecm" for details.
- Restart every single Proxmox services: service pve-cluster restart && service pvedaemon restart && service pvestatd restart && service pveproxy restart
- Proxmox VE version info - Print version information for Proxmox VE packages. : pveversion
- Find next free VM ID: pvesh get /cluster/nextid
- View sum of memory allocated to VMs and CTs: grep -R memory /etc/pve/local | awk '{sum += $NF } END {print sum;}'
- View sorted list of VMs like vmid proxmox_host type: cat /etc/pve/.vmlist | grep node | tr -d '":,'| awk '{print $1" "$4" "$6 }' | sort -n | column -t
- View sorted list of vmid: cat /etc/pve/.vmlist | grep node | cut -d '"' -f2 | sort -n
KVM Command
- List all your KVM machines: qm list
- See how much memory your machine 101 has: qm config 101 | grep ^memory
- List the memory setting of a kvm: qm config 101 | grep ^memory
- restore KVM vzdump backups - see "man qmrestore"
- backup utility for virtual machine - see "man vzdump"
- unlock kvm: qm unlock 101
- Restore a QemuServer VM to VM 601: qmrestore /mnt/backup/vzdump-qemu-888.vma 601
LXC Command
- forcefully start lxc: lxc-start -n 101 -F
- mount lxc virtual disk: pct mount 101
- unmount lxc virtual disk: pct unmount 101
- repair virtual disk: pct fsck 101
- check configuration of lxc: pct config 101
- Remove container: pct destroy 101
- Restore a container to a new CT 600: pct restore 600 /mnt/backup/vzdump-lxc-777.tar
OpenVZ Command
- utility to control an OpenVZ container - see "man vzctl"
- vzctl wrapper to manage OpenVZ containers - see "man pvectl"
- display top CPU processes: vztop
- cat /proc/user_beancounters
- vzlist
- backup utility for virtual machine - see "man vzdump"
- restore OpenVZ vzdump backups - see "man vzrestore"
if you got anything to share or have any awesome command useful for your day to day Proxmox management, do let me know!