In the Virtual Machine
Install QEMU Agent
To properly shutdown the guest, instead of relying on ACPI commands or windows policies and to freeze the guest file system when making a backup (on windows, use the volume shadow copy service VSS).
sudo apt update
sudo apt install qemu-guest-agent
sudo systemctl enable qemu-guest-agent
# After restarting the VM
sudo systemctl status qemu-guest-agent
Proxmox cluster
Download the ISO image of proxmox here.
In case you don’t have access to virtual media via IPMI, then the ISO image must be loaded into an USB drive with a tool like USBimager here.
Insert the USB, power on your rig and install Proxmox.
pfSence + HAproxy
https://youtu.be/V6di1EAovN8 https://youtu.be/KkRHqxbWvAM
https://www.pfsense.org/download/
https://ubuntu.com/download/desktop
https://ubuntu.com/download/server
VM preparation for template:
Remove cloud-init (if not needed)
sudo touch /etc/cloud/cloud-init.disabled
Disable all services (uncheck everything except "None: Failsafe datasource"):
sudo dpkg-reconfigure cloud-init
Uninstall the package and delete the folders
sudo apt purge cloud-init
sudo rm -rf /etc/cloud/
sudo rm -rf /var/lib/cloud/
sudo reboot
Install the emulator agent:
sudo apt install qemu-guest-agent
Remove ssh keys
cd /etc/ssh
ll
sudo rm ssh_host_*
ll
Empty the machine id file:
cat /etc/machine-id
sudo truncate -s 0 /etc/machine-id
cat /etc/machine-id
Check or create the symlink to the machine if file
ll /var/lib/dbus/machine-id
sudo rm /var/lib/dbus/machine-id
sudo ln -s /etc/machine-id /var/lib/dbus/machine-id
ll /var/lib/dbus/machine-id
After spawning
sudo nano /etc/hostname
sudo nano /etc/hosts
sudo dpkg-reconfigure openssh-server
sudo systemctl restart ssh
If increasing the disk size
sudo fdisk -l
sudo parted /dev/sda
(parted) print-> Fix
(parted) resizepart 2 100% -> Yes
(parted) quit
sudo resize2fs /dev/sda2
geoDNS git
To clone for the first time:
GIT_SSH_COMMAND="ssh -i ~/.ssh/dotters_gatotech" git clone git@github.com:senseless/dotters-ssl.git
To pull the latest changes
GIT_SSH_COMMAND="ssh -i ~/.ssh/dotters_gatotech" git clone git@github.com:senseless/dotters-ssl.git
Backup of bootnodes’ network keys
In your bootnode (e.g. westend):
cd your_path/chains/westend2/network
sudo cp secret_ed25519 ~/bootnode_westend_secret_ed25519
cd ~
sudo chown user:user bootnode_westend_secret_ed25519
exit
From your local terminal:
scp -P ssh_port user@bootnode.domain:~/bootnode_westend_secret_ed25519 .
Haproxy
Install Haproxy
sudo apt install --no-install-recommends software-properties-common
sudo add-apt-repository ppa:vbernat/haproxy-2.8
sudo apt update
sudo apt install haproxy