VMware Cloud Community
ejward
Expert
Expert

NIC disconnected after deploying from template.

When I deploy a Windows 7 VM from a template with a customization specification, it is built with the NIC disconnected.

If I select "Don't customize", it's fine.

If I use the same customization specification with another Windows 7 template, it works fine.

The template is set to "connect at power on"

VMware tools is up to date

We're not using distributed switches

We have plenty of ports available on the virtual switch

This is a template and a customization specification I have used in the past ..... it has just stopped working.

I'm stumped !!!

0 Kudos
14 Replies
ejward
Expert
Expert

I know I haven't posted anything in quite a while but, what happened to the user forums?  Years ago, if you posted a question, you'd get a reply from someone within hours.  No matter how mundane the question was.  Has everyone moved on to other communities?  Did VMware stop giving out "VMTN Board Warrior" Polo shirts?  LOL

0 Kudos
Oli_L
Enthusiast
Enthusiast

I've seen this solution posted on the forums before, may help you:

"....When you deploy a template with customization the NIC will be disconnected by default, this is not a problem, this is just as it should be!

At first boot, the Vmware-tools will prepare the machine with the sysprep files (at this point the VM is disconnected from the network) and when it's done it will reboot the VM and connect the NIC. Boot it up and init the sysprep thingy.

So just leave the VM alone after the deployment and the first bootup, this will take a few minutes and it will reboot automatically etc. and everyone should now be fully working, the VM has joined the domain and everything should have been fixed by the specs in the customization profile...."

ejward
Expert
Expert

thank you for the reply but unfortunately, I have left one deployment sitting for over a week now and it is still disconnected.


0 Kudos
Oli_L
Enthusiast
Enthusiast

Couple of questions:

1 - are you changing the NIC type on the virtual machine, say from e1000 to vmxnet3?

2 - what is the nic in network settings called? Check that the pre-existing nic is not recognised hidden as a device

3 - does the customization actually finish?

I'll add one more.

4 - Have you by any chance changed the hardware version since this last worked?

Oli

0 Kudos
ejward
Expert
Expert

No, I'm not changing the NIC.  It's VMXNET3.

I looked for hidden devices or unused numbered NICs in Windows and don't see any.

The customization seems to finish.


0 Kudos
Oli_L
Enthusiast
Enthusiast

Weird. One of your machines work and the other one doesn't. This says to me that the customisation script is correct as it runs successfully on one of your VMs. I would check the customisation logs on the VM that fails and match that with the one that works, just to confirm that the sysprep process has completed successfully, or even started. Also check the vm(x) settings of both machines to make sure that everything is configured the same. Also see if the one that works successfully comes up with it's vNIC initially disconnected and how the process works in your environment.

My hunch is that the sysprep process on the template that has the disconnected vNIC isn't working correctly and the vNIC isn't being connected once the sysprep process finishes. This could be for a number of reasons; initial preparations of the VM, hardware version compatibility, hence check the logs - you've also said that it works fine when you don't customise the VM and the customisation process works on another template. So I would start with the sysprep process.

The fact you have one VM working should really help you. I can't really find anything that suggests you've hit a bug - I've checked our internal systems and there is nothing that suggests a bug here.

Good luck !

Oil

0 Kudos
ejward
Expert
Expert

Well, I opened up a ticket with VMware.  We tried the whole Sysprep thing and it still didn't fix it. They're stumped too.  I'm sending them the VMs to test with.

0 Kudos
Oli_L
Enthusiast
Enthusiast

You're in good hands.. BTW - spot on about the forum activity too Smiley Happy

0 Kudos
np123
Enthusiast
Enthusiast

I'm facing a similar situation. Have you found out anything else? How'd the support case go?

0 Kudos
ejward
Expert
Expert

No, never found a solution. Vmware got nowhere with the support case.  I had given them our template and our config spec.  They took so long to look at it I just created a new template and it worked. 

0 Kudos
np123
Enthusiast
Enthusiast

Yikes, thanks anyway. A manual remove-and-reinstall of VMware tools seems to have fixed my problem, fwiw.

0 Kudos
JPM300
Commander
Commander

Most of the time I have seen this happen becuase the system hasn't finished customizing like another user mentioned.  The best way to know if a VM is done customizing is looking at the Tasks/Events pane on the VM.  Click on the Events tab and look for a message stating "Starting Customization" and another message stating "Customization Succeded" If you don't see the succeded message just leave the VM alone.  I have noticed the customization wizard gets upset if you mess around with the VM while its trying to do its thing.

Another time I have seen this happen is with orchestrator.  The problem with Orchestrator is the default built in Workflow doesn't allow your to attach a nic with anything other then a Flex adapter.  This can be fixed with a little javascript alteration to the built in Workflow.  It seems Orchestrator keeps a standard of two attributes being passed into a workflow / being worked on and doesn't natively go over this, if they do they typically change it to an action.  None the less if you look into the base code of the built in work flow you can see they have set varabiles for all the other nic types but just defaulted it to Flex.  This can be adjusted easily and send you on your way.  Just a heads up if you expect to mess around with Orchestrator.


Hope this helps

0 Kudos
np123
Enthusiast
Enthusiast

Interesting... in my case, the sysprep failure was logged like so in the vm events: "An error occurred while customizing VM ProvisionTester. For details reference the log file <No Log> in the guest OS".

0 Kudos
JPM300
Commander
Commander

Hmm yeah if I don't see that customization succeeded I redeploy the tempalate or fix the template prior to moving forward as I don't want any duplicated SID's ect.   When the customization wizard fails its sometimes hard to find out where exactly in its process its failed.  You can check on the local os that has been deployed(If you can get at the event log, sometimes it leaves it in an endless booting loop, to see if gives you any direction as to where it failed)  If not this may help>:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100602...

Also in one of the enviroments I was managing a VM customization would take 15-20min or so after seeing the "Starting Customization" message in the event, we would just have to leave the VM sitting there powered on until we saw the succeeded message.  so it can sometimes take a lil while, we also found we where adjusting the VM while it was doing it's process it would sit at the customization step forever and never really proceed.  So it was best to do any tweaks after it was done doing its customization.


Hope this helps

0 Kudos