You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Need help with understanding if it is possible to have 2 Vms in esxi to be exact clones with the same IP address and Mac addr.
I used InstantClone() to create a clone and then tried to edit the clones VirtualEthernetCard.
Though once the method below is run, Vsphere UI shows no change to the clones MacAddr field and or the AddrType field though I set it to 'manual'. It still seems persistent with having it be automatic. Is there anything else that needs to be done, or is it even possible to have exact clones with same hardware configurations?
Reproduction steps
...
Expected behavior
`
def edit_resources(self,si,vm_name=str):
content=si.RetrieveContent()
vm_obj=self.get_obj(content,[vim.VirtualMachine],vm_name)
virtual_nic_spec = vim.vm.device.VirtualDeviceSpec()
for dev in vm_obj.config.hardware.device:
if isinstance(dev, vim.vm.device.VirtualEthernetCard):
dev.macAddress="00:0c:29:aa:16:2f"
virtual_nic_spec.device = dev
virtual_nic_spec.device.key = dev.key
virtual_nic_spec.device.macAddress = dev.macAddress
virtual_nic_spec.device.addressType = vim.vm.device.VirtualEthernetCardOption.MacTypes.manual
virtual_nic_spec.device.backing = dev.backing
virtual_nic_spec.device.wakeOnLanEnabled = dev.wakeOnLanEnabled
print(virtual_nic_spec)
dev_changes = []
dev_changes.append(virtual_nic_spec)
reconfig_spec = vim.vm.ConfigSpec()
reconfig_spec.deviceChange = dev_changes
#update the task manager (i.e. Make the update)
task = vm_obj.ReconfigVM_Task(spec=reconfig_spec)
tasks.wait_for_tasks(si, [task])
`
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
Need help with understanding if it is possible to have 2 Vms in esxi to be exact clones with the same IP address and Mac addr.
I used InstantClone() to create a clone and then tried to edit the clones VirtualEthernetCard.
Though once the method below is run, Vsphere UI shows no change to the clones MacAddr field and or the AddrType field though I set it to 'manual'. It still seems persistent with having it be automatic. Is there anything else that needs to be done, or is it even possible to have exact clones with same hardware configurations?
Reproduction steps
...
Expected behavior
`
def edit_resources(self,si,vm_name=str):
`
Additional context
No response
The text was updated successfully, but these errors were encountered: