Proxmox VE does two very unusual things:
- Places onto an admin the burden of manually managing numeric unique IDs for each VM/container.
- Sorts VMs/containers in the UI by those IDs rather than their names, with no option to change the behavior. (While the table views in the right-hand detail pane does allow you to click around to sort by names and a few other things, it doesn't remember that, but the tree views in the left hand pane always sort by IDs regardless with no option to change).
The reasons for this aren't clear and aren't stated anywhere in the docs, nor any of the bug reports/feature requests related to this issue (some dating back on the order of a decade).
Why do I have to think about this at all?
As a newcomer to Proxmox, forcing me to worry about IDs adds this weird point of friction to creating and managing my VMs, and doesn't seem to offer me any benefit in return. I don't want to waste time agonizing over how I should structure and space out IDs just to get them sorted alphabetically, in their natural order. I know a lot of professional sysadmins but can't think of one who would naturally think about their VMs by numeric IDs instead of hostnames. Maybe they have to use a hypervisor's underlying auto-generated IDs occasionally to diagnose/fix specific issues or to run CLI commands, but IDs as the nominal case? No.
I know the system needs fixed IDs of some kind so that you can rename VMs and not screw everything up under the hood—that's normal, and much appreciated. Human-managed numeric identifiers is not a normal feature of a hypervisor nor a hypervisor management system.
The PVE manager's resource tree appears to sort by a few things, first by resource type for grouping of like things (VM, container, storage), then by their IDs. The label it shows in the UI for a given resource is a calculated field that it calls a description, which includes its ID, then its name (when applicable and available). That combined description is also displayed in detailed VM lists that the UI renders, and the JS-based ResourceStore code is the place where that gets generated.
This diff patches the latter half of the sorting behavior to sort by name instead, and changes the tree and table labels from "ID (name)" to "name (ID)".
It can be applied cleanly to pve-manager 7.1's copy of
/usr/share/pve-manager/js/pvemanagerlib.js (both 7.1 and 7.0 patch cleanly), which appears to be combined at build time from multiple JS files, but ultimately the affected logic comes from www/manager6/data/ResourceStore.js.