Hi All,
I am looking for an option to see if I can disable the network interface during the 1st boot sequence of vm customization (Windows).
I plan to use a customization specification to change hostname, IPs etc. during a VM cloning task and when I chose a customization spec to run the network interface getting connected even it is disconnected after the cloning is completed. The issue with this is for a short time until the new IP is assigned the VM has the IP of the source VM and leads to an IP duplication.
So far, I have tried to use the RunOnce commands to disable the network interface but seems like it also runs at a later stage, so the interface is still pingable during the 1st boot sequence.
The only option which works is assigning the interface to a dummy network so that it won't be able to communicate with the rest of the network before the power up.
I would like to know if there are any other way this can be achieved. Thank you.
So you want vm should be not on network during the boot (disable the network interface during the 1st boot sequence )
can you elaborate more
I this is the case take a fresh vm then reboot go to BIOS and remove network card from there then make the template of this vm
once template created deploy new vm by using this template
Thanks for the reply, Rajeev. Let me explain the use case further.
I am cloning new VMs from an existing source VM as requested by application teams. When this happens source VM is also running parallel to new VMs.
Currently once new VMs are provisioned, I manually change the hostname and IP details. For this I disconnect the network adapters from vCenter first before VM power on and change IPs and hostname and then connect network interfaces again.
I want to automate this process of changing the hostname and IP. Since this can be done through customization specification, I tested it on a cloned VM but found that once a customization specification is attached to a VM, it connects the network interfaces even though it is disconnected during the power on.
The issue with that is, since the source VM is also running parallel to the new VM, for a brief amount of time both VMs have the same IP address/hostname. This could lead to a network outage.
So, I am looking for any other way to automate this process. So far, the workaround is to connect new VM to a dummy network during the first boot and then run the customization spec to change IPs.
Hope this explains the use case. If you need any additional information, please let me know.
