pve cli commands on my debian VM with pdm?

danjp

New Member
Nov 4, 2024
6
1
3
Hello,

I created a Debian VM and installed PDM. I added the three nodes part of a cluster to it and all is well. What would be the apt packages to install in order to use the proxmox (pve and qm) cli commands on my VM/PDM console?

Thanks,
 
The Proxmox VE management commands (qm, pct, pvesm, etc.) are integral parts of a PVE installation and only work locally on a PVE node, so there is no way to use them from a Proxmox Datacenter Installation at this moment. At subset of the functionality is available through the proxmox-datacenter-manager-client CLI tool, but this is still very limited and likely not a replacement for the local management tools for the foreseeable future.

Hope this helps.
 
  • Like
Reactions: smueller
The Proxmox VE management commands (qm, pct, pvesm, etc.) are integral parts of a PVE installation and only work locally on a PVE node, so there is no way to use them from a Proxmox Datacenter Installation at this moment. At subset of the functionality is available through the proxmox-datacenter-manager-client CLI tool, but this is still very limited and likely not a replacement for the local management tools for the foreseeable future.

Hope this helps.
Lukas,

I can't find (path) the subset of CLI tools that come with proxmox-datacenter-manager. Could you provide that info. I see that from the PDM UI (Remotes menu) I could shutdown/start, and migrate VMs, would that subset of the functionality have the commands?
Thanks for the info it helps!
Daniel
 
Hello @danjp,

the proxmox-datacenter-manager-client ist by default installed in your PDM installation, with it you can manage remotes.

Example usage to stop a VM on a remote Cluster:
Code:
root@pdm:~# proxmox-datacenter-manager-client pve qemu stop pve-2-frg-tk 702
upid: pve-2-frg-tk!UPID:PMX4:00231695:03782438:6799D85C:qmstop:702:root@pam!pdm-admin:
TaskStatus {
    exitstatus: Some(
        "OK",
    ),
    id: "702",
    node: "PMX4",
    pid: 2299541,
    pstart: 58205240,
    starttime: 1738135644,
    status: Stopped,
    ty: "qmstop",
    upid: "UPID:PMX4:00231695:03782438:6799D85C:qmstop:702:root@pam!pdm-admin:",
    user: "root@pam",
}

You can install the PDM-Cli via apt install proxmox-datacenter-manager-client on a different machine.
Be sure to add this repository to the sources list: deb http://download.proxmox.com/debian/pdm bookworm pdm-test

Example with echo:
Code:
 echo "deb http://download.proxmox.com/debian/pdm bookworm pdm-test" > /etc/apt/sources.list.d/pdm-test.list
 
Hello @danjp,

the proxmox-datacenter-manager-client ist by default installed in your PDM installation, with it you can manage remotes.

Example usage to stop a VM on a remote Cluster:
Code:
root@pdm:~# proxmox-datacenter-manager-client pve qemu stop pve-2-frg-tk 702
upid: pve-2-frg-tk!UPID:PMX4:00231695:03782438:6799D85C:qmstop:702:root@pam!pdm-admin:
TaskStatus {
    exitstatus: Some(
        "OK",
    ),
    id: "702",
    node: "PMX4",
    pid: 2299541,
    pstart: 58205240,
    starttime: 1738135644,
    status: Stopped,
    ty: "qmstop",
    upid: "UPID:PMX4:00231695:03782438:6799D85C:qmstop:702:root@pam!pdm-admin:",
    user: "root@pam",
}

You can install the PDM-Cli via apt install proxmox-datacenter-manager-client on a different machine.
Be sure to add this repository to the sources list: deb http://download.proxmox.com/debian/pdm bookworm pdm-test

Example with echo:
Code:
 echo "deb http://download.proxmox.com/debian/pdm bookworm pdm-test" > /etc/apt/sources.list.d/pdm-test.list
Hi @smueller,

Thank you for the example unfortunately it doesn't work for me. Perhaps I'm missing some configuration settings in my PDM VM or cluster? Here is the error that I'm getting:
root@moxpdm:~# proxmox-datacenter-manager-client pve qemu stop PVE-Cluster 101
Error: no host specified
no host specified

Daniel
 
Hi @danjp,

try logging yourself in via CLI on PDM: proxmox-datacenter-manager-client login

After this it should work with the command above :-)
@smueller ,

Correct, it worked after that:
root@moxpdm:~# proxmox-datacenter-manager-client login --host root@pam@moxpdm
Password required for user root@pam at https://moxpdm:8443/
Password: ***************

So, two options for me:
  • If you login on the Proxmox Datacenter Manager via a browser and select the ">_ Shell" under the "Administration" menu you don't have to first login in order to run "proxmox-datacenter-manager-client" commands.
  • If you ssh as root to your VM (Debian) that run PDM you'll still have to authenticate as above to allow you run "proxmox-datacenter-manager-client" commands.
Thank you @smueller @Lukas Wagner
Daniel
 
  • Like
Reactions: smueller
If you login on the Proxmox Datacenter Manager via a browser and select the ">_ Shell" under the "Administration" menu you don't have to first login in order to run "proxmox-datacenter-manager-client" commands.
Interesting,
I have to authenticate my self even in the Web-Shell. :)