Proxmox
Get new CT Template
pveam update
pveam available
pveam download local ubuntu-18.10-standard_18.10-2_amd64.tar.gz
Drivers for Windows Guest
Securing with fail2ban
Error activating LV ‘pve/data’ failed:…
Also applies if local-lvm is not recognized
lvchange -an pve/data_tmeta
lvchange -an pve/data_tdata
vgchange -ay
Acces Network Storage from CT
Mount network storage in host (ProxMox Server)
Edit (on host) the file
/etc/pve/lxc/<ID-of-Container>.conf
Insert
mp0: <path-on-Host>,mp=<MountPoint-in-CT>
if proxmox not accesable
Login to host and run:
pvecm expected 1
CT is locked (snapshot-delete)
pct unlock <ID>
Release unused Space in VMs
When we are using qcow2 sparse virtual disks, we can reclaim free disk spaces which not used by the virtual machine. How to trigger the VM/guest operating system to reclaim it for us though? The Fix
Login to Proxmox VE web gui
Find the VM we want to reclaim the unused disk space for and click on it
Click on Hardware
Double click on the virtual hard drive we want to reclaim unused space for
Make sure the “Discard” is checked
Start the VM
Once the VM is fully booted:
sudo fstrim -av
Once it is done, we should be able to see the reclaimed disk space from Proxmox VE host (Only if there is unused space, if there is no unused space, we will not see any changes from Proxmox VE host’s disk space)
We can also enable the automatic fstrim from the VM, so we do not need to do it manually everytime. Use following command to enable this feature:
sudo systemctl enable fstrim.timer
Forcing VM/CT to stop
VM
qm stop <vm-id>
CT
lxc-stop <ct-id>
Backups
Message: unable to connect to qmeventd socket (vmid: <id>) - Connection refused
systemctl daemon-reload
systemctl start qmeventd.service
Cluster
Get Info about Cluster:
pvecm nodes
pvecm status
Remove Node from Cluster:
pvecm delnode
Edit Cluster Config Be carefull and make a BACKUP
vim /etc/corosync/corosync.conf # You should always be able to edit this
vim /etc/pve/corosync.conf # Live/Running Settings
After editing, restart the following servies
systemctl restart pve-cluster
systemctl restart corosync
Deleting Cluster
systemctl stop pve-cluster.service
pmxcfs -l
rm -f /etc/corosync/authkey
rm -f /etc/pve/cluster.conf /etc/pve/corosync.conf
rm -f /etc/cluster/cluster.conf /etc/corosync/corosync.conf
rm /var/lib/pve-cluster/corosync.authkey
systemctl stop pve-cluster
rm /var/lib/pve-cluster/.pmxcfs.lockfile