meta/proxmox/proxmox-provisioning.org

85 lines
3.7 KiB
Org Mode
Raw Normal View History

2024-10-25 11:47:39 +02:00
#+title: Provisioning a Proxmox VM
#+author: Kevin Muller, Hans van Zijst & Nicolas Jeannerod
#+date: <2024-10-25 Fri>
2024-10-25 15:52:39 +02:00
* Quick links
- Fediversity Proxmox :: http://192.168.51.81:8006/
* Basic terminology
- Node :: physical host
2024-10-25 11:47:39 +02:00
* Preparing the machine configuration
- It is nicer if the machine is a QEMU guest. On NixOS:
#+begin_src nix
services.qemuGuest.enable = true
#+end_src
- Choose static IPs for your machine. The IPv4 and IPv6 subnets available for
Fediversity testing are:
- 95.215.187.0/24. Gateway is 95.215.187.1.
- 2a00:51c0:13:1305::/64. Gateway is 2a00:51c0:13:1305::1.
2024-10-25 15:52:39 +02:00
- Check [[https://netbox.protagio.org][Netbox]] to see which addresses are free
2024-10-25 11:47:39 +02:00
* Upload your ISO
2024-10-25 15:52:39 +02:00
- In the left view, expand under the node that you want and click on “local”.
- Select “ISO Images”, then click “Upload”.
- Note: You can also download from URL.
- Note: You should click on “local” and not “local-zfs”.
2024-10-25 11:47:39 +02:00
* Creating the VM
- Click “Create VM” at the top right corner.
** General
2024-10-25 15:52:39 +02:00
- 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)
- Name :: Usually "vm" + 5 digits, e.g. "vm02199"
2024-10-25 11:47:39 +02:00
- Resource pool :: Fediversity
** OS
2024-10-25 15:52:39 +02:00
- Use CD/DVD disc image file (iso) ::
- Storage :: local, means storage of the node.
- ISO image :: select the image previously uploaded
No need to touch anything else
2024-10-25 11:47:39 +02:00
** System
- BIOS :: OVMF (UEFI)
2024-10-25 15:52:39 +02:00
- EFI Storage :: ~linstor_storage~; this is a storage shared by all of the Proxmox machines.
2024-10-25 11:47:39 +02:00
- Pre-Enroll keys :: MUST be unchecked
- Qemu Agent :: check
** Disks
2024-10-25 15:52:39 +02:00
- Tick “advanced” at the bottom.
- Disk size (GiB) :: 40 (depending on requirements)
- SSD emulation :: check (only visible if “Advanced” is checked)
- Discard :: check, so that blocks of removed data are cleared
2024-10-25 11:47:39 +02:00
** CPU
- Sockets :: 1 (depending on requirements)
- Cores :: 2 (depending on requirements)
2024-10-25 11:47:39 +02:00
- Enable NUMA :: check
** Memory
- Memory (MiB) :: choose what you want
2024-10-25 15:52:39 +02:00
- Ballooning Device :: leave checked (only visible if “Advanced” is checked)
2024-10-25 11:47:39 +02:00
** Network
2024-10-25 15:52:39 +02:00
- Bridge :: ~vnet1306~. This is the provisioning bridge; we will change it later.
2024-10-25 11:47:39 +02:00
- Firewall :: uncheck, we will handle the firewall on the VM itself
** Confirm
* Install and start the VM
2024-10-25 15:52:39 +02:00
- 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 “Console” and start the VM.
- Install the VM as you would any other machine.
- [[Shutdown the VM]].
- After the VM has been installed:
- Select the VM again, then go to “Hardware”.
- 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.
- Start the VM again.
2024-10-25 11:47:39 +02:00
* Remove the VM
2024-10-25 15:52:39 +02:00
- [[Shutdown the VM]].
- On the top right corner, click “More”, then “Remove”.
- Enter the ID of the machine.
- Check “Purge from job configurations”
- Check “Destroy unreferenced disks owned by guest”
- Click “Remove”.
* Move the VM to another node
2024-10-25 11:47:39 +02:00
- Make sure there is no ISO plugged in.
- Click on the VM. Click migrate. Choose target node. Go.
- Since the storage is shared, it should go pretty fast (~1 minute).
2024-10-25 15:52:39 +02:00
* Shutdown the VM
- Find the VM in the left panel.
- 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.
- Brutal solution: in the submenu, select “Stop”.
- The checkbox “Overrule active shutdown tasks” means that the machine should be stopped even if a shutdown is currently ongoing. This is particularly important if you have tried to shut the machine down normally just before.