Proxmox Datacenter Manager Post Install
Set up package repositories, the subscription notice and updates on a Proxmox Datacenter Manager host.
post-pdm-install.sh is the post-install routine for Proxmox Datacenter Manager (PDM). A fresh PDM has the pdm-enterprise repository enabled, which makes apt update fail without a subscription; this script lets you switch to pdm-no-subscription.
Website entry: post-pdm-install. Source: tools/pve/post-pdm-install.sh.
Run
In the Proxmox Datacenter Manager shell, as root:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/post-pdm-install.sh)"The script exits with 232 unless the package proxmox-datacenter-manager is installed.
Prompts
After the text prompt Start the Proxmox Datacenter Manager Post Install Script (y/n)? the script asks one whiptail menu per step. The Debian codename comes from VERSION_CODENAME in /etc/os-release.
| Menu title | Choices | Effect |
|---|---|---|
| PDM SOURCES | yes | Writes /etc/apt/sources.list.d/debian.sources (deb822; the release, its -updates and -security suites; main contrib non-free-firmware) and deletes /etc/apt/sources.list. |
| PDM-ENTERPRISE | see below | |
| PDM-NO-SUBSCRIPTION | see below | |
PDM-TEST (only if pdm-test is not found anywhere) | yes | Writes /etc/apt/sources.list.d/pdm-test.sources with Enabled: false. |
| SUBSCRIPTION NAG | yes | Writes /usr/local/bin/pdm-remove-nag.sh, runs it once and installs the APT hook /etc/apt/apt.conf.d/no-nag-script. |
no | Deletes both files and reinstalls proxmox-datacenter-manager-ui, which restores the original interface. | |
| UPDATE | yes | apt update and apt -y dist-upgrade. |
| REBOOT | yes | Reboots the host. |
The enterprise and no-subscription menus depend on the state found in /etc/apt/sources.list, *.list and *.sources:
| Repository | State | Choices (first is preselected) |
|---|---|---|
pdm-enterprise | Enabled | disable, keep, delete |
| Disabled | keep, enable, delete | |
| Missing | no, yes: writes /etc/apt/sources.list.d/pdm-enterprise.sources | |
pdm-no-subscription | Enabled | keep, disable, delete |
| Disabled | enable, keep, delete | |
| Missing | yes: writes /etc/apt/sources.list.d/proxmox.sources; no |
disable and enable set Enabled: false or Enabled: true in a .sources file, and comment or uncomment the lines of a .list file. delete removes the file that contains the repository.
How the notice is removed
PDM's interface is one JavaScript bundle. The nag script appends a block marked PDM_NO_MORE_NAGGING to /usr/share/javascript/proxmox-datacenter-manager/js/pdm-ui_bundle.js. That code closes the subscription dialog in the browser when it appears. The APT hook reruns the script after every package operation, so the block is added again after a PDM update.
Clear the browser cache or reload with Ctrl+Shift+R afterwards, otherwise the old bundle stays cached.
Undo
- Subscription notice: run the script again and answer
noat SUBSCRIPTION NAG. - Repositories: run the script again and pick
enable,disableordelete. /etc/apt/sources.listis deleted without a backup when you answeryesat PDM SOURCES.
Environment variables
| Variable | Default | Purpose |
|---|---|---|
COMMUNITY_SCRIPTS_CORE_URL | https://raw.githubusercontent.com/community-scripts/core/main | Base URL the script loads api/api.func from. |
Limits
disableanddeleteact on the whole file that contains the repository.- The script's closing reminder applies: PDM is under active development, so keep direct access to the web interfaces of your nodes.