diff --git a/changelogs/fragments/1848-fix-vm-reconfiguration-with-enabled-vbs.yml b/changelogs/fragments/1848-fix-vm-reconfiguration-with-enabled-vbs.yml new file mode 100644 index 0000000000..ae9f7e8ce0 --- /dev/null +++ b/changelogs/fragments/1848-fix-vm-reconfiguration-with-enabled-vbs.yml @@ -0,0 +1,3 @@ +minor_changes: + - vmware_guest - Fix failure of vm reconfiguration with enabled virt_based_security + (https://github.com/ansible-collections/community.vmware/pull/1848). diff --git a/plugins/modules/vmware_guest.py b/plugins/modules/vmware_guest.py index 213cc1cc4a..9b9b034d80 100644 --- a/plugins/modules/vmware_guest.py +++ b/plugins/modules/vmware_guest.py @@ -1719,7 +1719,7 @@ def configure_hardware_params(self, vm_obj): virt_based_security = self.params['hardware']['virt_based_security'] if virt_based_security is not None: - if vm_obj is None or virt_based_security != self.configspec.flags.vbsEnabled: + if vm_obj is None or virt_based_security != vm_obj.config.flags.vbsEnabled: self.change_detected = True if self.configspec.flags is None: self.configspec.flags = vim.vm.FlagInfo()