From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 9D7BE6079F for ; Wed, 16 Feb 2022 13:58:48 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 9B55647DC for ; Wed, 16 Feb 2022 13:58:48 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (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 EDD5047D3 for ; Wed, 16 Feb 2022 13:58:47 +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 C6E6146CF5 for ; Wed, 16 Feb 2022 13:58:47 +0100 (CET) Date: Wed, 16 Feb 2022 13:58:41 +0100 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Fabian Ebner , pve-devel@lists.proxmox.com References: <20220209130750.902245-1-f.gruenbichler@proxmox.com> <20220209130750.902245-18-f.gruenbichler@proxmox.com> In-Reply-To: < MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1645015942.b6g5nlr4c2.astroid@nora.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.188 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: Re: [pve-devel] [PATCH v5 qemu-server 10/11] api: add remote migrate endpoint X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Feb 2022 12:58:48 -0000 On February 11, 2022 2:01 pm, Fabian Ebner wrote: > Am 09.02.22 um 14:07 schrieb Fabian Gr=C3=BCnbichler: >> @@ -4016,6 +4016,206 @@ __PACKAGE__->register_method({ >> =20 >> }}); >> =20 >> +__PACKAGE__->register_method({ >> + name =3D> 'remote_migrate_vm', >> + path =3D> '{vmid}/remote_migrate', >> + method =3D> 'POST', >> + protected =3D> 1, >> + proxyto =3D> 'node', >> + description =3D> "Migrate virtual machine to a remote cluster. Crea= tes a new migration task.", >> + permissions =3D> { >> + check =3D> ['perm', '/vms/{vmid}', [ 'VM.Migrate' ]], >> + }, >> + parameters =3D> { >> + additionalProperties =3D> 0, >> + properties =3D> { >> + node =3D> get_standard_option('pve-node'), >> + vmid =3D> get_standard_option('pve-vmid', { completion =3D> \&PVE:= :QemuServer::complete_vmid }), >> + 'target-vmid' =3D> get_standard_option('pve-vmid', { optional =3D>= 1 }), >> + 'target-endpoint' =3D> get_standard_option('proxmox-remote', { >> + description =3D> "Remote target endpoint", >> + }), >> + online =3D> { >> + type =3D> 'boolean', >> + description =3D> "Use online/live migration if VM is running. Ignored= if VM is stopped.", >> + optional =3D> 1, >> + }, >> + 'with-local-disks' =3D> { >> + type =3D> 'boolean', >> + description =3D> "Enable live storage migration for local disk", >> + optional =3D> 1, >> + }, >=20 > Shouldn't this simply always be true, rather than an optional parameter? depends on what our plans for cross-cluster shared storages are ;) but=20 yeah, can be left out for now - this is still experimental anyway (also=20 added a marker for that for the next revision), so if we re-introduce it=20 it's a fairly small breaking change anyway, or we could default to on so=20 that only those rare setups with actually shared storages opt out. >=20 >> + delete =3D> { >> + type =3D> 'boolean', >> + description =3D> "Delete the original VM and related data after succe= ssful migration. By default the original VM is kept on the source cluster i= n a stopped state.", >> + optional =3D> 1, >> + default =3D> 0, >> + }, >> + 'target-storage' =3D> get_standard_option('pve-targetstorag= e', { >> + completion =3D> \&PVE::QemuServer::complete_migration_storage, >> + optional =3D> 0, >> + }), >=20 > Style nit: indentation is wrong >=20 >> + 'target-bridge' =3D> { >> + type =3D> 'string', >> + description =3D> "Mapping from source to target bridges. Providing on= ly a single bridge ID maps all source bridges to that bridge. Providing the= special value '1' will map each source bridge to itself.", >> + format =3D> 'bridge-pair-list', >> + }, >=20 > Same two comments apply to the next patch. >=20