vim_vm_migrate

VM migration via SOAP.

Two operations are exposed:

  • MigrateVM_Task — change the compute target (host/cluster/resource pool). This is the classic vMotion path.

  • RelocateVM_Task — change anything (host, datastore, folder, resource pool, disk format). This is the unified path that subsumes both vMotion and Storage vMotion, and is the one Terraform / Ansible typically use.

Both return the task moid; the caller polls vCenter for completion.

saltext.vcf.clients.vim_vm_migrate.migrate(opts, vm_id_or_name, *, host=None, resource_pool=None, priority='default', state=None, profile=None)[source]

vMotion vm to a new host/pool. Returns the task moid.

Either host or resource_pool (or both) must be specified.

saltext.vcf.clients.vim_vm_migrate.relocate(opts, vm_id_or_name, *, host=None, resource_pool=None, datastore=None, folder=None, disk_format=None, priority='default', profile=None)[source]

Unified relocate. Returns the task moid.

disk_formatthin | thick | eagerZeroedThick (passed verbatim to RelocateSpec.diskMoveType style enums); leave None to inherit.