Mention the scripts in the README

This commit is contained in:
Nicolas Jeannerod 2024-11-14 18:14:51 +01:00
parent 94e5356886
commit 3765a7e049
Signed by untrusted user: Niols
GPG key ID: 35DB9EC8886E1CB8

View file

@ -9,6 +9,14 @@
- Ignore “You do not have a valid subscription” message. - Ignore “You do not have a valid subscription” message.
* Basic terminology * Basic terminology
- Node :: physical host - Node :: physical host
* Automatically
This directory contains scripts that can automatically provision or remove a
Proxmox VM. For now, they are tied to one node in the Fediversity Proxmox, but
it would not be difficult to make them more generic. Try:
#+begin_src sh
sh provision.sh --help
sh remove.sh --help
#+end_src
* Preparing the machine configuration * Preparing the machine configuration
- It is nicer if the machine is a QEMU guest. On NixOS: - It is nicer if the machine is a QEMU guest. On NixOS:
#+begin_src nix #+begin_src nix
@ -23,46 +31,47 @@
~2a00:51c0:13:1305::XXX~. ~2a00:51c0:13:1305::XXX~.
- Name servers should be ~95.215.185.6~ and ~95.215.185.7~. - Name servers should be ~95.215.185.6~ and ~95.215.185.7~.
- Check [[https://netbox.protagio.org][Netbox]] to see which addresses are free. - Check [[https://netbox.protagio.org][Netbox]] to see which addresses are free.
* Upload your ISO * Manually via the GUI
** Upload your ISO
- Go to Fediversity proxmox. - Go to Fediversity proxmox.
- In the left view, expand under the node that you want and click on “local”. - In the left view, expand under the node that you want and click on “local”.
- Select “ISO Images”, then click “Upload”. - Select “ISO Images”, then click “Upload”.
- Note: You can also download from URL. - Note: You can also download from URL.
- Note: You should click on “local” and not “local-zfs”. - Note: You should click on “local” and not “local-zfs”.
* Creating the VM ** Creating the VM
- Click “Create VM” at the top right corner. - Click “Create VM” at the top right corner.
** General *** General
- Node :: which node will host the VM; has to be the same - Node :: which node will host the VM; has to be the same
- VM ID :: Has to be unique, probably best to use the "xxxx" in "vm0xxxx" (yet to be decided) - VM ID :: Has to be unique, probably best to use the "xxxx" in "vm0xxxx" (yet to be decided)
- Name :: Usually "vm" + 5 digits, e.g. "vm02199" - Name :: Usually "vm" + 5 digits, e.g. "vm02199"
- Resource pool :: Fediversity - Resource pool :: Fediversity
** OS *** OS
- Use CD/DVD disc image file (iso) :: - Use CD/DVD disc image file (iso) ::
- Storage :: local, means storage of the node. - Storage :: local, means storage of the node.
- ISO image :: select the image previously uploaded - ISO image :: select the image previously uploaded
No need to touch anything else No need to touch anything else
** System *** System
- BIOS :: OVMF (UEFI) - BIOS :: OVMF (UEFI)
- EFI Storage :: ~linstor_storage~; this is a storage shared by all of the Proxmox machines. - EFI Storage :: ~linstor_storage~; this is a storage shared by all of the Proxmox machines.
- Pre-Enroll keys :: MUST be unchecked - Pre-Enroll keys :: MUST be unchecked
- Qemu Agent :: check - Qemu Agent :: check
** Disks *** Disks
- Tick “advanced” at the bottom. - Tick “advanced” at the bottom.
- Disk size (GiB) :: 40 (depending on requirements) - Disk size (GiB) :: 40 (depending on requirements)
- SSD emulation :: check (only visible if “Advanced” is checked) - SSD emulation :: check (only visible if “Advanced” is checked)
- Discard :: check, so that blocks of removed data are cleared - Discard :: check, so that blocks of removed data are cleared
** CPU *** CPU
- Sockets :: 1 (depending on requirements) - Sockets :: 1 (depending on requirements)
- Cores :: 2 (depending on requirements) - Cores :: 2 (depending on requirements)
- Enable NUMA :: check - Enable NUMA :: check
** Memory *** Memory
- Memory (MiB) :: choose what you want - Memory (MiB) :: choose what you want
- Ballooning Device :: leave checked (only visible if “Advanced” is checked) - Ballooning Device :: leave checked (only visible if “Advanced” is checked)
** Network *** Network
- Bridge :: ~vnet1306~. This is the provisioning bridge; we will change it later. - Bridge :: ~vnet1306~. This is the provisioning bridge; we will change it later.
- Firewall :: uncheck, we will handle the firewall on the VM itself - Firewall :: uncheck, we will handle the firewall on the VM itself
** Confirm *** Confirm
* Install and start the VM ** Install and start the VM
- Start the VM a first time. - Start the VM a first time.
- Select the VM in the left panel. You might have to expand the node on which it is hosted. - Select the VM in the left panel. You might have to expand the node on which it is hosted.
- Select “Console” and start the VM. - Select “Console” and start the VM.
@ -73,18 +82,18 @@ No need to touch anything else
- Double click on the CD/DVD Drive line. Select “Do not use any media” and press OK. - Double click on the CD/DVD Drive line. Select “Do not use any media” and press OK.
- Double click on Network Device, and change the bridge to ~vnet1305~, the public bridge. - Double click on Network Device, and change the bridge to ~vnet1305~, the public bridge.
- Start the VM again. - Start the VM again.
* Remove the VM ** Remove the VM
- [[Shutdown the VM]]. - [[Shutdown the VM]].
- On the top right corner, click “More”, then “Remove”. - On the top right corner, click “More”, then “Remove”.
- Enter the ID of the machine. - Enter the ID of the machine.
- Check “Purge from job configurations” - Check “Purge from job configurations”
- Check “Destroy unreferenced disks owned by guest” - Check “Destroy unreferenced disks owned by guest”
- Click “Remove”. - Click “Remove”.
* Move the VM to another node ** Move the VM to another node
- Make sure there is no ISO plugged in. - Make sure there is no ISO plugged in.
- Click on the VM. Click migrate. Choose target node. Go. - Click on the VM. Click migrate. Choose target node. Go.
- Since the storage is shared, it should go pretty fast (~1 minute). - Since the storage is shared, it should go pretty fast (~1 minute).
* Shutdown the VM ** Shutdown the VM
- Find the VM in the left panel. - Find the VM in the left panel.
- At the top right corner appears a “Shutdown” button with a submenu. - At the top right corner appears a “Shutdown” button with a submenu.
- Clicking “Shutdown” sends a signal to shutdown the machine. This might not work if the machine is not listening for that signal. - Clicking “Shutdown” sends a signal to shutdown the machine. This might not work if the machine is not listening for that signal.