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
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 (make sure after the vm is created, to change the vmac for the network adapter to match that of the fallover ip you want to use (done in OVH ui)).

4. Once VM is setup, click start and go through the installation, when you get onto the network step enter the following (ip is different per vm): " " for address, "" for gateway (note the ips should be different, and should be the fallover ips configured in OVH UI).

5. Once vps is started (you may have to change the ordering so that booting disk is first), edit /etc/ssh/sshd_config changing PermitRootLogin to yes. Restart ssh afterwards (`service ssh restart`).

6. Run "ssh root@".

7. Empty /etc/network/interfaces and insert the following in it (doin’t forget to change the ipv4/ipv6 address):


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

source /etc/network/interfaces.d/*

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.0 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 8.8.8.8 8.8.4.4 dns-search miraheze.org

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

And reboot the vps