diff --git a/changelogs/fragments/2010-fix-vm-hardware-version-upgrade-error-not-being-reported.yml b/changelogs/fragments/2010-fix-vm-hardware-version-upgrade-error-not-being-reported.yml new file mode 100644 index 0000000000..44e8c38d14 --- /dev/null +++ b/changelogs/fragments/2010-fix-vm-hardware-version-upgrade-error-not-being-reported.yml @@ -0,0 +1,3 @@ +bugfixes: + - vmware_guest - Fix errors occuring during hardware version upgrade not being reported. + (https://github.com/ansible-collections/community.vmware/pull/2010). diff --git a/plugins/modules/vmware_guest.py b/plugins/modules/vmware_guest.py index 90328450c3..f6f3395137 100644 --- a/plugins/modules/vmware_guest.py +++ b/plugins/modules/vmware_guest.py @@ -3185,7 +3185,9 @@ def reconfigure_vm(self): self.relospec.deviceChange = [] self.configure_guestid(vm_obj=self.current_vm_obj) self.configure_cpu_and_memory(vm_obj=self.current_vm_obj) - self.configure_hardware_params(vm_obj=self.current_vm_obj) + err = self.configure_hardware_params(vm_obj=self.current_vm_obj) + if err is not None: + return err self.configure_encryption_params(vm_obj=self.current_vm_obj) self.configure_disks(vm_obj=self.current_vm_obj) self.configure_network(vm_obj=self.current_vm_obj)