Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions plugins/modules/vmware_vmotion.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def __init__(self, module):
dest_host_name,
"', '".join([ds.name for ds in self.host_object.datastore])))

if self.vm.runtime.host.name == dest_host_name and dest_datastore in [ds.name for ds in self.vm.datastore]:
if self.vm.runtime.host.name == dest_host_name and vm_ds_name == self.datastore_object.name:
change_required = False

elif self.host_object and self.datastore_cluster_object:
Expand Down Expand Up @@ -335,7 +335,7 @@ def __init__(self, module):
self.cluster_object.datastore])))

if self.vm.runtime.host.name in [host.name for host in self.cluster_hosts] and \
dest_datastore in [ds.name for ds in self.vm.datastore]:
vm_ds_name == self.datastore_object.name:
change_required = False

elif self.cluster_object and self.datastore_cluster_object:
Expand Down Expand Up @@ -370,7 +370,7 @@ def __init__(self, module):

elif (self.datastore_object and self.host_object is None) or (
self.datastore_object and self.cluster_object is None):
if self.datastore_object in self.vm.datastore:
if vm_ds_name == self.datastore_object.name:
# VM is already located on same datastore
change_required = False

Expand Down