Hi,
I am attempting to create a link clone of a virtual machine but have the Cloned Virtual Machine keep the old Virtual Machine's MAC address of all NICs (Both machines will not work at the same time, ever).
I have tried saving the nic MAC addresses before creating the clone and then using Reconfig_task in order to change the the Cloned machine's Mac address to match the old ones - but that did not seem to work (Even though VSphere shows that a reconfiguration is in progress).
VirtualMachineConfigSpec machineSpec = new VirtualMachineConfigSpec();
VirtualDeviceConfigSpec nicSpec = new VirtualDeviceConfigSpec();
nicSpec.operation = VirtualDeviceConfigSpecOperation.edit;
nicSpec.device = currDevice;
((VirtualE1000)nicSpec.device).addressType = "manual";
((VirtualE1000)nicSpec.device).macAddress ="00:50:56:bb:72:bd"; (just put some mac valid address here - that doesnt work either).
((VirtualE1000)nicSpec.device).wakeOnLanEnabled = true ;
_webSvcApiUtil.Connection.Service.ReconfigVM_Task(clonedMachine, machineSpec);
(ignore the syntax - i just copy pasted the relevant parts).
The above code did not change the new machine's mac address at all.
As i stated above - the machine's MAC did not even change if i put any valid mac address .
Any idea what might be wrong??? and if not - is there any way to show a log of what was reconfigured?? ( to see the invalid parameters that caused the VCenter to ignore my request)
Thanks in advance!