Highlighted
Contributor
Contributor

Fault.NicSettingMismatch.Summary while Customizing VM

Hi,

i'm getting this error ( Fault.NicSettingMismatch.Summary ) while customizing a VM. It's a VM and not a template.

I'm doing this in C# and can't find an answer to this problem. Hope someone can help.

Best regards,

Z1gZa

0 Kudos
7 Replies
Highlighted
Virtuoso
Virtuoso

Perhaps this is the reason.

http://www.vmware.com/support/developer/vc-sdk/visdk25pubs/ReferenceGuide/vim.fault.NicSettingMismat...

Fault Description

The number of network adapter settings in the customization specification does not match the number of network adapters present in the virtual machine.

VCDX #104 (DCV, NV) ஃ WahlNetwork.com ஃ @ChrisWahl ஃ Author, Networking for VMware Administrators
Highlighted
User Moderator
User Moderator

Hi Z1gZa,

Have a look at the following thread if you can find a clue:

Good luck.

Regards

Franck

Highlighted
Contributor
Contributor

I've thought about that too. When I'm trying to do the following line of code it gives me another error.


cs.NicSettingMap = new CustomizationAdapterMapping[1];

"object reference not set to an instance of an object"

How can I create an array of type NicSettingMap with no range set? :smileyconfused:

My code:

CustomizationSpec cs = new CustomizationSpec();
            CustomizationSysprep sysPrep = new CustomizationSysprep();
            CustomizationFixedName fixedName = new CustomizationFixedName();


            cs.Identity = sysPrep;
            cs.GlobalIPSettings = new CustomizationGlobalIPSettings();
           
            cs.NicSettingMap = new CustomizationAdapterMapping[1];

            fixedName.Name = "xxxxxxx";
            sysPrep.UserData = new CustomizationUserData();
            sysPrep.UserData.FullName = "xxxx";
            sysPrep.UserData.OrgName = "xxxx";
            sysPrep.UserData.ComputerName = fixedName;
            sysPrep.UserData.ProductId = "xxxx-xxxx-xxxx-xxxx-xxxx";
            sysPrep.LicenseFilePrintData = new CustomizationLicenseFilePrintData();
            sysPrep.LicenseFilePrintData.AutoMode = CustomizationLicenseDataMode.perSeat;
            sysPrep.GuiUnattended = new CustomizationGuiUnattended();
            sysPrep.GuiUnattended.Password = new CustomizationPassword();
            sysPrep.GuiUnattended.Password.PlainText = true;
            sysPrep.GuiUnattended.Password.Value = "xxxxxxxx";
            sysPrep.GuiUnattended.TimeZone = xxx;
            sysPrep.Identification = new CustomizationIdentification();
            sysPrep.Identification.DomainAdmin = "xxxxxxxxx";
            sysPrep.Identification.DomainAdminPassword = new CustomizationPassword();
            sysPrep.Identification.DomainAdminPassword.Value = "xxxxxxxxx";
            sysPrep.Identification.JoinDomain = "xxxxxxxx";

            VM.CustomizeVM_Task(cs);

Edit: I have found a way and now I'm getting another error witch I think, it's missing IP configs.

For those who encounter this problem here is what I have done:

cs.NicSettingMap = new CustomizationAdapterMapping[] { new CustomizationAdapterMapping() };

Thank's for all your help!

0 Kudos
Highlighted
Virtuoso
Virtuoso

Curious - would the array value not be a 0 (for the first NIC) instead of 1?

cs.NicSettingMap = new CustomizationAdapterMapping[0];
VCDX #104 (DCV, NV) ஃ WahlNetwork.com ஃ @ChrisWahl ஃ Author, Networking for VMware Administrators
0 Kudos
Highlighted
Contributor
Contributor

I don't think that could cause problem since it would give me an error when creating the array and not when adding other objects.

Anyway, I solved it :smileysilly:

0 Kudos
Highlighted
Virtuoso
Virtuoso

Ah, didn't see the edit. Glad it's resolved.

VCDX #104 (DCV, NV) ஃ WahlNetwork.com ஃ @ChrisWahl ஃ Author, Networking for VMware Administrators
0 Kudos
Highlighted
Contributor
Contributor

I'm new with VMWARE and please help me. How can u solve this ? Thank u very much

0 Kudos