Am 09.02.22 um 14:07 schrieb Fabian Grünbichler:
> @@ -4016,6 +4016,206 @@ __PACKAGE__->register_method({
>  
>      }});
>  
> +__PACKAGE__->register_method({
> +    name => 'remote_migrate_vm',
> +    path => '{vmid}/remote_migrate',
> +    method => 'POST',
> +    protected => 1,
> +    proxyto => 'node',
> +    description => "Migrate virtual machine to a remote cluster. Creates a 
> new migration task.",
> +    permissions => {
> +     check => ['perm', '/vms/{vmid}', [ 'VM.Migrate' ]],
> +    },
> +    parameters => {
> +     additionalProperties => 0,
> +     properties => {
> +         node => get_standard_option('pve-node'),
> +         vmid => get_standard_option('pve-vmid', { completion => 
> \&PVE::QemuServer::complete_vmid }),
> +         'target-vmid' => get_standard_option('pve-vmid', { optional => 1 }),
> +         'target-endpoint' => get_standard_option('proxmox-remote', {
> +             description => "Remote target endpoint",
> +         }),
> +         online => {
> +             type => 'boolean',
> +             description => "Use online/live migration if VM is running. 
> Ignored if VM is stopped.",
> +             optional => 1,
> +         },
> +         'with-local-disks' => {
> +             type => 'boolean',
> +             description => "Enable live storage migration for local disk",
> +             optional => 1,
> +         },

Shouldn't this simply always be true, rather than an optional parameter?

> +         delete => {
> +             type => 'boolean',
> +             description => "Delete the original VM and related data after 
> successful migration. By default the original VM is kept on the source 
> cluster in a stopped state.",
> +             optional => 1,
> +             default => 0,
> +         },
> +            'target-storage' => get_standard_option('pve-targetstorage', {
> +             completion => \&PVE::QemuServer::complete_migration_storage,
> +             optional => 0,
> +            }),

Style nit: indentation is wrong

> +         'target-bridge' => {
> +             type => 'string',
> +             description => "Mapping from source to target bridges. 
> Providing only a single bridge ID maps all source bridges to that bridge. 
> Providing the special value '1' will map each source bridge to itself.",
> +             format => 'bridge-pair-list',
> +         },

Same two comments apply to the next patch.


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

Reply via email to