How to use Citrix App Layering with Fixed IP Addresses

How to use Citrix App Layering with Fixed IP Addresses

book

Article ID: CTX237731

calendar_today

Updated On:

Description

In App Layering, the ELM needs to be able to determine which NIC device is the "active" NIC.  The ELM must determine the active NIC in order to properly merge network instances and services from different layers, however there's no flag in the registry that identifies the NIC that will be used to stream the OS through PVS.  Since most environments use DHCP for IP address assignment in Packaging Machines, the ELM uses the DHCP "last lease time" as a proxy for which NIC is the active one: the network device with the latest DHCP lease is treated as the correct NIC.  This allows the ELM to construct a valid network configuration, including all the services and protocols, in a published image.

In environments that do not allow DHCP, and therefore all packaging machines must have fixed IP addresses manually assigned, the ELM will never be able to determine the correct network device.  Often, this isn't an issue, because Windows will fix up an invalid network at boot time.  But in environments with PVS or other especially network-sensitive systems, the initially invalid network configuration will prevent Windows from booting at all, often resulting in a BSOD referencing CVhdMp.sys:

CVhdMp.sys crash (unhandled thread exception)

The objective of this article is to provide a mechanism for the ELM to identify the active NIC by manually setting the DHCP "last lease time" key in the registry.


Instructions

To allow the ELM to identify a particular NIC as the active one:
  1. Create a new Platform Layer, or edit an existing Platform Layer.
  2. On the packaging machine, open RegEdit.
  3. Navigate to 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\'.
  4. Locate the GUID of the NIC which will stream the OS from PVS. This is usually possible by scanning the GUIDs for the one with the correct IP address.
  5. Within the NIC GUID key, create a  REG_DWORD named "LeaseObtainedTime" and initialize it with a non-zero value.  This key is the time expressed as seconds since 1/1/1970, but for App Layering, it simply has to exist and be non-zero.
Note: The Platform Layer is the recommended location for this action since it is always the highest priority layer, and this should only need to be done once for the lifetime of each Platform Layer.

Environment

Caution! Using Registry Editor incorrectly can cause serious problems that might require you to reinstall your operating system. Citrix cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk. Be sure to back up the registry before you edit it.

Issue/Introduction

Publishing a working vDisk to PVS directly from the ELM when the packaging machine is running an environment with fixed IP addresses.