How to build Proxmox tmpfs image
Once you have a successfully running openQRM Server you can follow the steps below for a Proxmox VE Solution.
These instructions will enable you to proof of concept the Proxmox VE Solution as a tmpfs deployment, however the clustering requires special initialisation. We have developed the ATU Plugin to orchestrate these steps for synchronized cluster initilisation on start and backup configuration on shutdown.
- Download PVE Kernel - http://download.proxmox.com/debian/dists/buster/pve-no-subscription/binary-amd64/pve-kernel-5.4.114-1-pve_5.4.114-1_amd64.deb
- Install Kernel
- Add Kernel to openQRM
- (Replace KERNEL_NAME, KERNEL_VER, OPENQRM_UI_USER, OPENQRM_UI_PASS, SERVER_NAME with the appropriate variables) openqrm kernel add -n KERNEL_NAME -v KERNEL_VER -u OPENQRM_UI_USER -p OPENQRM_UI_PASS -l / -i initramfs
- openqrm kernel add -n pve-5.4.114-1 -v 5.4.114-1-pve -u OPENQRM_USER -p OPENQRM_PASS -l / -i initramfs
- If you are using a self signed cert you may need to load the https call back manually; https://SERVER_NAME/openqrm/base/server/kernel/kernel-action.php?kernel_command=new_kernel&kernel_name=KERNEL_NAME&kernel_version=KERNEL_VER
- Create Image - To create an image for Proxmox which can be used as a tmpfs image, follow these steps;
- apt-get install debootstrap
- Create directory mkdir -p /exports/proxmox_image/dev/pts
- debootstrap --arch amd64 buster /exports/proxmox_image/ https://deb.debian.org/debian/
- mount --bind /dev/pts /exports/proxmox_image/dev/pts
- mount --bind /dev/ /exports/proxmox_image/dev/
- mount --bind /proc /exports/proxmox_image/proc
- mount --bind /exports/proxmox_image/ /exports/proxmox_image/
- mount --make-rprivate /exports/proxmox_image/
- mount --bind /var/run/dbus /exports/proxmox_image/var/run/dbus
- chroot /exports/proxmox_image
- apt-get install wget net-tools screen locales collectd
- dpkg-reconfigure locales
- Follow steps (Start at "Install Proxmox VE") @ https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_Buster
- We do not need to install grub
- set root password; passwd
- implement noclear for getty/inittab;
- mkdir -p /firstname.lastname@example.org/
- edit file; /email@example.com/noclear.conf add contents;
- If using the ATU Plugin then disable services: pvedaemon, pve-proxy, pve-manager, pve-cluster, cman, corosync, ceph, pvestatd, qemu-server, rrdcached, spiceproxy,
- Activate NFS Storage (if not already done so)
- Under Plugins -> Storage -> NFS-Storage
- Add NFS Storage;
- name "openqrm-nfs"
- Deployment Type: "nfs-deployment"
- Add NFS Volume (this triggers tmpfs storage)
- Under Plugins -> Storage -> NFS-Storage -> Volume Admin -> Edit -> proxmox_image "ADD IMAGE"
- restart server/vm incase of duplicate services started from chroot image initialisation
- Now create a TmpFs-Storage: Plugins -> Storage -> Tmpfs-storage -> Volume Admin -> New Storage
- Name: openqrm-tmpfs
- Deployment Type: tmpfs-storage
- Now Create an Image: Components -> Image -> Add new Image -> Tmpfs-root deployment -> click edit on the "openqrm-tmpfs" -> Click "ADD NEW VOLUME"
- Name: pve5
- Size: 3 GB
- Description: proxmox ve 5
- Now you will need to link a resource to a server. A resource is a blank system/server/chassis and a Server is a configuration applied to a resource/blank system. So you can either manually add a server or if a system has booted via dhcp/pxe then that system will be selectable and named "idle" for this next step.
- Click "ADD A NEW SERVER"
- Select the resource or manually setup a server
- then select n image for server, select the pve5 = tmpfs-deployment as previously setup (leave the tick on edit image details after selection.
- then select "Install from NAS/NFS" select the "proxmox_image" as above then click submit
- then select the kernel 5.4.114-1-pve then click submit
- Tar Image
- mkdir -p /usr/share/openqrm/web/boot-service/tmpfs/
- cd /exports/proxmox_image
- tar --exclude=usr/src --exclude=var/lib/apt/lists --exclude=usr/lib/jvm --exclude=var/lib/apt/lists --exclude=usr/share/man --exclude=usr/share/doc --exclude=usr/share/icons --numeric-owner -czf /usr/share/openqrm/web/boot-service/tmpfs/proxmox_image.tgz .
- Create NFS Image link to TmpFS image
implement noclear for getty/inittab
set root password (otherwise not able to login)
The ATU Plugin is optimised for Proxmox Cluster Deployments and TMPFS Server Configuration Sync Initialise ATU plugin
Create custom FS