Hi,

Am 17/10/2022 um 16:40 schrieb DERUMIER, Alexandre:
>> an example invocation:
>>
>> $ qm remote-migrate 1234 4321 
> 'host=123.123.123.123,apitoken=pveapitoken=user@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=123.123.123.123,apitoken=pveapitoken=user@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`



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to