Set acls remotely to a VDI / RDSH Delivery Group 7 Comments

In the same way as the previous blog post, some more automation to maintain a VDI/RDSH environment, and get back to a controlled and clean environment. This blog is a follow up to Remotely clean up Virtual Machines drives – XenDesktop , Expand virtual machines hard disk – automation , XenDesktop XenApp 7.x – vmware / ad / delivery group notes and descriptions sync . I had to automate an action to place ACLs on the D: drive using Powershell and icacls. This script is using XenDesktop / XenApp command to list all the Virtual Machines with SessionSupport value equal to SingleSession, it means the VDI only in my case. If you want to check the list of Virtual Machines you targeted you can use this command : If you want to target a specific XenDesktop Delivery Group, then just adapt the previous line : Once you know the target, you can execute the following script. Using this script assume Virtual Machines are switched on. If you have suggestion, and/or comment, share your though !

Remotely clean up Virtual Machines drives – XenDesktop 10 Comments

Following up the previous blogs XenDesktop XenApp 7.x – vmware / ad / delivery group notes and descriptions sync and Expand virtual machines hard disk – automation and continue in automated task, I had to clean up the D: drive of different XenDesktop Delivery Group. As there was no security restriction on the D: drive some users used it as a repository for some of their project... That caused some issues : Users complain of losing their working data from a session to another (pooled VDI, new logon = new vm) Some disk space notification where displayed to random users... Calls where raise to the helpdesk support team Beside hiding the D: drive to avoid non necessary access (ie : non system access) check this blog to do so : Citrix XenApp – Hiding system drives part 1/2 an automated task had to be performed to "clean" this D: drive The variable $XDDC is the FQDN of a Delivery Controler, $Exclusion is the files and folder you want to exclude from being removed. For example : the directories "logs" "pvsvm" "System Volume Information" "$RECYCLE.BIN" and the files "dedicateddumpfile.sys" "pagefile.sys" and "vdiskdif.vhdx" will be ignore from the delete process. Most of these files and directory are system protected anyway it's more to avoir error during script execution. Once you have a clear list of what you need and want to keep you can proceed to the next step.   This script will clean everything which is not in the $Exclusion list so be careful when you run the script. This script assume all the targeted VM are switched ON of course. Leave a comment bellow if you have an idea how to improve this script !

Expand virtual machines hard disk – automation 7 Comments

Sometimes, at some customers's place, with an infrastructure already in place (XenApp with PVS or XenDesktop VDI pooled with PVS) the D: drive is too small. The drive where you redirect Windows Event Logs, Logs (UPM for example and/or other applications - services) This is a drive where page file is often redirected as well and even memory dump file generated. PVS cache can also be on this drive : Cache on device RAM with overflow on Hard Disk When RAM is zero, the target device write cache is only written to the local disk. When RAM is not zero, the target device write cache is written to RAM first. When RAM is full, the least recently used block of data is written to the local Write Cache disk to accommodate newer data on RAM. The amount of RAM specified is the non-paged kernel memory that the target device consumes. Cache on device Hard Disk The cache on local HD is stored in a file on a secondary local hard drive of the device. It gets created as an invisible file in the root folder of the secondary local HD. The cache file size grows, as needed, but never gets larger than the original vDisk, and often not larger than the free space on the original vDisk. It is slower than RAM cache, but faster than Server cache and works in a HA environment. The lack of space on this drive will bring some slowness in user's session and this drive needs to be expanded a bit to get back a normal user experience. To expand these disks two actions need to be done : Expand the Virtual Machine hard disk - in this example vmware Virtual Machines Expand the disk within the Operation System (Windows) In addition to the following script, psexec tool (Microsoft Sysinternal) is used to execute remotely the diskpart command listed in a text file (diskpart.txt) which is upload to the Virtual Machines. Targeted Virtual Machines need to be powered on. Psexec.exe and Diskpart.txt needs to be in the same folder as the Powershell script, of course you can specify their path as it suits your need.   This script is using XenDesktop / XenApp command to list all the Virtual Machines with SessionSupport value equal to SingleSession, it means the VDI only in my case. If you want to check the lust of Virtual Machines…

XenDesktop XenApp 7.x – vmware / ad / delivery group notes and descriptions sync 9 Comments

Several times i had the need to synchronise Virtual Machine notes (vmware) with Active Directory Computer description. As in big environment, different team are managing each of these components, the need to be able to link an Active Directory computer account to a vm with XenApp / XenDesktop delivery group has often been seen as useful. Delivery group name : Desktop123 Virtual Machine note (vmware) : Desktop123 Active Directory account Description : Desktop123 The idea is to simply synchronise the information through the platforms so everyone knows quickly what machine does what. In this particular example that was about XenApp Servers and XenDesktop VDI. You will need a machine where : XenDesktop 7.x SDK (Powershell is installed) vmware PowerCli installed RSAT role deployed as well Thank to Rodolphe Herpeux who simplified the first version of this script I wrote.

Load Balancing TFTP with Netscaler 10.5 30 Comments

Implementing Citrix Provisioning Services (PVS) is very common nowaday when it's about deploying Shared Desktops (XenApp) or Pooled, Private or Personal Desktops (XenDesktop). If there are still some debate around about using TFTP+PXE vs using BDM (Boot Device Manager) I still observe a large number of deployment made using TFTP+PXE rather than BDM. Both of these two solution have Pro and Cons (Check Wilco's website here) and this is an architectural choice you need to plan ahead the project. Using TFTP and PXE bring several spof along the line and need to be consider and design as the most resilient as the high availability require. TFTP is not redundant by design, using the DHCP 66 options (Boot Server Host Name) allow the use of only one IP address. and there is no redundance behind that. With Citrix Netscaler, Citrix gave us the ability to bring high availability to this spof and address this issue. With Netscaler previous version (prior 10.x) that wasn't that easy to setup and the understanding of Netscaler feature like Layer 2 Mode, DSR etc... And if you didn't understand exactly everything what you were doing, all the PVS traffic was going through the Netscaler and believe me, that was really pain in the ass... I saw that kind of mistake a number of time... With Netscaler 10.1 then 10.5 things are a lot more easy... So I just jump on the occasion I had at one customer's place to load balance 4 Citrix PVS servers (TFTP + PVS) to deliver this simple and fast how to. Information you need to gather : IP Adresses and name of all PVS servers (with TFTP) One IP Adress for the Virtual Server (VIP) One or more Netscaler 10.5 (I made this configuration with 10.5.51.10.nc) Here is a basic architecture overview of component we are impacting : Netscaler #1 and #2 : This is were the configuration will take place PVS Servers #1, #2, #3 and #4 : All the PVS / PXE / TFTP servers we will use in this example DHCP Servers #1 and #2 : This is where we will configure the 66 option by using the Load Balanced IP Address (VIP) VMs : All these Virtual Machines will use PXE to boot get the Load Balanced TFTP address to launch the ARDBP32.bin file.   Let's got for the Netscaler configuration, first you need to login, if you're using a multi Netscaler architecture you…

Citrix PVS vs MCS – Despectus 21 Comments

I know this subject has been cover thousand times here and there but this is an eternal discussion we have whatever the forum or the meeting going on when we speak about Citrix. To remind people not familiar with MCS or PVS here are the main differences : MCS : Machine Creation Service PVS : Provisioning Services All the blogs, articles, white papers are very good and very technical with a lot of details but lake too often of "real life" example. Of course this is important to know  detailed performance measuring iOPs in read and write, cache mode, disk and storage type etc. but what most of the time everyone is missing is a crucial component : complexity and ability of the technical team to handle PVS and/or MCS. At many of my customers place we've implemented PVS architecture on multi-site with DFS-R and SAN / NAS etc to provision XenApp 6.5 farm lightning fast and this is every time a success when everything is setup correctly and when everything works as expected. BUT the complexity we leave behind at the customer's place leave me a though that in 70% of the case, they will call us back to fix an issue they created while trying to handle PVS and surrounding component. 20% won't call us but nothing will change, event the XenApp servers will remain in the same state as when we left. Of course writing documentation and how to for everything won't solve this issue because managing XenApp servers provisioned with PVS is complex and needs good organisation and an understanding of the product. PVS is in version 7.1 (April 2014) and haven't evolve that much during last couple of years, some say PVS will disappear with time to let MCS take over, but I honestly don't know what are the plan for Citrix about PVS. But as PVS is an awesome technology, I think Citrix will bring more and more feature to MCS and keeping the simplicity while adding feature will be an interesting chalenge. To keep this topic short (that never happen when we speak about this during CTP meetings or forums :) ) I would say for large enterprise I would continue to use PVS on the current and new deployment but put in my customer's mind the overhead of complexity could cost more than intelligent storage solution (software, hardware) and introduce few desktops (XenDesktop…

Citrix Storefront 2.1 vs WebInterface 37 Comments

The 2.1 version of Strorefront came along with XenDesktop 7.1. There are few changes in this version comparing to the previous one and on the internal architecture of Storefront Services nothing new (reminder) : So with Storefront 2.1 out since few weeks not, many people requested an updated version of my side by side comparison between the WebInterface and StoreFront, so here it is. As always, comments are welcome and sharing your experience might be useful for the others !  

Java Runtimes JRE7 – Your Java version is insecure popup 3 Comments

This one has been pain in the ass to find out... Since Java 7 (1.7_xx) the security and setting management is a total nightmare. This is so messy you can't find a reliable information on Oracle website... The worse thing is all the mechanism seems to change between versions... from 1.7_01 to _11 is one way to do thing and version after it's done another way... Here is the ugly pop up I want to eliminate from the user interface on the XenApp Desktop. To do so, I had to check every change within files, registry to finally find out everything was located in the registry for this version of java, JRE7 1.7_13... So I wanted to create a GPP to target user connected on the XenApp servers, here is my xml file created from a registry export : Next, I wanted to filter this GPP with a WMI filter, this WMI Query will look for locations of the JRE7 Folder on the System and if found it will apply the policy.   And this works ! I didn't need to do anything with deployment.properties and deployment.config as described everywhere on the Oracle website... (This website is really pain in the ass to find good documentation...) I hope it will help, and I hope Oracle will stop to change the way we need to use to manage Java configuration....

Citrix XenDesktop 7 – Create Persistent Hypervisor Connection and Hosting Unit, Unattended 13 Comments

I blogged about how to automate Citrix XenDesktop 7 deployment and database creation, and how to join and existing XenDesktop 7 site unattended, but now to continue and go a bit further in the automation process, I needed and wanted to know how to automate Hosting Configuration by Adding Connection and Resources to the DDC in an unattended way. This blog will cover creation process for XenServer 6.x and vCenter (vSphere) 5.1 since I don't have access to a Hyper-V (yet), I went over Citrix eDoc to check how I could do this and I found here : [link] Thanks to Livio for some PowerShell help :) It helps to understand whet need to be setup and after few tests I ended up writing this script to automate this part :   This script have been tested with Citrix XenDesktop7 and XenServer 6.2 and vSphere 5.1

Citrix XenDesktop 7 – Unattended from scratch 39 Comments

So auto-install and auto join an already XenDesktop 7 Site is cool but what if you need to automate the first DDC installation ? Here is how I did with help of a great blog (Timm Brochhaus) who made a script available for everyone, and I personally used it. Let's do it for a full automated installation, I will install all the components from XenDesktop 7. Timm Brochhaus wrote a very cool blog and give you the explanation about a script he wrote to automate this part with a very useful script. Juts don't forget to run this script in 32bit mode.... [link] I did use Timm's script and here is the result I got : 3 databases were created, one for the Site informations, one for the log informations and a last one for monitoring (edgesight-like) Now we are ready for the next step which is site creation with the command New-XDSite with the result : If I use the script Timm make available and use the same syntax, this is pretty easy to add this line and add what we need to automate DataBase creation + Site creation in one script : So now your XenDesktop 7 DDC is ready to work, you can launch the Desktop Studio console, you just need to create your Machine Catalogs and Delivery Groups etc... This next part of automation is in my next blog about XenDesktop 7