[pve-devel] [PATCH v6 qemu-server 6/6] qm: add remote-migrate command

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Oct 18 08:39:18 CEST 2022


Am 17/10/2022 um 16:40 schrieb DERUMIER, Alexandre:
>> an example invocation:
>> $ qm remote-migrate 1234 4321 
> 'host=,apitoken=pveapitoken=user at pve!incoming=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee,fingerprint=aa:bb:cc:dd:ee:ff:aa:bb:cc:dd:ee:ff:aa:bb:cc:dd:ee:ff:aa:bb:cc:dd:ee:ff:aa:bb:cc:dd:ee:ff:aa:bb' 
> --target-bridge vmbr0 --target-storage zfs-a:rbd-b,nfs-c:dir-d,zfs-e 
> --online
> Maybe it could be better (optionnaly) to store the long
> "'host=,apitoken=pveapitoken=user at pve!incoming=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee,fingerprint=aa:bb:cc:dd:ee:ff:aa:bb:cc:dd:ee:ff:aa:bb:cc:dd:ee:ff:aa:bb:cc:dd:ee:ff:aa:bb:cc:dd:ee:ff:aa:bb' 
> "
> in a config file in /etc/pve/priv/<targethost>.conf ?
> Like this, this should avoid to have the api token in the bash history.
> maybe something like:
> qm remote-migration 1234 4321 <targethost> ....
> ?

We plan to have such functionality in the datacenter manager, as that should provide
a better way to manage such remotes and interfacing, in PVE it'd be bolted on and
would require the need to manage this on every host/cluster separately.
IOW. this is rather the lower level interface.

It may still make sense to allow passing a remote via more private channels, like the
environment or `stdin`, wouldn't be hard to do, just mark the target-endpoint as optional
and fallback to $ENV{'..'} and maybe a json string from STDIN - which an admin that wants
to use this lower level part directly can then even use with a file config served via
bash input redicrection `qm remote-migration 1234 4321  </etc/pve/priv/target-host.json`

More information about the pve-devel mailing list