From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <d.jaeger@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id 021FC690A4
 for <pve-user@lists.proxmox.com>; Thu, 12 Nov 2020 10:24:15 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id F2FA9C7A3
 for <pve-user@lists.proxmox.com>; Thu, 12 Nov 2020 10:24:14 +0100 (CET)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [212.186.127.180])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS id 50DA7C78F
 for <pve-user@lists.proxmox.com>; Thu, 12 Nov 2020 10:24:14 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 0D72C41FB1;
 Thu, 12 Nov 2020 10:24:14 +0100 (CET)
Date: Thu, 12 Nov 2020 10:24:13 +0100
From: Dominic =?iso-8859-1?Q?J=E4ger?= <d.jaeger@proxmox.com>
To: Proxmox VE user list <pve-user@lists.proxmox.com>
Message-ID: <20201112092413.GA1174479@mala.proxmox.com>
References: <D19B2215-12E6-4544-9DFB-A2DD8F00C15D@suse.com>
 <1573062207.1043.1605023362305@webmail.proxmox.com>
 <20201112085452.nz56wdqddt4qirio@shell.tuxis.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20201112085452.nz56wdqddt4qirio@shell.tuxis.net>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-SPAM-LEVEL: Spam detection results:  0
 AWL 1.718 Adjusted score from AWL reputation of From: address
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 RCVD_IN_DNSWL_MED        -2.3 Sender listed at https://www.dnswl.org/,
 medium trust
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [proxmox.com]
Subject: Re: [PVE-User] qm cli
X-BeenThere: pve-user@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE user list <pve-user.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-user>, 
 <mailto:pve-user-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-user/>
List-Post: <mailto:pve-user@lists.proxmox.com>
List-Help: <mailto:pve-user-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-user>, 
 <mailto:pve-user-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Thu, 12 Nov 2020 09:24:15 -0000

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