Hi,
actually i am working for a project, which needs to migrate VMs between Hostsystem.
Of course we got clusters, as well DRS Groups, so i found the action "migrate_VM", which is usable for DRS Cluster, so good for the project.
I filled out these action, but the VM is not moving to another hostsystem.
vm.migrateVM_Task(null , null , VirtualMachineMovePriority.highPriority , VirtualMachinePowerState.poweredOn);
Input is a VC:VM Object, maybe some has got an answer or a workaround for this problem ...
A couple of questions:
i built a second workflow and the host object was static, that worked, but my problem is now, how i can handle it with the drs rules ...
Because i changed it to null and now the vm is not moving ...
I found a solution, but now i need the Task checkMigrate_Task.
vm.sdkConnection.checkMigrate_Task(null, null , null , null , null);
How can i get this action for executing.
It could be vm.sdkConnection.vmProvisioningChecker.checkMigrate_Task(.....);
But it won't help. According to documentation https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcVirtualMachineProvisioningC..., checkMigrate_Task() only checks if the migration operation is feasible, not perform actual migration,
yes, in the static way the migration worked, in the actual situation with null, not.
But i can list my host in the cluster and check if migration will possible or not. I hope i'll get a feedback from this task, like "yes migration would be succesful" or "no migration won't".
So i could use the static way.
Ok, the dream way doesn't work, because its a task and no result ...
He didn't check the DRS Group, i put the VM into a DRS Group with only one host, but the task would run on every host perfect, said my workflow.
But i changed it to the migrate task and this output came, that's correct. ,
'MigrateVM_Task' error: Virtual machine 'vm' on host 'hostsystem' would violate a virtual machine - host affinity rule.
Has someone worked with the VcClusterDRS ?