all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: "Dominic Jäger" <d.jaeger@proxmox.com>
To: Proxmox VE user list <pve-user@lists.proxmox.com>
Subject: Re: [PVE-User] qm cli
Date: Thu, 12 Nov 2020 10:24:13 +0100	[thread overview]
Message-ID: <20201112092413.GA1174479@mala.proxmox.com> (raw)
In-Reply-To: <20201112085452.nz56wdqddt4qirio@shell.tuxis.net>

On Thu, Nov 12, 2020 at 09:54:52AM +0100, Mark Schouten wrote:
> I for one would really love to use qm on a cluster base, instead of
> nodes. I currently first need to find out which node a VM runs on, then
> log on to that node, and then run the qm commands.

For qm, yes. For pvesh, no.

Instead of the initially mentioned command
> for i in {123..128}; do qm snapshot $i ready ; done

just do something like
> for i in 100 101; do pvesh create nodes/dev/qemu/$i/snapshot --snapname ready; done
where you replace dev with a node name of your choice. This API path is documented in [0].

qm snapshot is actually one of those commands that is mapped pretty directly to the API [1].

[0] https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/qemu/{vmid}/snapshot
[1] https://git.proxmox.com/?p=qemu-server.git;a=blob;f=PVE/CLI/qm.pm;h=b3b9251c0ad17598beafc8763b082c6e8ab1e95b;hb=HEAD#l931




  reply	other threads:[~2020-11-12  9:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10 15:10 Alejandro Bonilla
2020-11-10 15:49 ` Dietmar Maurer
2020-11-12  8:54   ` Mark Schouten
2020-11-12  9:24     ` Dominic Jäger [this message]
2020-11-10 17:12 ` Steffen Schwebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201112092413.GA1174479@mala.proxmox.com \
    --to=d.jaeger@proxmox.com \
    --cc=pve-user@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal