Wilco van Bragt - LinkeIn Wilco van Bragt - Twitter rssa 

Unattended installation Citrix Provisioning Services 6.1 Part 2

In the first part I described the options to install the PVS software unattended, followed by the preparations and explanation to set-up an answerfile for the unattended configuration wizard. In this second I will start continuing to set-up the answerfile for both the first as the second and following servers, followed by the command line to actually run the configuration wizard silently. The last topic will be about the automated ways PVS offers to further configure the PVS environment.

 

Creating the answer file for the first server




As stated in the first part the ConfigWizard.out file includes all possible parameters both for creating and joining a farm. Although most parameters are explained within the file the first time you see the file it’s a search which parameters are needed. I will start explaining the parameters needed for creating a farm.

-       FarmConfiguration: With this parameter you need to specify if the server will create or join a farm. For creating a farm you need to specify 1.

-       DatabaseServer: The Name of the server which will be hosting the Database for PVS

-       DatabaseInstance: If you use a SQL with instances you need to specify the instance for the database, if do not use instances you add this parameter without a value.

-       DatabaseNew: The name you would like to have the database on the SQL server

-       FarmNew: The name the PVS Farm will have

-       SiteNew: When creating a farm you need to specify a site, at SiteNew you provide the name for that first site

-       CollectionNew: During the creation a collection should be added to the site. With CollectionNew you specify the name of the collection

-       ADGroup: With ADGroup you mention that you would like to use AD Groups for specifying administration rights within the PVS environment. The group specified at ADGroup will become the Farms Admins groups. The expression is domainname/OU/Group.

-       Store: The name provided to the first store set-up during the creation

-       DefaultPath: the physical location of the store, so the UNC of directory path

-       LicenseServer: The name of the Citrix License Server

-       LicenseServerPort: The port used by the Citrix License server, by default 27000

-       Username: The useraccount that will be used as the service account for the streaming service. Leave it empty if you would like to use the network account.

-       Username2: The password of the account specified at Username (encrypted). Leave this one empty if an network account is used

-       Network: If using the network account for the streaming service provides a value of 1, when using a service account provide a zero.

-       Database: Configure the account for access to the database. Required when using Network or the Username don’t have access to database yet. A value of 1 is required to configure the account access.

-       PasswordManagementInterval: Provide a value the time period PVS changed the machine password. A value between 1 or 30 can be used.

-       StreamNetworkAdapterIP: The IP address of the network card(s) that will facilitate the PVS stream. When more adapters are used, separate those with a comma.

-       IpcPortBase: The first portnumber that can be used by PVS stream service

-       IpcPortCount: The total amounts of portnumber that may be used by the PVS stream service, starting with the value provided by the IpcPortBase.

-       SoapPort: The portnumber used by the console to communicate with the PVS server.

 

The answerfile can be extended with other options, depending on your infrastructure setup. Examples are IPServiceType (if using a DHCP tool on the PVS server, if not specified PVS assumes that the server runs on another server), PXEServiceType (if not specified PXE will not be enabled), ManagementFirstPort/ManagementLastPort (if you would like to change the management ports), BootstrapFile (for specifying TFTP, if not available TFTP will not be enabled) and/or NoStartServices (if you don’t want to start the services automatically after running the wizard). It’s good to know when using the BootStrapFile parameter the LS# is required, although it’s stated in the configwizard.out that when the LS is not found the first server in the database will be used. It’s both required for creating the farm as joining an existing farm.

My configuration looks like this, as I’m using BDM I don’t have parameters for PXE/TFTP for example:

FarmConfiguration=1

DatabaseServer=VBN-SRV001

DatabaseInstance=

DatabaseNew=VBNPVS

FarmNew=VanBragtFarm

SiteNew=VanBragtSite

CollectionNew=XenApp   6.5 Desktop

ADGroup=vanbragt.local/Builtin/administrators

Store=PVS Store

DefaultPath=c:\store

LicenseServer=VBN-SRV001

LicenseServerPort=27000

Username=

Username2=

Network=1

Database=1

PasswordManagementInterval=30

StreamNetworkAdapterIP=192.168.21.214

IpcPortBase=6890

IpcPortCount=20

SoapPort=54321

 

For the second server the following parameters are needed:

-       FarmConfiguration: With this parameter you need to specify if the server will create or join a farm. For joining a farm you need to specify 2.

-       DatabaseServer: The Name of the server which will be hosting the Database for PVS

-       DatabaseInstance: If you use a SQL with instances you need to specify the instance for the database, if do not use instances you add this parameter without a value.

-       FarmExisting: The farm you would like to join the server. You need to provide the value of the database, not the Farm name.

-       ExistingSite: If you would like to join the server to an existing site you provide the sitename at this parameter. You can also create a new site using the NewSite parameter.

-       ExistingStore: If you would like to connect the server to an existing store you can provide the name at this parameter, you can also provide a new store if necessary using the NewStore parameter.

-       Username: The useraccount that will be used as the service account for the streaming service. Leave it empty if you would like to use the network account.

-       Username2: The password of the account specified at Username (encrypted). Leave this one empty if an network account is used

-       Network: If using the network account for the streaming service provides a value of 1, when using a service account provide a zero.

-       Database: Configure the account for access to the database. Required when using Network or the Username don’t have access to database yet. A value of 1 is required to configure the account access.

-       PasswordManagementInterval: Provide a value the time period PVS changed the machine password. A value between 1 or 30 can be used.

-       StreamNetworkAdapterIP: The IP address of the network card(s) that will facilitate the PVS stream. When more adapters are used, separate those with a comma.

-       IpcPortBase: The first portnumber that can be used by PVS stream service

-       IpcPortCount: The total amounts of portnumber that may be used by the PVS stream service, starting with the value provided by the IpcPortBase.

-       SoapPort: The portnumber used by the console to communicate with the PVS server.

Logically also the second and next servers can be configured with additional parameters for DHCP, PXE, TFTP and so on as mentioned at the first server answer file parameters.

The answerfile for the second and following servers could be like this (again using BDM):

FarmConfiguration=2

DatabaseServer=VBN-SRV001

DatabaseInstance=

FarmExisting= VBNPVS

ExistingSite=   VanBragtSite

ExistingStore= PVS   Store

UserName=

UserName2=

Network=1

Database=1

PasswordManagementInterval=30

StreamNetworkAdapterIP=192.168.21.206

IpcPortBase=6890

IpcPortCount=20

SoapPort=54321

 

Before running the configuration wizard with the answerfile, the value specified at the DefaultPath should be already created in advance. Also take into account that when the database is created the user that runs the script should have rights on the database server to create the database. If you use the answerfile for joining the farm, it’s logical that you have to arrange that the StreamNetworkAdapterIP is changed so it reflects the IP address of the server you are running the configuration wizard on.

Also it’s important that the file is saved in UNICODE format, otherwise the wizard will fail probably mentioning that the databaseserver is not found.

Running the configuration silently is done, via the configwizard.exe (located at C:\Program Files\Citrix\Provisioning Services) with the /a parameter, followed by the path of the answerfile. Optional you can specify the /o parameter for specify a logfile, to check if the configuration wizard has run successfully.

%programfiles%\Citrix\Provisioning   Services\ConfigWizard.exe /a:c:\install\configwizard.ans /o:c:\log\configwizard.log

 

Additional Configuration of the PVS environment servers

When the configuration wizard has run successfully the server is running within the PVS Farm. Besides the initial configuration on several levels settings can be changed. As these settings can be configured using the command line tool MLCI or the PowerShell Snapin. Logically both can be used within scripts to fully automate the configuration of the PVS infrastructure. It’s impossible to mention all the options available. Both the MCLI as the PowerShell Snapin have a complete ProgramGuide available. For the PowerShell Snapin you should read this article to get familiar and the initial set-up required.

I’m just providing some examples. For the server settings you should apply those to all servers joining the farm. Farm, Site, Collection and Store settings are only needed once. I added those to the create PVS script and the server settings are available in both scripts.

As both the MCLI as the PowerShell Snapin are part of the PVS Console, it’s required that you run the commands from a server with the console installed. As you can specify a servername, you could execute the command remotely. Below I have added some possible commands as a reference.

%PROGRAMFILES%\Citrix\Provisioning   Services Console\MCLI set Farm -r auditingEnabled=1   offlineDatabaseSupportEnabled=1

%PROGRAMFILES%\Citrix\Provisioning   Services Console\MCLI set Server -p ServerName="%computername%" -r   eventLoggingEnabled=1 threadsPerPort=16

or

add-PSSnapin –Name mclipssnapin

mcli-set Farm -r   auditingEnabled=1,offlineDatabaseSupportEnabled=1

mcli-set Server -p   ServerName=VBN-SRV014 -r eventLoggingEnabled=1,threadsPerPort=16

 

Conclusion

Citrix did a great job with the possibilities to automate both the installation, the initial configuration as the more in-depth settings. The whole PVS environment can be installed and configured completely unattended including the creation of the PVS farm. For people that are not allowed to create a database out of an application, they could use the dbscript.exe to create the required SQL script for their DBA. But remember the driver issue which I added as a comment to the first part article.