Tech:Proxmox
{{ {{Outdated}} }}
Cloud
Install by changing Type Of OS to “Basic”.
Select ‘Debian 12 “Bookworm” - debian12 (Linux)’ from the list and proceed to install, make sure to select your ssh key.
When you get to the end, enter the server name and select your ssh key from the dropdown.
After the server has come back up, login by doing
ssh debian@cloud[num].wikitide.net -i <key>
.Edit
/etc/hosts
and remove127.0.1.1
section, then add<main_ip> cloud[num].wikitide.net cloud[num]
.Edit
/etc/cloud/cloud.cfg
, changingmanage_etc_hosts
to false.Run
echo "deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
.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
.Run the following
apt update && apt full-upgrade
.Run the following
apt install proxmox-ve postfix open-iscsi
.Empty
/etc/network/interfaces.d/50-cloud-init.cfg
and enter the following:
Run
echo "network: {config: disabled}" > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
.Empty
/etc/network/interfaces
and insert the following:
Reboot the server.
Run
passwd root
and set the password, make sure it is secure.Run the following “cd /var/lib/vz/template/iso ; wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.4.0-amd64-netinst.iso” (note that this may be removed, in which case bump version like 12.4.0 -> 12.5.0).
On the main cluster host, press join information and copy the information (
ssh -L 8006:127.0.0.1:8006 <user>@<main_cluster_cloud_host_>.wikitide.net
).Go to https://localhost:8006.
Enter login details, click on “Datacenter” then “Cluster”.
Click on “Join Cluster”.
Where it says “Join information” copy what’s in the text box.
Now go onto the other cloud virt (for instance, cloud16) (
ssh -L 8006:127.0.0.1:8006 <user>@<cloud_host_>.wikitide.net
).Go to https://localhost:8006.
Click “Join Cluster”.
Paste into the “Join information” text box (the details you copied from cloud15).
Run
sudo ufw default allow FORWARD
required for VPS.
VPS
- 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.
- Run the following
ssh -L 8006:127.0.0.1:8006 <user>@<cloud_host>.wikitide.net
. - Go to https://localhost:8006 (and accept the invalid certificate as the connection will be secure due to SSH) and login using your account and password.
- Create a VM using the UI:
- ISO image: local, debian-XX-X.X-amd64-DVD-1.iso
- Type: Linux, 5.x - 2.6 Kernel
- SCSI Controller: VirtIO SCSI single
- Hard Disk: raw disk image, write back (unsafe) cache, SSD emulation and IO thread on (advanced)
- Ballooning: on
- Network: vmbr0, MAC address equal to vMAC for failover IP (or vmbr1 if internal only)
- Once VM is setup, click start and go through the installation, when you get onto the network step enter the following:
- IP address: the failover IP (or the allocated internal IP)
- Netmask = 255.255.255.255 (or /32)
- Default gateway: leave empty! Do not enter the gateway here yet, Debian won’t understand it.
- Example: on cloud15 (main IP 51.77.117.189), you want to give a VM the failover IP 51.195.236.255. Since this VM is on cloud15, the default gateway will be 51.77.117. 254
- 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 (ifdown ens18
&&ifup ens18
). - In
/etc/resolv.conf
:
- In
/etc/apt/sources.list
:
- Run puppet. Do not log out before your user account is set up by puppet; otherwise you’ll have a hard time getting back in.
Default gateway IPv4: first three octets of the cloud’s main IP address + ‘.254’. Example: on cloud15 (main IP 51.77.117.189), you want to give a VM the failover IP 51.195.236.255. Since this VM is on cloud15, the default gateway will be 51.77.117. 254
Instructions for getting the right IPv6 addresses:
- Each cloud server has a /64 assigned by OVH. For example, for cloud15 this is
2001:41d0:0800:1bbd::/64
. - In the OVH UI, you have assigned an IPv6 address for the new server, for example:
2001:41d0:800:1bbd::2
. - The last address in the /64 is the IPv6 gateway. In the example IP from 2), this would be
2001:41d0:800:1bFF:FF:FF:FF:FF
. If you want to add an internal IP in addition to public interfaces, you need to append the following to the above network/interfaces config file: