Jump to content
Welcome to our new Citrix community!
  • 0

How to stop ELM removing NICs when publishing image


Stephen Borrill

Question

When publishing an image, the ELM removes NICs from the registry that it considers to be ghosts. I believe this is based on the DHCP lease time on physical NICs. My platform layer has two physical NICs defined in Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}. The platform layer build image can be booted on two different platforms. When publishing the image, the last platform used gets the NIC, the other platform has its NIC removed. Therefore it only works on the last platform seen.

 

Original platform layer version was booted on machine with NIC 0000, second version boots on machine with NIC 0001. Extract from UniSysLibLog below when publishing second version

 

PNI::Enum: checking 12 subkeys of NDIS key 'Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}', package hive 'Pd0006.B0.R3.V0 (5)'
PNI::Enum: Examining '0000' Subkey
PNI::Enum: '*ifType' is 6 for NDIS adapter subkey '0000' in package hive 'Pd0006.B0.R3.V0 (5)'
PNI::Enum: '*MediaType' is 0 for NDIS adapter subkey '0000' in package hive 'Pd0006.B0.R3.V0 (5)'
PNI::Enum: '*PhysicalMediaType' is 14 for NDIS adapter subkey '0000' in package hive 'Pd0006.B0.R3.V0 (5)'
PNI::Enum: Found UpperBind value for 0000 in package hive 'Pd0006.B0.R3.V0 (5)'
PNI::Enum: 'NetLuidIndex' is 0x00008000 for NDIS adapter subkey '0000' in package hive 'Pd0006.B0.R3.V0 (5)'
PNI::Enum: NetworkSetup2 info for '{35755C41-4015-413E-9590-37C37BEC4A8B}' was found in package hive 'Pd0006.B0.R3.V0 (5)'
PNI::Enum: finding TCP/IP interfaces -> '{35755C41-4015-413E-9590-37C37BEC4A8B}' in package hive 'Pd0006.B0.R3.V0 (5)'
PNI::Enum: found TCP/IP interfaces -> '{35755C41-4015-413E-9590-37C37BEC4A8B}' in package hive 'Pd0006.B0.R3.V0 (5)'
PNI::Enum: found TCP/IP interfaces -> '{35755C41-4015-413E-9590-37C37BEC4A8B}' -> DHCPLeaseTime '1571746114' in package hive 'Pd0006.B0.R3.V0 (5)'
PNI::Enum: Newer DHCP Lease; Saving adapter '{35755C41-4015-413E-9590-37C37BEC4A8B}' in package hive 'Pd0006.B0.R3.V0 (5)' as primaryAdapter
PNI::Enum: Examining '0001' Subkey
PNI::Enum: '*ifType' is 6 for NDIS adapter subkey '0001' in package hive 'Pd0006.B0.R3.V0 (5)'
PNI::Enum: '*MediaType' is 0 for NDIS adapter subkey '0001' in package hive 'Pd0006.B0.R3.V0 (5)'
PNI::Enum: '*PhysicalMediaType' is 14 for NDIS adapter subkey '0001' in package hive 'Pd0006.B0.R3.V0 (5)'
PNI::Enum: Found UpperBind value for 0001 in package hive 'Pd0006.B0.R3.V0 (5)'
PNI::Enum: 'NetLuidIndex' is 0x00008001 for NDIS adapter subkey '0001' in package hive 'Pd0006.B0.R3.V0 (5)'
PNI::Enum: NetworkSetup2 info for '{D6BBCBC0-A17C-4325-B6A7-AEE99BB9772E}' was found in package hive 'Pd0006.B0.R3.V0 (5)'
PNI::Enum: finding TCP/IP interfaces -> '{D6BBCBC0-A17C-4325-B6A7-AEE99BB9772E}' in package hive 'Pd0006.B0.R3.V0 (5)'
PNI::Enum: found TCP/IP interfaces -> '{D6BBCBC0-A17C-4325-B6A7-AEE99BB9772E}' in package hive 'Pd0006.B0.R3.V0 (5)'
PNI::Enum: found TCP/IP interfaces -> '{D6BBCBC0-A17C-4325-B6A7-AEE99BB9772E}' -> DHCPLeaseTime '1571752646' in package hive 'Pd0006.B0.R3.V0 (5)'
PNI::Enum: Newer DHCP Lease; Saving adapter '{D6BBCBC0-A17C-4325-B6A7-AEE99BB9772E}' in package hive 'Pd0006.B0.R3.V0 (5)' as primaryAdapter
 

Note it has picked 0001 as the primary adapter.

 

It then removes 0000:

Merging network interfaces
The Platform Layer contains authoritative network interface information
Cleaning networking information out of the target registry...
CleanEnumeratedAdapters(323): Removing 3&267a616a&0&20
CleanEnumeratedAdapters(323): Removing 3&11583659&0&C8
CleanEnumeratedAdapters(323): Removing 0000
 

And skips merging what was 0000:

uildMergeTree(575): Layer Pd0006.B0.R3.V0 (5) adapter {35755C41-4015-413E-9590-37C37BEC4A8B} is new; adding to AdapterMergeInfo
Finished building network interface merge tree
Resolving network interface merge conflicts...
ResolveMergeConflicts(647): The adapter {35755C41-4015-413E-9590-37C37BEC4A8B} conflicts with a higher priority adapter, and will not be merged
 

How can I stop this behaviour?

Link to comment

3 answers to this question

Recommended Posts

  • 0

Bi I havent worked much with XenServer so the behavior might be different but in vSphere and HyperV its important to use a template created as a clone of your master image to deploy your PVS targets so that the virtual hardware config matches the one in which you are packaging.  In App layering when you finalize a layer we try to remove any ghost NICs the layer may have automatically and when publishing we are also managing the NICs.  I dont think there is any way to change that process.

 

So try the template approach its also important for getting the right time in your virtual bios and if you still have issues pout in a case so that you can get on the path to discuss your issues with engineering if support cant help you directly.

Link to comment
  • 0
2 minutes ago, Rob Zylowski1709158051 said:

Bi I havent worked much with XenServer so the behavior might be different but in vSphere and HyperV its important to use a template created as a clone of your master image to deploy your PVS targets so that the virtual hardware config matches the one in which you are packaging.  In App layering when you finalize a layer we try to remove any ghost NICs the layer may have automatically and when publishing we are also managing the NICs.  I dont think there is any way to change that process.

 

As I've put in a couple of other threads, running uniservice -G kills XenServer networking with PVS, so we alter the ShutdownForFinalize scripts to avoid this.

 

2 minutes ago, Rob Zylowski said:

So try the template approach its also important for getting the right time in your virtual bios and if you still have issues pout in a case so that you can get on the path to discuss your issues with engineering if support cant help you directly.

 

I think you are assuming we're targeting solely virtualisation here...

We also alter all PCI NICs to set ConfigFlags to 0 (to enable them) and set BootDriverFlags in SYSTEM\HardwareConfig\<ID> to 0x1d (to get PVS to work).

 

I would love to discuss this with engineering as it appears we're spending a lot of time working out what they're doing and then trying to undo it to get things working.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...