Tech:Proxmox

Cloud
1. Install by changing Type Of OS to “Basic”

2. Select “Debian 10 "Buster" - debian10 (Linux)” from the list and proceed to install, make sure to select your ssh key.

3. When you get to the end, enter server name and select your ssh key from the drop down.

4. After server has come back up, login by doing `ssh debian@cloud[num].miraheze.org -i `

5. Edit /etc/hosts and remove `127.0.1.1` section, then add  cloud[num].miraheze.org cloud[num]

6. Edit /etc/cloud/cloud.cfg, changing manage_etc_hosts to false.

7. Run "echo "deb http://download.proxmox.com/debian/pve buster pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list"

8. Run "wget http://download.proxmox.com/debian/proxmox-ve-release-6.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg"

9. Run the following "apt update && apt full-upgrade".

10. Run the following "apt install proxmox-ve postfix open-iscsi"

11. Empty /etc/network/interfaces.d/50-cloud-init.cfg and enter the following:

auto lo iface lo inet loopback dns-nameservers 213.186.33.99
 * 1) This file is generated from information provided by
 * 2) the datasource.  Changes to it will not persist across an instance.
 * 3) To disable cloud-init's network configuration capabilities, write a file
 * 4) /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
 * 5) network: {config: disabled}

auto eth0 iface eth0 inet dhcp mtu 1500

12. Run 'echo "network: {config: disabled}" > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg'

13. Empty /etc/network/interfaces and insert the following


 * 1) This file describes the network interfaces available on your system
 * 2) and how to activate them. For more information, see interfaces(5).

auto lo iface lo inet loopback
 * 1) The loopback network interface

iface eno1 inet manual

auto vmbr0 iface vmbr0 inet static address netmask 255.255.255.0 broadcast  gateway bridge-ports eno1 bridge-stp off bridge-fd 0
 * 1) IPV4 main host addresse, replace address, broadcast and gateway with correct ip.

iface vmbr0 inet6 static address netmask 128 gateway post-up /sbin/ip -f inet6 route add dev vmbr0 post-up /sbin/ip -f inet6 route add default via pre-down /sbin/ip -f inet6 route del dev vmbr0 pre-down /sbin/ip -f inet6 route del default via
 * 1) IPV6 addresses, replace address, gateway with correct ip

source /etc/network/interfaces.d/*
 * 1) Set this one last, so that cloud-init or user can
 * 2) override defaults.

14. Reboot the server.

15. Run `passwd root` and set the password, make sure it is secure.

16. Run the following "cd /var/lib/vz/template/iso ; wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.3.0-amd64-netinst.iso" (note that this may be removed, in which case bump version like 10.3.0 -> 10.4.0).

17. On the main cluster host, press join information and copy the information ("ssh -L 8006:127.0.0.1:8006 @.miraheze.org").

18. Go to https://localhost:8006

19. Enter login details, click on “Datacenter” then “Cluster”.

20. Click on “Join Cluster”

21. Where it says “Join information” copy what’s in the text box.

22. Now go onto the other cloud virt (for instance, cloud2) ("ssh -L 8006:127.0.0.1:8006 @.miraheze.org")

23. Go to https://localhost:8006

24. Click “Join Cluster”

25. Paste into “Join information” text box (the details you copied from cloud1).

26. Run sudo ufw default allow FORWARD required for VPS.

VPS
source /etc/network/interfaces.d/*
 * 1) Run the following "ssh -L 8006:127.0.0.1:8006 @.miraheze.org"
 * 2) Go to https://localhost:8006 (and accept the invalid certificate as connection will be secure due to SSH) and login using your account and password.
 * 3) Create a VM using the UI
 * 4) In the OVH UI: assign a failover IPv4 address and IPv6 address for the new VM. Ensure the MAC address of the network adapter of the new VM matches the vMAC address assigned for the failover IPv4 address in OVH.
 * 5) Once VM is setup, click start and go through the installation, when you get onto the network step enter the following:
 * 6) * IP address: the failover IP
 * 7) * Netmask = 255.255.255.255 (or /32)
 * 8) * Default gateway: first three octets of the cloud's main IP address + '.254'
 * 9) * Example: on cloud5 (main IP 51.77.117.189), you want to give a VM the failover IP 51.195.236.255. Since this VM is on cloud5, the default gateway will be 51.77.117.254
 * 10) After install: empty /etc/network/interfaces, insert the following in it (don’t forget to change the IPv4/IPv6 addresses) and reload the network configuration (  &&  :
 * 1) This file describes the network interfaces available on your system
 * 2) and how to activate them. For more information, see interfaces(5).

auto lo iface lo inet loopback
 * 1) The loopback network interface

allow-hotplug ens18 auto ens18 iface ens18 inet static address  gateway netmask 255.255.255.255

iface ens18 inet6 static address netmask 64 post-up /sbin/ip -f inet6 route add dev ens18 post-up /sbin/ip -f inet6 route add default via pre-down /sbin/ip -f inet6 route del default via pre-down /sbin/ip -f inet6 route del dev ens18

Instructions for getting the right IPv6 addresses:
 * 1) Each cloud server has a /64 assigned by OVH. For example, for cloud5 this is.
 * 2) In the OVH UI, you have assigned an IPv6 address for the new server, for example:.
 * 3) The last address in the /64 is the IPv6 gateway. In the example IP from 2), this would be.