Skip to content

Commit 3ba044c

Browse files
committed
vcsim: support clearing ManagedBy field
Closes #3572
1 parent 47b64c6 commit 3ba044c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

simulator/virtual_machine.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,11 @@ func (vm *VirtualMachine) apply(spec *types.VirtualMachineConfigSpec) {
277277
}
278278

279279
if spec.ManagedBy != nil {
280+
if spec.ManagedBy.ExtensionKey == "" {
281+
spec.ManagedBy = nil
282+
}
280283
vm.Config.ManagedBy = spec.ManagedBy
284+
vm.Summary.Config.ManagedBy = spec.ManagedBy
281285
}
282286

283287
if spec.BootOptions != nil {

0 commit comments

Comments
 (0)