Pages

Friday, February 24, 2012

vSphere 5 virtual machine’s network adapter stuck with 2 port groups

I ran into an interesting issue today in a vSphere 5 / ESXi 5.0 environment with a few virtual machines that had 2 port groups listed in the network section of the properties:

image

What lead up to this was that the master image that was used to deploy XenDesktop 5.5 virtual desktops was assigned the incorrect port group and since there were 70 desktops, I went ahead and used PowerCLI to change all the NICs of the virtual desktops to the correct port group.  Shortly after that I noticed the master images and some (not all) virtual desktops which had Windows 7 or XP as the operating system were unable to obtain a DHCP lease.  Note that I know the screenshot above doesn’t show that the virtual machine has a 169.x.x.x IP address, the reason for this is because the virtual machine was shut off when I took the screenshot.

I took a few minutes to try and fiddle around with the network adapter’s port group by disconnected it, change the port group and changing it back then used PowerCLI commands to do the same and while changing the port group to a regular vSwitch network removed the dvSwitch port group, changing it back reverted it to the 2 port group being listed state.

image

I had little time to troubleshoot this and figured it was a bug so I got the client to give VMware a call and after spending a few minutes on the phone with the tech, he was asked to check for snapshots and if there were, delete it.  I’m not sure if this is supposed to be a surprise or not but deleting the snapshot fixed the port group issue:

imageimage

image

This didn’t explain why I had the same issue with a few of my virtual desktops that were deployed by Citrix XenDesktop 5.5 but by the time we got an answer from VMware, I had already deleted and redeployed the problematic desktops.

Remote desktop to Citrix XenApp 6.5 stops working after installing hotfix XA650W2K8R2X64001.msp

Ran into a strange issue while performing a routine patch night on a Citrix XenApp 6.5 server with no patches.  The patch I was installing is supposed to fix a pass-through authentication issue but as I rebooted the server after installing the hotfix XA650W2K8R2X64001.msp because it was required, the server would get stuck in the Shutting Down state.  After waiting 20 minutes with no indication that the server was going to shutdown, I had rebooted it.  Once it came back up, I noticed that RDP sessions over to the server would immediately cut off.  I would see the connection get established but almost instantly cut off and revert back to the RDP client:

image

I checked the RDP listener, ran netstat to ensure the svchost.exe service was listening on port 3389 and nothing really popped out at me.  Since it would appear that the patch caused the RDP to stop working, I went ahead and uninstalled it but that still did not correct the problem.  Reinstalling RDP services crossed my mind but I remember it being a disaster when I did it last time on a XenApp 6.5 server.  Another idea was to delete the RDP listener and recreate it as I’ve done something similar before but that prior experience was not a XenApp server so I decided not to.  The event logs did not have any errors or warnings pertaining to this and seeing how I had no snapshot created prior to the patch, my last hope was to disable and re-enable RDP.  So I proceeded to disable RDP:

image

… rebooted, re-enabled it:

image

… and RDP began working.  Once I got RDP going again, I went ahead and reinstalled the patch and while RDP does connect but it gets stuck at the following screen:

image

After a few minutes, it gets cut off:

image

Not too promising.  From here, I went back to the console and tried to log in but the server was unresponsive when I send CTRL-ALT-DELETE.  Since it didn’t look like I was going to be able to log in, I used the VMware console’s Restart Guest feature to try and restart it but that too didn’t seem to do anything.  Just as I thought the server had hung and was going to hard reset it, the server started shutting down.  Once it came back up, I was able to RDP to the server and proceeded with installing another hotfix (XA650W2K8R2X64014.msp).

Definitely a strange experience and it’s worth noting that I did not experience the same issue when I installed the hotfix on the second XenApp server.

Thursday, February 23, 2012

Citrix XenDesktop 5.5’s virtual desktops shutting down and going into maintenance mode

I recently noticed that a newly deployed desktop catalog’s XenDesktop virtual desktops were shutting down and put into maintenance mode shortly after they were started:

image

I went ahead to double check that my PeakHourBufferSize and Peak Hours were set appropriately:

image

… and wasn’t able to figure out what might be the problem until I noticed that some of the desktops were assigned a APIPA 169.254.91.x IP address:

image

image

This lead me to believe that the DHCP server serving IP addresses might be out of addresses to hand out so I logged on and just as I suspected, the server had no more IP addresses to hand out.  What this meant was that while the XenDesktop DDC was able to start up the server, the virtual desktop was unable to contact any DDCs to register.  Logging onto these problematic desktops would show event ID 1001 and 1022 warnings with the messages:

The Citrix Desktop Service failed to register with any controllers in the last x minutes.

The service will now try to register with controllers at a reduced rate of every x minutes.

image

----------------------------------------------------------------------------------------------------------------------------------------------------------

The Citrix Desktop Service failed to obtain a list of delivery controllers with which to register.

Please ensure that Active Directory configuration for the farm is correct, that this machine is in the appropriate Active Directory domain and that one or more delivery controllers have been fully initialized.

image

The solution for this issue was simple, fix your DHCP server allowing your virtual desktops to obtain a valid IP address so it can register to a DDC.

Customizing Internet Explorer Settings for Citrix XenApp Server

I’m sure many who have had to deploy XenApp servers in the past have had to configure policies that customize XenApp server’s internet explorer browser.  Whether it’s to lockdown the controls or simply for cosmetics reason will depend greatly on what applications the XenApp server or servers is publishing.  In the case of one of my recent projects, it was a little bit of both and I found it pain to go and comb through all of the settings available through group policy for the ones you know about but don’t remember exactly which node they’re in so I took this opportunity to document the changes I have made so I can have somewhat of a starting point for similar projects in the future.

Note that the following settings are used because of the following reasons and that each environment is unique so modifications will most likely be necessary for another environment with different requirements:

  1. The XenApp farm is used for publishing applications that contain sensitive medical data that run within a browser.
  2. Access to internet websites will be controlled by a web filter appliance.
  3. Certain settings were enabled because the web applications were not designed for tablet devices and therefore makes it difficult for the user to navigate around the UI on a small screen.

Please also be aware that these settings are in no way complete and will most likely continue to add to the list as additional applications are added or removed.

Path

Setting

Description

State

Administrative Templates –> Windows Components –> Internet Explorer Turn off Favorites bar

This policy setting allows you to manage whether users have access to the Favorites bar in Internet Explorer.

If you enable this policy setting, the Favorites bar will be turned off.

If you disable this policy setting, the Favorites bar will be turned on.

If you do not configure this policy setting, users will be able to turn on or turn off the Favorites bar.

Enabled
Administrative Templates –> Windows Components –> Internet Explorer Turn off Suggested Sites

This policy setting controls the Suggested Sites feature, which recommends sites based on the user’s browsing activity. Suggested Sites reports a user’s browsing history to Microsoft to suggest sites the user might want to visit.

If you enable this policy setting, the user will not be prompted to enable the Suggested Sites. The user’s browsing history will be sent to produce suggestions.

If you disable this policy setting, the entry points and functionality associated with this feature will be disabled.

If you do not configure this policy setting, users will able to enable and disable the Suggested Sites feature.

Enabled
Administrative Templates –> Windows Components –> Internet Explorer Disable Import/Export Settings wizard

This policy settings disables the Import/Export Settings wizard. This wizard allows you to import settings from another browser, import settings from a file, or export settings to a file. Importing settings from another browser allows the user to import favorites and feeds from other browsers. Importing settings from a file allows the user to import favorites, feeds and cookies from a file. Exporting settings to a file allows the user to export favorites, feeds and cookies to a file.
     
If you enable this policy setting, the user will not be able to use the Import/Export Settings wizard.

If you disable or do not configure this policy setting, the user will be able to use the Import/Export Settings wizard.

Enabled
Administrative Templates –> Windows Components –> Internet Explorer Prevent performance of First Run Customize settings

This policy setting prevents performance of the First Run Customize settings ability and controls what the user will see when they launch Internet Explorer for the first time after installation of Internet Explorer.

If you enable this policy setting, you must make one of two choices:
1: Skip Customize Settings, and go directly to the user’s home page.
2: Skip Customize Settings, and go directly to the "Welcome to Internet Explorer" Web page.

If you disable or do not configure this policy setting, users go through the regular first run process.

Enabled

Go direction to home page
Administrative Templates –> Windows Components –> Internet Explorer Prevent Internet Explorer Search box from displaying

This policy setting allows you to disable the Internet Explorer Search box. The Search box includes all installed search providers as well as a link to search settings.

If you enable this policy setting, the Search box in Internet Explorer will be disabled, and will not appear in the Internet Explorer frame.

If you disable or do not configure this policy setting, the Search box will appear by default in the Internet Explorer frame.

Note: If you enable this policy setting, Internet Explorer will not enumerate search providers for the Accelerators infrastructure. If Accelerators are not turned off, users can install search providers as Accelerators to include them on the Accelerator menu.

Enabled
Administrative Templates –> Windows Components –> Internet Explorer Turn off tabbed browsing

This policy setting allows you to turn off tabbed browsing and related entry points from the Internet Explorer user interface.

If you enable this policy setting, tabbed browsing and related entry points will be disabled for Internet Explorer, and this setting cannot be changed by the user.

If you disable this policy setting, tabbed browsing and related entry points will appear in the user interface for Internet Explorer and this setting cannot be changed by the user.

If you do not configure this policy setting, the user will be able to enable or disable tabbed browsing.

Enabled
Administrative Templates –> Windows Components –> Internet Explorer Set tab process growth

This policy setting allows you to set the rate at which Internet Explorer creates new tab processes. There are two algorithms Internet Explorer uses.

The default algorithm has four settings: low, medium, high, or default. Low creates very few tab processes; medium creates a moderate amount of tab processes; and high allows the tab process to grow very quickly and is intended only for machines with ample physical memory. The default setting creates the optimal number of tab processes based on the operating system and amount of physical memory. Default is recommended.

The second algorithm must be explicitly enabled by creating an integer setting. In this case, each Internet Explorer isolation setting will quickly grow to use the specified integer number of tab processes, independent of the physical memory on the machine or how many Internet Explorer isolation settings are running.

If you enable this policy setting, you will set the rate at which Internet Explorer creates new tab processes to low, medium, or high, or to an integer.

If you disable or do not configure this policy setting, the tab process growth will set to default. The user may change this value with the registry key. Note: on Terminal Server, the default value is the integer “1”.

Enabled

0
Administrative Templates –> Windows Components –> Internet Explorer –> Accelerators Turn off Accelerators

This policy setting allows you to manage whether users have access to Accelerators.

If you enable this policy setting, users will not be able to access Accelerators.

If you disable or do not configure this policy setting, users will be able to access Accelerators and install new Accelerators.

Enabled
Administrative Templates –> Windows Components –> Internet Explorer –> Browser menus Hide Favorites menus

Prevents users from adding, removing, editing or viewing the list of Favorite links.

The Favorites list is a way to store popular links for future use.

If you enable this policy, the Favorites menu is removed from the interface, and the Favorites button on the browser toolbar appears dimmed. The Add to Favorites command on the shortcut menu is disabled; when users click it, they are informed that the command is unavailable.

If you disable this policy or do not configure it, users can manage their Favorites list.

Note: If you enable this policy, users also cannot click Synchronize on the Tools menu (in Internet Explorer 6) to manage their favorite links that are set up for offline viewing.

Enabled
Administrative Templates –> Windows Components –> Internet Explorer –> InPrivate Turn off InPrivate Browsing

This policy setting allows you to disable the InPrivate Browsing feature.

InPrivate Browsing prevents Internet Explorer from storing data about a user's browsing session. This includes cookies, temporary Internet files, history, and other data.

If you enable this policy setting, InPrivate Browsing will be disabled.

If you disable this policy setting, InPrivate Browsing will be available for use.

If you do not configure this setting, InPrivate Browsing can be turned on or off through the registry.

Enabled
Administrative Templates –> Windows Components –> Internet Explorer –> InPrivate Use Large Icons for Command Buttons

This policy setting allows you to make the icons for the command buttons bigger (20x20 pixels).

If you enable this setting, the icons for the command buttons will be bigger (20x20 pixels), and cannot be made smaller (16x16 pixels).

If you disable this setting, the icons will be 16x16 pixels (the default),  and cannot be made bigger (20x20 pixels).

If you do not configure this setting, the icons will be 16x16 pixels, and the user has the option to make them bigger (20x20 pixels).

Enabled

The following screenshot shows what the browser looks like with these policy changes:

image

In case anybody is wondering why I did not state whether these policies were applied at the Computer level or the User level, it’s because this varies between different environments so choose between the two by reviewing your requirements.

One of the other common decisions that also needs to be made is how to set the Trusted and Intranet sites.  Should it be set in the Computer policy or the User policy?  This also depends on how the XenApp servers are being used.  I find that the deciding factor is whether how locked down you want the browser to be.  If you want to allow your users to add and see what sites are added to different zones, use the User policy, otherwise, use the Computer policy because the latter gray’s out the zones and prevents the users from knowing or adding sites to the zones.

Wednesday, February 22, 2012

Notes on Citrix XenDesktop PowerShell cmdlets

As with one of my previous posts:

Notes on Citrix XenApp 6.5 PowerShell cmdlets
http://terenceluk.blogspot.com/2012/02/notes-on-citrix-xenapp-65-powershell.html

… I’ve been trying to keep track of the cmdlets I’ve been using to make my life a bit easier while configuring XenApp and XenDesktop farms and since I have cmdlets scattered around in different notes, I thought it would be a good idea to consolidate them into a blog post that I can reference to again in the future.

Listing XenDesktop Information

List all desktop catalogs and their information:
Get-BrokerDesktopGroup

List all desktop catalogs and their information and pipe to file:
Get-BrokerDesktopGroup > C:\XenDesktopCatalogs.txt

List a specific desktop catalog based on Name variable:
Get-BrokerDesktopGroup -Name “Windows 7”

List only the name of applications based on Name with a wild card:
Get-BrokerDesktopGroup -Name Windows*7* | format-list name

… and if you want to use other variables, you can review the attributes available via the

Get-BrokerDesktopGroup

… which outputs information similar to the following:

image

List only the name and PeakBufferSizePercent of applications based on Name with a wild card:
Get-BrokerDesktopGroup -Name Windows*7* | format-list name,PeakBufferSizePercent

List the desktops in the desktop catalog named “Windows 7 64-bit Internal Static” that is currently using an old snapshot after an update image was pushed out:
Get-BrokerDesktop -DesktopGroupName "Windows 7 64-bit Internal Static" | format-list MachineName,ImageOutOfDate 

Modify XenDesktop Desktop Catalogs and Desktop Groups

Set the PeakBufferSizePercent value of a desktop catalog named “Windows 7 64-bit External Random to 100%:
Set-BrokerDesktopGroup "Windows 7 64-bit External Random" -PeakBufferSizePercent 100

Set the PeakBufferSizePercent value of all desktop catalogs to 90 percent:
Get-BrokerDesktopGroup | Set-BrokerDesktopGroup -PeakBufferSizePercent 90

Set the PeakBufferSizePercent value of all desktop catalogs that begin with “Windows” + <anything in between> + 7 + <anything after> to 80 percent:
Get-BrokerDesktopGroup -Name Windows*7* | Set-BrokerDesktopGroup -PeakBufferSizePercent 80

I’ll append to this post as I find more in my notes.

Where is the “Machines to be powered on” option in Citrix XenDesktop 5.5’s “Edit Desktop Group” menu?

I’ve been asked a few times by a few ex-colleagues why they can’t seem to find the option for the amount of Machines to be powered on in Citrix XenDesktop 5.5’s Edit Desktop Group menu when configuring their Desktop Groups that machine their Pooled Static assigned pools:

image

image

The answer is actually quite simple:

“This option is not available for pools that are statically assigned.”

This option only exists for randomly assigned desktop pools where you can define the number of machines or the percentage of machines:

image

imageimage

It takes a bit of time to get the head wrapped around it but the reason why this option does not exist for statically assigned pools is because statically assigned pools are 1 to 1 or 1 (user) to x (desktops) mappings.  Each virtual desktop or desktops are assigned to a specific user.  There will be times that a user may have more than 1 but once a desktop gets assigned to a user, it stays mapped until you perform a refresh but updating the virtual desktop image.  This means that XenDesktop can’t possibly know which desktops to boot up because any user could be logging on after hours.

I’ll be writing another blog post soon to talk more about power management options for XenDesktop statically assigned pools and how to manage them.

Monday, February 20, 2012

Configuring Citrix NetScaler VPX (1000) 9.3 to redirect requests from http to https when publishing your Web Interface server

To follow up with my previous post:

Configuring Citrix NetScaler VPX (1000) 9.3 for publishing Web Interface server access by authenticating against Active Directory

One item I forgot to include was how to redirect http to https.  So say the user tries to access http://citrix.someDomain.com, the configuration shown in my previous post would throw a page cannot be displayed because the NetScaler is not configured to respond or do anything with the request.  This is probably not a sufficient configuration for an enterprise environment because end-users may not know the difference between http and https which means if they get a page cannot be displayed message, they may just assume that the site is down.

Reconfiguring the redirect is actually quite simple, begin by logging onto your NetScaler VPX’s administration page, expand the Load Balancing node and click on the Virtual Servers node:

image

Next, right click on the Virtual Servers node and click the Add option:

image

Type in a meaningful name in the Name field such as HTTP Redirect to HTTPS and fill in the IP Address field with the same VIP that you used for your HTTPS virtual server:

image

Proceed with clicking on the Advanced tab and type in the full external URL you’re using for remote users to access the login web page:

image

Click on the Create button and you’ll be brought back out to the where you’ll notice the new virtual server’s status as being Down.  This is expected behavior and when requests come into the NetScaler VPX gateway via HTTP to this IP, it will know to redirect it over to the https URL:

image

Proceed with testing the remote link via http and you should now see the portal get redirected to https:

image