A handy list of commands for managing VM disks, resizing qcow2s, ballooning memory, guest agents, and ZFS ARC.
```bash
qemu-img convert -f vhdx -O qcow2 input.vhdx output.qcow2
qm importdisk
qm set
pvesm free local-zfs:vm-
pvesm list local-zfs | grep
qm config
qm set
qm set
qemu-img info /root/win10-600G.qcow2
qemu-img resize --shrink /root/win10-600G.qcow2 600G
diskpart list disk select disk 0 list partition select partition 4 delete partition override select partition 3 extend exit
qm set
qm set
qm set
pkg install qemu-guest-agent sysrc qemu_guest_agent_enable="YES" service qemu-guest-agent start service qemu-guest-agent status
echo "options zfs zfs_arc_max=8589934592" > /etc/modprobe.d/zfs.conf
update-initramfs -u -k all
cat /proc/spl/kstat/zfs/arcstats | grep c_max
arcstat 5
arc_summary
alias arcstats='arcstat 5 | awk "NR==1 {print \$0,\"hit%\",\"miss%\"} NR>1 {ddhits=\$5; ddmiss=(100-ddhits); print \$0,ddhits,ddmiss}"'
watch -n 5 'echo "=== ARC Stats ==="; arcstat 1 1 | tail -1; echo; echo "=== VM Memory/CPU ==="; qm list | egrep "VMID|100|108"'