VMware Cloud Community
myxal
Contributor
Contributor
Jump to solution

Supported Instant Clone guest OS? (Net-Adapter issues)

TL;DR: Should Instant cloning work with Win Server 2016 (v14393)?

This is my first time trying to get Instant Clones to work, and it isn't going well.

As I understand the tech, and from reading this article, from the guestOS' point of view, the network adapter changes the MAC address, and OS needs to made aware of this change, to reflect this in DHCP requests, NDP/ARP responses, etc. This is not happening in my case. In VSphere GUI, the clone's net-adapter is shown as having new MAC, but in guestOS the old MAC is still used. Probably because of this, DHCP requests fail.

Am I missing something here? This is my procedure (vm is the originating VM):

  • On vm, release DHCP lease and disconnect the net-adapter
  • Freeze vm
  • Perform instant clone
  • On clone, connect net-adapter
  • After the DHCP request is done, clone should have new IP address, while still being reachable over its original hostname (this is desired).

I'm utilising a modified version of new-instantclone.psm1 - I dropped the requirement for config.

Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
myxal
Contributor
Contributor
Jump to solution

Thanks for the suggestion, but it doesn't seem like that is the issue we're having. (Just relaying info, I don't admin the environment)

I opted for the workaround, taking into account a few other discoveries.

  • The net-adapter in the clone may end up unconfigured (networkname/portgroup not set, disconnected) if the original VM's net-adapter was disconnected.
  • Set-NetworkAdapter will fail if it receives values for both PortGroup and Connected parameters. Must use 2 calls.
  • Powershell executed via vm-tools shell command doesn't seem to have the non-interactive flag set, so things like Disable-NetAdapter must be told not to ask for confirmations.

In the end, this is my post-instant-clone handling procedure:

  • In PowerCLI, set PortGroup first, then Connected and StartConnected
  • On the guest, run though vm_shell or similar: Get-NetAdapter -outvariable na | Disable-NetAdapter -Confirm:$false ; sleep 5 ; $na | Enable-NetAdapter

View solution in original post

Reply
0 Kudos
4 Replies
LucD
Leadership
Leadership
Jump to solution

Is the VM's vNIC connected to a portgroup on a VSS or VDS?
What is the 'MAC Address changes' set to on the switch/portgroup?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
myxal
Contributor
Contributor
Jump to solution

The portgroup is on a VDS, and MAC changes are allowed.

I'm experimenting with this further, and disabling/enabling the net-adapter within guest OS seems to get the new MAC through. Is this expected behaviour?

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Not really, duplicate MACs should be discovered by the vCenter, and corrected, provided the MAC Address is set to Automatic.
But it might take some time before it actually happens.

There is also KB1024025 which documents some actions you could take.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
myxal
Contributor
Contributor
Jump to solution

Thanks for the suggestion, but it doesn't seem like that is the issue we're having. (Just relaying info, I don't admin the environment)

I opted for the workaround, taking into account a few other discoveries.

  • The net-adapter in the clone may end up unconfigured (networkname/portgroup not set, disconnected) if the original VM's net-adapter was disconnected.
  • Set-NetworkAdapter will fail if it receives values for both PortGroup and Connected parameters. Must use 2 calls.
  • Powershell executed via vm-tools shell command doesn't seem to have the non-interactive flag set, so things like Disable-NetAdapter must be told not to ask for confirmations.

In the end, this is my post-instant-clone handling procedure:

  • In PowerCLI, set PortGroup first, then Connected and StartConnected
  • On the guest, run though vm_shell or similar: Get-NetAdapter -outvariable na | Disable-NetAdapter -Confirm:$false ; sleep 5 ; $na | Enable-NetAdapter
Reply
0 Kudos