forked from Fediversity/Fediversity
Move Proxmox-related things under deployment/proxmox
This commit is contained in:
parent
07fa942989
commit
84ba26d187
|
@ -1,12 +1,12 @@
|
||||||
#+title: Provisioning a Proxmox VM
|
#+title: Provisioning VMs via Proxmox
|
||||||
#+author: Kevin Muller, Hans van Zijst & Nicolas Jeannerod
|
|
||||||
#+date: <2024-10-25 Fri>
|
|
||||||
|
|
||||||
* Fediversity Proxmox
|
* Quick links
|
||||||
- http://192.168.51.81:8006/.
|
- Proxmox API doc :: https://pve.proxmox.com/pve-docs/api-viewer
|
||||||
- It is only accessible via Procolix's VPN; see with Kevin.
|
- Fediversity Proxmox ::
|
||||||
- You will need identifiers. Also see with Kevin. Select “Promox VE authentication server”.
|
- http://192.168.51.81:8006/.
|
||||||
- Ignore “You do not have a valid subscription” message.
|
- 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
|
* Basic terminology
|
||||||
- Node :: physical host
|
- Node :: physical host
|
||||||
* Preparing the machine configuration
|
* Preparing the machine configuration
|
|
@ -1,8 +1,6 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
set -euC
|
set -euC
|
||||||
|
|
||||||
## Proxmox API doc: https://pve.proxmox.com/pve-docs/api-viewer
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
## Parse arguments
|
## Parse arguments
|
||||||
|
|
||||||
|
@ -24,7 +22,7 @@ Required:
|
||||||
--vmid INT Identifier of the VM
|
--vmid INT Identifier of the VM
|
||||||
|
|
||||||
If not provided via the command line, username and password will be looked for
|
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.
|
first line, and the password on the second.
|
||||||
|
|
||||||
Optional:
|
Optional:
|
||||||
|
@ -68,11 +66,7 @@ fi
|
||||||
|
|
||||||
[ -z "$vmid" ] && die 'Required: `--vmid`.\n'
|
[ -z "$vmid" ] && die 'Required: `--vmid`.\n'
|
||||||
|
|
||||||
printf 'Configuration:\n'
|
printf 'Provisioning VM %d with:\n' $vmid
|
||||||
|
|
||||||
printf ' username: %s\n' $username
|
|
||||||
printf ' password: %s\n' $password
|
|
||||||
printf ' vmid: %s\n' $vmid
|
|
||||||
|
|
||||||
readonly iso
|
readonly iso
|
||||||
readonly sockets
|
readonly sockets
|
||||||
|
@ -205,7 +199,7 @@ while :; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
printf 'done.\n'
|
printf ' done.\n'
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
## Start VM
|
## Start VM
|
||||||
|
@ -220,4 +214,4 @@ wait_ $(from_response .data)
|
||||||
http_ POST $apiurl/nodes/$node/qemu/$vmid/status/start
|
http_ POST $apiurl/nodes/$node/qemu/$vmid/status/start
|
||||||
wait_ $(from_response .data)
|
wait_ $(from_response .data)
|
||||||
|
|
||||||
printf 'done.\n'
|
printf ' done.\n'
|
Loading…
Reference in a new issue