diff --git a/proxmox/proxmox-provisioning.org b/deployment/proxmox/README.org similarity index 90% rename from proxmox/proxmox-provisioning.org rename to deployment/proxmox/README.org index 94f6cc0..7776aa4 100644 --- a/proxmox/proxmox-provisioning.org +++ b/deployment/proxmox/README.org @@ -1,12 +1,12 @@ -#+title: Provisioning a Proxmox VM -#+author: Kevin Muller, Hans van Zijst & Nicolas Jeannerod -#+date: <2024-10-25 Fri> +#+title: Provisioning VMs via Proxmox -* Fediversity Proxmox -- http://192.168.51.81:8006/. -- It is only accessible via Procolix's VPN; see with Kevin. -- You will need identifiers. Also see with Kevin. Select “Promox VE authentication server”. -- Ignore “You do not have a valid subscription” message. +* Quick links +- Proxmox API doc :: https://pve.proxmox.com/pve-docs/api-viewer +- Fediversity Proxmox :: + - http://192.168.51.81:8006/. + - It is only accessible via Procolix's VPN; see with Kevin. + - You will need identifiers. Also see with Kevin. Select “Promox VE authentication server”. + - Ignore “You do not have a valid subscription” message. * Basic terminology - Node :: physical host * Preparing the machine configuration diff --git a/deployment/provision-vm.sh b/deployment/proxmox/provision.sh similarity index 94% rename from deployment/provision-vm.sh rename to deployment/proxmox/provision.sh index c624fd7..39d74ac 100755 --- a/deployment/provision-vm.sh +++ b/deployment/proxmox/provision.sh @@ -1,8 +1,6 @@ #!/usr/bin/env sh set -euC -## Proxmox API doc: https://pve.proxmox.com/pve-docs/api-viewer - ################################################################################ ## Parse arguments @@ -24,7 +22,7 @@ Required: --vmid INT Identifier of the VM If not provided via the command line, username and password will be looked for - in a `.proxmox` file in the current working directory, the username on the + in a '.proxmox' file in the current working directory, the username on the first line, and the password on the second. Optional: @@ -68,11 +66,7 @@ fi [ -z "$vmid" ] && die 'Required: `--vmid`.\n' -printf 'Configuration:\n' - -printf ' username: %s\n' $username -printf ' password: %s\n' $password -printf ' vmid: %s\n' $vmid +printf 'Provisioning VM %d with:\n' $vmid readonly iso readonly sockets @@ -205,7 +199,7 @@ while :; do esac done -printf 'done.\n' +printf ' done.\n' ################################################################################ ## Start VM @@ -220,4 +214,4 @@ wait_ $(from_response .data) http_ POST $apiurl/nodes/$node/qemu/$vmid/status/start wait_ $(from_response .data) -printf 'done.\n' +printf ' done.\n'