From a09fd80bba6fadbdbe0a9cd767ef7cdcbc94de83 Mon Sep 17 00:00:00 2001 From: tchernomax Date: Thu, 14 Dec 2017 14:11:09 +0100 Subject: [PATCH] VMware: fix vmPathName on VM creation (#33315) * VMware: fix vmPathName on VM creation * vmware_guest: enable unit tests disk_type_d1_c1_f0 --- lib/ansible/modules/cloud/vmware/vmware_guest.py | 2 +- test/integration/targets/vmware_guest/tasks/main.yml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/vmware/vmware_guest.py b/lib/ansible/modules/cloud/vmware/vmware_guest.py index 2ea31a11794..9de5051d366 100644 --- a/lib/ansible/modules/cloud/vmware/vmware_guest.py +++ b/lib/ansible/modules/cloud/vmware/vmware_guest.py @@ -1459,7 +1459,7 @@ class PyVmomiHelper(PyVmomi): self.configspec.files = vim.vm.FileInfo(logDirectory=None, snapshotDirectory=None, suspendDirectory=None, - vmPathName="[" + datastore_name + "] " + self.params["name"]) + vmPathName="[" + datastore_name + "]") clone_method = 'CreateVM_Task' resource_pool = self.get_resource_pool() diff --git a/test/integration/targets/vmware_guest/tasks/main.yml b/test/integration/targets/vmware_guest/tasks/main.yml index 5f3811a9a79..1d561bd0974 100644 --- a/test/integration/targets/vmware_guest/tasks/main.yml +++ b/test/integration/targets/vmware_guest/tasks/main.yml @@ -21,3 +21,5 @@ - include: create_rp_d1_c1_f0.yml - include: create_guest_invalid_d1_c1_f0.yml - include: mac_address_d1_c1_f0.yml +- include: disk_type_d1_c1_f0.yml +#- include: template_d1_c1_f0.yml