PMM Server is supplied as a Open Virtualization Format (OVF) appliance file. Proxmox does not directly support the same but we can follow a few steps to make it work ! In my case, I used CEPH rbd storage in proxmox cluster for innstalling PMM. Downlaoded from HERE
Steps
SCP the file to Proxmox Host
scp pmm-server-2.5.0.ova root@proxmoxHostIp:/var/lib/vz
ssh root@proxmoxHostIp
cd /var/lib/vz
tar xvf pmm-server-2.5.0.ova
ls
# PMM2-Server-2020-04-14-1130-disk001.vmdk PMM2-Server-2020-04-14-1130.mf pmm-server-2.5.0.ova snippets
# images PMM2-Server-2020-04-14-1130-disk002.vmdk PMM2-Server-2020-04-14-1130.ovf private
# template
Code language: PHP (php)
Convert VMDKs to RAW, the format supported by CEPH RBD storage). Commands to convert to qcow2 format (if you wish to use ZSH) are also listed here
qemu-img convert -f vmdk PMM2-Server-2020-04-14-1130-disk001.vmdk -O raw disk1.raw
qemu-img convert -f vmdk PMM2-Server-2020-04-14-1130-disk002.vmdk -O raw disk2.raw
qemu-img convert -f vmdk PMM2-Server-2020-04-14-1130-disk001.vmdk -O qcow2 disk001.qcow2
qemu-img convert -f vmdk PMM2-Server-2020-04-14-1130-disk002.vmdk -O qcow2 disk002.qcow2
qm importdisk 126 disk1.raw cephpool1
qm importdisk 126 disk2.raw cephpool1
Code language: CSS (css)
Create a VM with 2 cores, 4 GB RAM and a HDD in the Proxmox Host. Note the VMID. In my case, VMID was 126. The hard-drives attached to this VM were in a CEPH rbd pool of the proxmox cluster. The name of the pool was cephpool1. Create but do not start the VM.
Now Import the RAW disks to the cephpool1 and associate with the the VMID 126
qm importdisk 126 disk1.raw cephpool1
qm importdisk 126 disk2.raw cephpool1
Code language: CSS (css)
Now these hard drives are imported but not yet enabled for the VM.
Select the VMID > Hardware. You will see two unused disks there. If there are any already attached HDDs, remove and delete them. Then select the first unused (lower numbered) HDD, click Edit > Add in the dialog box. Repeat process for the next unused HDD.
Start up the VM and PMM should start.
Log in using user – root, password – percona and set a new password by followng the prompts.
Set a Static IP address. This is a CentOS 7 VM LINK
vi /etc/cloud/cloud.cfg
# ADD LINES
network:
config: disabled
# !wq
# IP Address in CIDR notation
nmcli con mod "System eth0" ipv4.addresses 192.168.1.250/24
# Default gateway
nmcli con mod "System eth0" ipv4.gateway 192.168.1.1
# DNS
nmcli con mod "System eth0" ipv4.dns "8.8.8.8 8.8.4.4"
nmcli con mod "System eth0" ipv4.method manual
nmcli con mod "System eth0" connection.autoconnect yes
sudo reboot
Code language: PHP (php)
FOLLOWING WOULD NOT PERSIS AFTER REBOOT
ip a
# Note the name of ethernet device and edit the corresponding config file
vi /etc/sysconfig/network-scripts/ifcfg-eth0
Code language: PHP (php)
Add a user for management and exchange SSH Keys
# On PMM Server
adduser vivek
passwd vivek
usermod -aG wheel vivek
yum install nano
nano /etc/ssh/sshd_config
# Enable PasswordLogin
# PasswordAuthentication yes
systemctl restart sshd
# On Client
ssh-copy-id vivek@192.168.1.250
# On PMM Server
nano /etc/ssh/sshd_config
# Disable PasswordLogin
# PasswordAuthentication no
systemctl restart sshd
Code language: PHP (php)
Set environment
nano /etc/environment
# LANG=en_US.utf-8
# LC_ALL=en_US.utf-8
sudo reboot
Code language: PHP (php)
Access web interface and set password
Using a broswer go to the Dashboard at https://192.168.1.250
Log in using admin:admin
set a new password: PMMPassword
On Node to be monitored
wget https://repo.percona.com/apt/percona-release_latest.generic_all.deb
sudo dpkg -i percona-release_latest.generic_all.deb
apt-get update
sudo apt-get update
sudo apt-get install pmm2-client
sudo pmm-admin config --server-url=https://admin:PMMPassword@192.168.1.250:443 --server-insecure-tls
sudo nano /etc/mysql/my.cnf
# Enable Perfromace schema
sudo service mariadb status
sudo service mariadb restart
sudo service mariadb status
mysql -u dbadministrator -p
CREATE USER 'pmm'@'localhost' IDENTIFIED BY 'pass' WITH MAX_USER_CONNECTIONS 10;
GRANT SELECT, PROCESS, SUPER, REPLICATION CLIENT, RELOAD ON *.* TO 'pmm'@'localhost';
GRANT SELECT ON performance_schema.* TO 'pmm'@'localhost';
sudo pmm-admin add mysql --username=pmm --password=pass --query-source=perfschema ps-mysql 127.0.0.1:3306
Code language: PHP (php)