Skip to content

Commit

Permalink
Merge pull request #1362 from zeot/resolve-issue-setting-mac-address-…
Browse files Browse the repository at this point in the history
…on-clone

vcsim: resolve issue making device changes on clone (resolves #1355)
  • Loading branch information
dougm authored Jan 26, 2019
2 parents 0ee42d3 + 3214818 commit ca5aeba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions simulator/virtual_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -1476,6 +1476,9 @@ func (vm *VirtualMachine) CloneVMTask(ctx *Context, req *types.CloneVM_Task) soa
ref := ctask.Info.Result.(types.ManagedObjectReference)
clone := Map.Get(ref).(*VirtualMachine)
clone.configureDevices(&types.VirtualMachineConfigSpec{DeviceChange: req.Spec.Location.DeviceChange})
if req.Spec.Config != nil && req.Spec.Config.DeviceChange != nil {
clone.configureDevices(&types.VirtualMachineConfigSpec{DeviceChange: req.Spec.Config.DeviceChange})
}

ctx.postEvent(&types.VmClonedEvent{
VmCloneEvent: types.VmCloneEvent{VmEvent: clone.event()},
Expand Down

0 comments on commit ca5aeba

Please sign in to comment.