Skip to content

Commit

Permalink
stable-3.x: Fix failure of vm reconfiguration with enabled virt_based…
Browse files Browse the repository at this point in the history
…_security (#1980)

stable-3.x: Fix failure of vm reconfiguration with enabled virt_based_security

SUMMARY
VM reconfiguration is currently broken when virt_based_security is configured due to checking for vbsEnabled on the wrong object.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
vmware_guest
ADDITIONAL INFORMATION
Backport #1848
  • Loading branch information
mariolenz authored Jan 24, 2024
1 parent 5f59a93 commit fa0ba9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bugfixes:
- vmware_guest - Fix failure of vm reconfiguration with enabled virt_based_security
(https://github.com/ansible-collections/community.vmware/pull/1848).
2 changes: 1 addition & 1 deletion plugins/modules/vmware_guest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit fa0ba9b

Please sign in to comment.