Skip to content

Commit

Permalink
vcsim: support clearing ManagedBy field
Browse files Browse the repository at this point in the history
Closes #3572
  • Loading branch information
dougm committed Oct 5, 2024
1 parent 47b64c6 commit 3ba044c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions simulator/virtual_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,11 @@ func (vm *VirtualMachine) apply(spec *types.VirtualMachineConfigSpec) {
}

if spec.ManagedBy != nil {
if spec.ManagedBy.ExtensionKey == "" {
spec.ManagedBy = nil
}
vm.Config.ManagedBy = spec.ManagedBy
vm.Summary.Config.ManagedBy = spec.ManagedBy
}

if spec.BootOptions != nil {
Expand Down

0 comments on commit 3ba044c

Please sign in to comment.