Sunday, June 26, 2011

To change network interfaces on XenDesktop machine catalogs

When you are adding a new XenDesktop host to your XenDesktop 5 deployment, you will select the guest network that all created desktops will have as thier default.

As with most configuration in XenDesktop 5, changing what this network is after the initial setup requires PowerShell and some manual intervention

For existing virtual desktops, reconfigure the network interfaces manually through the vCenter console – i.e. right click the desktops and edit settings, change network label.

To ensure that all future desktops are then created with the correct interface the default has to be changed using PowerShell
First, open a PowerShell console as administrator.

Load the Citrix cmdlets:
Add-PSSnapin "Citrix*"


Discover the network path:
get-item xdhyp:\hostingunits\<hostname>


Where ‘hostname’ is what the virtual infrastructure is named as in the XenDesktop Desktop Studio console. (In the main view select Configuration -> Hosts -> and look for the server name for the vCenter server or XenServer resource pool)

Type this command:
get-item xdhyp:\hostingunits\<hostname>

The results should be returned, and one line will be:
NetworkPath          : XDHyp:\Connections\Melbourne\ESX.datacenter\Lab.cluster\OLD.network

Use the information to change the network path as required:
set-item xdhyp:\hostingunits\<hostname> -networkpath XDHyp:\Connections\Melbourne\ESX.datacenter\Lab.cluster\NEW.network


New Network Path will be the network interface name as it appears in vCenter console, appended with “.network”.
After this is complete, any new XenDesktop virtual machines created using MCS will have the new network interface assigned automatically.


XenApp Connector for System Center Configuration Manager (SCCM) 2007 R2 – PT I.

A quick overview of the Connector


The newish Connector for XenApp/Config Manager is great. I like the automation of installing applications out of hours, although I haven’t used the publishing aspect of it yet, just the deployment tool.
http://www.citrix.com/English/ps2/products/subfeature.asp?contentID=2301676




At a high level, the Connector is the integration point for XenApp 6 and SCCM 2007 R2. With the Connector you can advertise applications to XenApp and let the Connector handle draining the server, notifying the users of impending installs and logging them off. Once the application is installed, the Connector can publish the applications and also push users back on to the server.


The Connector uses the Citrix Power and Capacity Manager to handle the draining of servers,which is done by changing the logon preference from 1st Choice to whatever the lowest choice is.


Installation is pretty straight forward, but there are some tweaks you can make to the Connector to get it working just the way you want. 

With the XenApp Connector, application advertisements run a task sequence


When an advertisement is run the following actions happen:
1.    Citrix Power and Capacity Management changes the connection preference for servers targeted in the Collection and that haven’t processed the advertisement to drain user connections.


2.    Then the task sequence will run on the targeted server, if there are user sessions then the advert will fail. The Advertisement Wait timeout starts counting from the first time the server processes any mandatory assignment


3.    If a previous mandatory assignment has failed, and there are still user sessions, and the Advertisement Wait period has passed, then the following will happen:




              i.        Users will be warned of impending logoff, and asked to save their work


             ii.        Users will be logged off after the time set expires


            iii.        Server logons will be disabled


            iv.        The application will install


             v.        Logons will be enabled on the server


            vi.        Logon preference will be set back to normal



Change Advertisement wait times


When installing the Connector console extension, the default settings for the Advert Wait time is three days, and it is not possible to set it to less than one day but more than 0 through the GUI. To do this, the following file must be changed on any machines the console extension is installed on.
Browse to
C:\Program Files\Citrix\XenApp Connector for ConfigMgr 2007\
Edit the XASCCM.config file in notepad
The file should look like this:




<XASCCMConfig version="1.00">
  <XADistributionPackage>
    <ForceDateInterval>0.00:10:00</ForceDateInterval>
    <ForceOutWarningNotification>
      <LastMinuteInterval>00:05:00</LastMinuteInterval>
      <MessageTitle>Upcoming Maintenance</MessageTitle>
      <MessageBody>Please save your work and logoff, server will be in maintenance mode in 5 minutes.</MessageBody>
    </ForceOutWarningNotification>
  </XADistributionPackage>
</XASCCMConfig>