Proxmox Notes

OS Images

See PVE documentation on storage [1].

Full ISOs for KVM

Any ISO will do.

By default, PVE will look in /var/lib/vz/iso . Include alternate locations by adding the “iso” tag to a storage device in /etc/pve/storage.cfg .

LXC Templates

Proxmox maintains a collection of available machine types [2].

Download them to /var/lib/vz/template by default or any storage that has the “vztmpl” tag in /etc/pve/storage.cfg .

Cluster Death

If the cluster dies, but you don’t want to change the way you do business…

1cd /etc                  # to avoid being in /etc/pve
2pkill -9 corosync        # in case your service scripts are a problem
3umount /etc/pve -l       # remove the FUSE-shared config path
4service pve-cluster stop # let the service get itself caught up
5service corosync start
6service pve-cluster start

All over the Internet, people complain about multicast failing after two minutes of run time. I have yet to read about a reason, but I did not spend a lot of time searching. The Proxmox docs [3] have an entry on the subject.

To get corosync to go entirely unicast, adjust the “totem{}” block as below. Ensure all your nodes are in the “nodelist{}” block.

 1totem {
 2    cluster_name: mycluster
 3    config_version: 4
 4    interface {
 5        linknumber: 0
 6    }
 7    ip_version: ipv4-6
 8    secauth: on
 9    version: 2
10    transport: udpu
11}

Then, bounce cluster services on all nodes…

1service corosync stop
2ps -ef | grep --color corosync # Make sure it is really dead
3service corosync start
4service pve-cluster restart

Fix a running container

The equivalent of docker exec -it… bash is pct enter followed by a machine number.

Integrate with LDAP

Assume realm my.domain.com with server ipa0.my.domain.com on FreeIPA…

1pvesh create /access/domains \
2    --realm my.domain.com \
3    --type ldap \
4    --base_dn dc=my,dc=domain,dc=com \
5    --server1 ipa0.my.domain.com \
6    --port 636 \
7    --user_attr uid \
8    --secure 1 \
9    --verify 0

This creates a file /etc/pve/domains.cfg.

 1ldap: my.domain.com
 2        comment Freeipa on ipa0.my.domain.com
 3        base_dn dc=my,dc=domain,dc=com
 4        server1 ipa0.my.domain.com
 5        user_attr uid
 6        default 1
 7        port 636
 8        secure 1
 9        verify 0
10
11pve: pve
12        comment Proxmox VE authentication server
13
14pam: pam
15        comment Linux PAM standard authentication

Endnotes