A device, such as desktop computer or server, that boots and gets software from a vDisk on the network, is considered a target device. A device that is used to create the vDisk image is a considered a Master Target device.
The lifecycle of a target device includes:
- A Master target device used for creating a vDisk image
- A target device that will boot from a vDisk image
- Adding target devices to a collection in the farm
- From the Console
- Using Auto-Add
- Assigning the target device type
- Maintaining target devices in the farm
After a target device is created, the device must be configured to boot from the network, the device itself must be configured to allow it to boot from the network, a vDisk must be assigned to the device, and a bootstrap file must be configured to provide the information necessary for that device to boot from the assigned vDisk.
There are several types of target devices within a farm. For example, while a device is being used to create a vDisk image, it is considered a Master target device. All other devices are configured as a particular device type. The device Type determines a devices current purpose, and determines if that device can access a particular vDisk version that is in Production, Test, or Maintenance.
The device Type is selected on the General tab of the Target Device Properties dialog, which includes the following options:
- Production: Select this option to allow this target device to stream an assigned vDisk that is currently in production (default).
- Maintenance: Select this option to use this target device as a Maintenance device. Only a Maintenance device can access and make changes to a vDisk version that is Maintenance mode (only the first Maintenance device to boot the version while in Maintenance mode, is allowed to access that version).
- Test: Select this option to use this target device to access and test differencing disk versions that are currently in Test mode.
A target device becomes a member of a device collection when it is added to the farm. The use of device collections simplifies the management of all target devices within that collection. A target device can only be a member in one device collection. However, a target device can exist in any number of views. If a target device is removed from the device collection, it is automatically removed from any associated views.
When target devices are added to a collection, that devices properties are stored in the Provisioning Services database. Target Device properties include information such as the device name and description, boot method, and vDisk assignments (refer to Target Device properties for details).
Target Devices are managed and monitored using the Console and Virtual Disk Status Tray utilities.
In the Console, actions can be performed on:
- An individual target device
- All target devices within a collection
- All target devices within a view
Target device properties
A reboot is required if a target device is active when modifications are made to any of the following device properties: Boot from, MAC, Port, vDisks for this device.
The following tables define the properties associated with a target device.
|Name||The name of the target device or the name of the person who uses the target device. The name can be up to 15 bytes in length. However, the target device name cannot be the same as the machine name being imaged. Note: If the target device is a domain member, use the same name as in the Windows domain, unless that name is the same as the machine name being imaged. When the target device boots from the vDisk, the name entered here becomes the target device machine name.|
|Description||Provides a description to associate with this target device.|
|Type||Select the access type for this target device from the drop-down list, which includes the following options: Maintenance - Select this option to use this target device as a Maintenance device which will to apply updates to a new maintenance version of a vDisk. A Maintenance device has exclusive read-write access to a maintenance version; Test - Select this option to use this target device to access versions that are in Test mode. Test devices have shared read-only access to the test versions of a vDisk in order to facilitate QA testing of a vDisk version in Standard Image mode, prior to the release of that version to production machines. Production - Select this option to allow the target device to stream an assigned vDisk that is currently in production. Production devices have shared, read-only access to production versions of a vDisk. Production devices do not have access to maintenance or test versions, which prevents updates that have not been tested from accidentally being deployed on production machines. Note: The default Type for a new device is Maintenance. The default Type for an existing device is Maintenance.|
|Boot from||The boot method this target device should use. Options include booting from a vDisk, hard disk, or floppy disk.|
|MAC||Enter the media access control (MAC) address of the network interface card that is installed in the target device.|
|Port||Displays the UDP port value. In most instances, you do not have to change this value. However, if target device software conflicts with any other IP/UDP software (that is, they are sharing the same port), you must change this value.|
|Class||Class used for matching new vDisks to target devices when using Automatic Disk Image Update in order to match new vDisks images to the appropriate target devices.|
|Disable this device||Enable this option to prevent target devices from booting. Regardless if enabled or disabled, new target devices that are added using Auto-add, have records created in the database.|
|vDisks for this device||Displays the list of vDisk assigned to this target device, including the following options: Click Add to open the Assign vDisks dialog. To filter the vDisks that display, select a specific store name and Provisioning Server or select All Stores and All Servers to list all vDisks available to this target device. Highlight the vDisks to assign, then click OK; Click Remove to remove vDisks from this device; Click Printers to open the Target Devices vDisk Printers dialog. This dialog allows you to choose the default printer and any network and local printers to enable or disable for this target device.|
|Options||Provides secondary boot options: Include the local hard drive as a boot device; Include one or more custom bootstraps as boot options. If enabling a custom bootstrap, click Add, to enter the bootstrap file name and the menu text to appear (optional), then click OK. If more than one vdisk is listed in the table or if either (or both) secondary boot options are enabled, the user is prompted with a disk menu at the target devices when it is booted. Enter a menu option name to display to the target device. The target device can select which boot options to use. Click Edit to edit an existing custom bootstrap’s file name or menu text. Click Remove to remove a custom bootstrap file from those available to this target device.|
|Name and string||There is no fixed limit to the number of names you can add. However, the maximum name length is 250 characters and the maximum value length is 1000 characters. Use any name for the field Name, but do not repeat a field name in the same target device. Field names are not case sensitive. In other words, the system interprets “FIELDNAME” and “fieldname” as the same name. Blank spaces entered before or after the field name are automatically removed. A personality name cannot start with a $. This symbol is used for reserved values such as $DiskName and $WriteCacheType.|
Password information entered in this dialog is for initial target device login only. It does not affect Windows account login.
|Authentication||If authenticating with a user name and password, enter the user name for the account. Follow your organization’s user name conventions. Note: User names must be at least two characters and no more than 40 characters in length. User names are NOT case sensitive. Authentication methods include: None, Username and password, External verification (user supplied method)|
|Username||If the account already exists, you cannot change the user name.|
|Password||If authenticating with a user name and password: Click the Change button to open the Change Password dialog. To create a new password for a user account, type the old password, then type the new password in both the New password and Confirm new password text boxes. Click OK to change the password. Note: Follow your organization’s password conventions. Requires passwords be at least three characters and no more than 20 characters in length. Passwords ARE case sensitive. Re-enter the new password exactly as you entered it in the previous field to confirm it.|
|Target device status||The following target device status information appears: Status - current status of this device (active or inactive); IP Address - provides the IP Address or ‘unknown’; Server - the Provisioning Server that is communicating with this device; Retries - the number of retries to permit when connecting to this device; vDisk - provides the name of the vDisk or displays as ‘unknown’; vDisk version - version of this vDisk currently being accessed; vDisk full name - the full file name for the version currently being accessed; vDisk access - identifies if the version is in Production, Maintenance, or Test; License information - depending on the device vendor, displays product licensing information (including; n/a, Desktop License, Datacenter License, XenApp License, or XenDesktop License).|
|Logging level||Select the logging level or select Off to disable logging: Off – Logging is disabled for this Provisioning Server; Fatal – logs information about an operation that the system could not recover from; Error log information about an operation that produces an error condition; Warning – logs information about an operation that completes successfully, but there are issues with the operation; Info – Default logging level. Logs information about workflow, which generally explains how operations occur; Debug – logs details related to a specific operation and is the highest level of logging. If logging is set to DEBUG, all other levels of logging information are displayed in the log file; Trace – logs all valid operations.|
Setting the target device as the template for this collection
A target device can be set as the template for new target devices that are added to a collection. A new target device inherits the properties from the template target device, which allows you to quickly add new devices to a collection.
Target devices that use personal vDisks are created and added to a collection when the XenDesktop Setup Wizard is run. If a target device template exists, it is ignored when the target device that uses a personal vDisk is added to the collection.
To set a target device as the template device for a collection, in the Console, right-click on the target device, then select Set device as template.
Consider the following when using templates:
- Disable the target device that serves as the template to permit all target devices using this template to be added to the database, but not permit the target device to boot.
- Target devices receive a message requesting that they first contact the administrator before being allowed to boot.
- ‘T’ appears in light blue on the device serving as the template. New target devices automatically have a name generated and all other properties will be taken from the default template target device. No user interaction is required.
Creating a VM with nested virtualization
In some cases, you may want to create a nested virtualization paradigm for a VM. If your environment uses Device Guard and you want to create a template from the VM running Device Guard, PVS has no means to know if this functionality was setup for that particular VM. To resolve this issue, you can manually enable Device Guard on the Hyper-V host using a PowerShell command after the VM has been created using the XenDesktop Setup Wizard.
To configure a VM to use Device Guard:
- Create the VM using the XenDesktop Setup Wizard.
After creating the VM, execute the following command for each VM on the physical Hyper-V host to enable nested virtualization:
Set-VMProcessor -VMName <Target VM’s Name> -ExposeVirtualizationExtensions $true
Refer to the Microsoft site for more information about nested virtualization.
Copying and pasting target device properties
To copy the properties of one target device, and paste those properties to other target device members:
Note: Target devices that use personal vDisks can only inherit the properties of another target device that uses a personal vDisk.
- In the Console’s details pane, right-click on the target device that you want to copy properties from, then select Copy device properties. The Copy Device Properties dialog appears.
- Select the checkbox next to the properties that you want to copy, then click Copy. The properties are copied to the clipboard and the dialog closes.
- Right-click on one or more target devices that will inherit the copied properties, then select the Paste menu option. The Paste Device Properties dialog appears.
- Click Close to close the dialog.
Booting target devices
- Right-click on a collection to boot all target devices in the collection, or highlight only those target devices that you want to boot within the collection tree, then select the Boot devices menu option. The Target Device Control dialog displays with the Boot devices menu option selected in the Settings drop-down menu.
- Click the Boot devices button to boot target devices. The Status column displays the Boot Signal status until the target device successfully receives the signal, then status changes to Success.
Checking a target device’s status from the console
The target device status indicates whether it is currently active or inactive on the network.
To check the status of a target device:
- Double-click on the target device in the Console window, then select the Properties menu option. The Device Properties tab appears.
- Select the Status tab and review the following status information:
- Current status (active or inactive)
- IP address
- Current Provisioning Server
- Current vDisk name
- Provisioning Server cache file size in bytes Also, in the Console window, if the target device is active, the target device icon appears as a green computer screen. If the target device is inactive, the icon appears as a black computer screen.
Sending messages to target devices
To send a message to target devices members:
Right-click on the collection to send a message to all members within the collection, or highlight only those target devices within the collection that should receive the message, then select the Send message menu option. The Target Device Control dialog displays with the Message to devices menu option selected in the Settings drop-down menu. Target devices are display in the Device table.
- Type a message to display on target devices in the Message text box.
- Click the Send message button. The Status column displays the Message Signal status until target devices successfully receives the message, the status changes to Success.
Shutting down target devices
To shutdown target devices:
- Right-click on the collection to shut down all target devices within the collection, or highlight only those target devices that should be shut-down within a collection, then select the Shutdown devices menu option. The Target Device Control dialog displays with the Shutdown devices menu option selected in the Settings drop-down menu. Target devices display in the Device table.
- Type the number of seconds to wait before shutting down target devices in the Delay text box.
- Type a message to display on target devices in the Message text box.
- Click the Shutdown devices button to shutdown target devices. The Status column displays the shutdown signal status until the target device shuts down. As each target device successfully shuts down, the status changes to Success.
Restarting target devices
To restart target devices:
- Right-click on a collection in the Console tree or highlight only those target devices that should be restarted within the collection, then select the Restart devices menu option. The Target Device Control dialog displays with the Restart devices menu option selected in the Settings drop-down menu. Target devices display in the Device table.
- Type the number of seconds to wait before restarting target devices in the Delay text box.
- Type a message to display on target devices in the Message text box.
- Click the Restart devices button to restart target devices. The Status column displays the Restart Signal status until the target device successfully receives the signal, then status changes to Success.
Moving target devices between collections
A target device can be moved from one collection to another collection within a site using drag and drop in the Console’s details pane (drag the device(s) from one collection, then drop the device into another collection). Alternatively, target devices can be moved using the Move menu option.
To move a target device using the Move menu option:
- In the Console, expand the collection, right-click on the target device in the details pane, then select the Move menu option.
- From the drop-down menu, select the collection to move this target device into. If applicable, apply the collection’s device template to the target device being moved, by enabling Apply target collection’s template device properties to moved devices.
- Click Move.
There is a risk that moving target devices from site to site could cause them to be deleted in the future. This risk increases if the target device was created using the Streamed VM Setup Wizard. While an administrator can use the interface to move target devices from site to site, Citrix recommends that you avoid moving them from site to site in this fashion.
Managing target device Personality
Normally, all target device’s sharing the same vDisk must have identical configurations. The Target Device Personality feature allows you to define data for specific target devices and make it available to the target device at boot time. This data can then be used by your custom applications and scripts for a variety of purposes.
For example, suppose you are using Provisioning Server to support PCs in three classrooms. Each classroom has its own printer, and you want the PCs in each classroom to default to the correct printer. By using the Target Device Personality feature, you can define a default printer field, and then enter a printer name value for each target device. You define the field and values under Target Device Properties. This information is stored in the database. When the target device boots, the device-specific printer information is retrieved from the database and written to an .INI file on the vDisk. Using a custom script or application that you develop, you can retrieve the printer value and write it to the registry. Using this method, each time a target device boots, it will be set to use the correct default printer in its classroom.
The number of fields and amount of data that you can define for each target device is limited to 64Kb or 65536 bytes per target device. Each individual field may be up to 2047 bytes.
Target Device Personality Tasks
- Define personality data for a single target device using the Console
- Define personality data for multiple target device using the Console
- Using Target Device Personality Data
Define personality data from a single target device using the Console
To define personality data for a single target device:
- In the Console, right-click on the target device that you want to define personality data for, then select the Properties menu option.
- Select the Personality tab.
- Click the Add button. The Add/Edit Personality String dialog appears. Note: There is no fixed limit to the number of field names and associated strings you can add. However, the limits to the total amount of personality data assigned to a single string (names and data combined) is approximately 2047 bytes. Also, the total amount of data contained in names, strings and delimiters is limited to approximately 64Kb or 65536 bytes per target device. This limit is checked by the administrator when you attempt to add a string. If you exceed the limit, a warning message displays and you are prevented from creating an invalid configuration. Target device personality data is treated like all other properties. This data will be inherited when new target devices are added automatically to the database by either the Add New Target Device Silently option, or with the Add New Target Device with BIOS Prompts option.
- Enter a name and string value. Note: You can use any name for the field Name, but you cannot repeat a field name in the same target device. Field names are not case sensitive. In other words, the system interprets “FIELDNAME” and “fieldname” as the same name. Blank spaces entered before or after the field name are automatically removed. A personality name cannot start with a $. This symbol is used for reserved values such as $DiskName and $WriteCacheType.
- Click OK.
To add additional fields and values, repeat Steps 5 and 6 as needed. When finished adding data, click OK to exit the Target Device Properties dialog.
Define personality data for multiple target device using the Console
Define target device personality for multiple devices:
- In the Console, right-click on the target device that has the personality settings that you want to share with other device, then select Copy. The Copy device properties dialog appears.
- Highlight the target devices in the details pane that you want to copy personality settings to, then right-click and select the Paste device properties menu.
- Click on the Personality strings option (you may also choose to copy other properties at this time), then click Paste.
Using Target Device Personality Data
Once the file system becomes available to the target device, the personality data is written to a standard Windows .ini text file called Personality.ini. The file is stored in the root directory of the vDisk file system for easy access by your custom scripts or applications.
The file is formatted as follows:
[StringData] FieldName1=Field data for first field FieldName2=Field data for second field
This file is accessible to any custom script or application. It can be queried by the standard Windows .INI API. Additionally, a command line application, called GetPersonality.exe, is provided to allow easier batch file access to the personality settings.
A target device’s vDisk name and mode can be retrieved using GetPersonality.exe. The following reserve values are included in the [StringData] section of the Personality.ini file:
$DiskName=<xx> $WriteCacheType=<0 (Private image) All other values are standard image; 1 (Server Disk), 2 (Server Disk Encrypted), 3 (RAM), 4 (Hard Disk), 5 (Hard Disk Encrypted), 6 (RAM Disk), or 7 (Difference Disk). Min=0, Max=7, Default=0>
The xx is the name of the disk. A vDisk name cannot start with a $. This symbol is used for reserved values such as $DiskName and $WriteCacheType. The following message displays if a name that starts with $ is entered:
A name cannot start with a $. This is used for reserve values like $DiskName and $WriteCacheType. The $DiskName and $WriteCacheType values can be retrieved on the target device using GetPersonality.exe.
The command line utility GetPersonality.exe allows users to access the Target Device Personality settings from a Windows batch file. The program queries the INI file for the user and places the personality strings in the locations chosen by the user. GetPersonality.exe supports the following command line options:
GetPersonality FieldName /r=RegistryKeyPath <- Place field in registry GetPersonality FieldName /f=FileName <- Place field in file GetPersonality FieldName /o <- Output field to STDOUT GetPersonality /? or /help <- Display help
Setting a Registry Key Value:
The example below retrieves the Target Device Personality data value from the DefaultPrinter field and writes it to the target device registry to set the default printer for the device.
The Target Device Personality String Set in Target Device Properties is:
DefaultPrinter= \CHESBAY01\SAVIN 9935DPE/2035DPE PCL 5e,winspool,Ne03:
A batch file run on the target device would include the following line:
GetPersonality DefaultPrinter /r=HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Device
The actual key name should be the UNC name of the network printer, such as \dc1\Main, and the value that should be entered for the key would be similar to winspool,Ne01: where Ne01 is a unique number for each installed printer.
Setting Environment Variables
Setting environment variables with personality data is a two-step process:
- Use the GetPersonality command with the /f option to insert the variable into a temporary file.
Use the set command to set the variable. For example, to set the environment variable Path statement for the target device a personality name, define the Pathname with the string value:
%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Microsoft Office\OFFICE11\;C:\Program Files\Microsoft SQL Server\80\Tolls\Binn
The /f option creates a temporary file, allowing for a name to be assigned, in this case temp.txt. The following lines would then need to be included in the batch file:
GetPersonality Pathname /f=temp.txt set /p Path= <temp.txt
If the filename specified with the /f option already exists, GetPersonality will not append the line to the file. Instead, the existing line is overwritten in the file.
Changing the device status to Down
Occassionally, a target device may display as active when it is actually down. This occurs when the status record is not refreshed properly in the database. To change the target device’s status in the database to down, Complete the steps that follow.
- In the Console, right-click on the target device that should be marked as down, then select the Mark Device Down option. A confirmation dialog appears.
- Click OK to mark the device as down.
In this article
- Target device properties
- General tab
- vDisk tab
- Personality tab
- Authentication tab
- Status tab
- Logging tab
- Setting the target device as the template for this collection
- Creating a VM with nested virtualization
- Copying and pasting target device properties
- Booting target devices
- Checking a target device’s status from the console
- Sending messages to target devices
- Shutting down target devices
- Restarting target devices
- Moving target devices between collections
- Managing target device Personality
- Define personality data from a single target device using the Console
- Define personality data for multiple target device using the Console
- Using Target Device Personality Data
- Changing the device status to Down