• Category Archives PVS
  • DHCP on Nexus 7k not working with Netflow enabled

    Recently I ran into an issue that was quite perplexing.

    Issue: DHCP does not work on the Nexus 7k with Netflow enabled

    Symptoms: DHCP not handing out addresses (Citrix Provisioning Environment using DHCP + TFTP options in scope).
     
    Not everyone runs DHCP in their datacenter server based networks but in VDI or End User Computing envornments running Citrix, VMware or other solutions this is a common practice so you may run into this issue if Netflow is enabled.

    Workaround: When you remove the ip monitor netflow input, you need to bounce the l3 interface to take a effect.

    Fix: This is fixed in an upcoming release, see the Bugfix below for more details.

    Cisco Bugfix Report (requires login)

    Cisco Forum post on issue

     


  • Varrow Madness Part 2: Citrix Provisioning Server Implementation and Best Practices

    My session at Varrow Madness covered Citrix Provisioning Services (PVS) Implementation and Best Practices. I have always been a big fan of this product even before Citrix purchased Ardence which would become Provisioning Services. The ability to stream the server OS over the network and the flexibility that this product gives you is amazing. Even smaller environments can benefit from the advantages of Provisioning Services.

    My session summarized many of the guides, Citrix articles as well as my own personal experiences with Citrix PVS over the years. I will also include the resources at the end of this post. I personally have installed, managed and configured PVS in environments ranging from a handful of servers up to 10000+ desktops with multiple sites including DR environments.

     

    While I have been in IT for many years and spoken in many difference situations from board rooms to conference rooms with co-workers and executives, there is something different about public speaking.Varrow Madness was a first for me in more than one way, not just my first Madness but it was also my first professional speaking role.

    I have prepared for public speaking over the years in many ways. I knew this was something I always wanted to tackle as I have considered submitting for sessions at various technical conferences. At a previous company I got involved in the public speaking organization Toastmasters which really helped me prepare for this moment. I can’t say I was completely prepared for this but I think it went well. The session ended on time but the questions continued right into the next session 🙂 Which I thought was awesome.

    I highly encourage anyone to take a chance and give public speaking or something that scares you a chance. Fear is OK, letting it control you is not.


    “Do one thing every day that scares you” – Eleanor Roosevelt

    Citrix PVS Resources


    I plan to do more posts around Provisioning Services and a few instructional videos as well. As always I welcome any questions and comments that you have below regarding this or any topic.  
     
     


  • Tool: Citrix PVSDataTools 1.2.2

    Citrix announced the release of a tool from the Citrix Provisioning Server Escalation team, Citrix PVSDataTools 1.2.2 This looks like it may be another solid tool for assistance with Citrix PVS troubleshooting. There are two tools included in this set. One to gather the data and one to analyze the results.

    • PVSDataCollector 
    • PVSDataParser

    PVSDataCollector
    The PVSDataCollector collects the following information from the PVS Server:

    • System Information
    • Windows Event Logs
    • TCP and UDP Port Information
    • PVS Logs (Entire Directory)
    • PVS Configuration Files
    • PVS Data (that is farm, server, collection, device, disk, site and store information)

    PVSDataParser
    The PVSDataParser is used to view the following data collected from the PVSDataCollector:

    • System Information
    • TCP and UDP Port Information
    • PVS Logs
    • Basic PVS Overview

    The PVSDataParser does not parse Windows Event Logs and dump files. Manual parsing is required for data of this type.

     
     

  • XenServer 6.1 Hotfixes w/ PVS and Guest Blue Screen fixes

    Recently I blogged about the XenServer 6.1 issues that Citrix announced here for customers facing blue screens and other issues such as

    • Add PVS support in XS 6.1
    • Resolve intermittent grey screen on Windows Server 2003
    • Resolve intermittent blue screen on VM migration
    • Resolve intermittent blue screen after attempting VM shutdown
    • Reinstate support for VSS shadow copy services

    Citrix has announced two hotfixes that should resolve these issues that should be applied in order to resolve the above issues.

    Hotfix XS61E009 – For XenServer 6.1.0 

    This is a hotfix for customers running XenServer 6.1.0. This is the first part of a two component fix, customers should install CTX136253 – Hotfix XS61E010 – For XenServer 6.1.0 after installing this hotfix.

    Issues Resolved In This Hotfix

    1. Virtual Machines (VMs) with out of date XenServer Tools, may not be flagged as “out of date” in XenCenter. This hotfix resolves this issue and enables customers to be notified in XenCenter when new XenServer Tools are available.
    2. Booting a Citrix Provisioning Services (PVS) target device using a Boot Device Manager (BDM) image can take an extended time to complete. This hotfix resolves this issue.

    Hotfix XS61E010 – For XenServer 6.1.0 

    This is a hotfix for customers running XenServer 6.1.0. This is the second part of a two component fix, customers must install CTX136252 – Hotfix XS61E009 – For XenServer 6.1.0 before attempting to apply this hotfix.
    Important:

    • Before installing this hotfix, customers who have previously referred to CTX135099 – XenServer Tools Workarounds for XenServer 6.1.0 for workaround instructions should review it again as it contains updated content.
    • After applying this hotfix, customers should upgrade the XenServer Tools in each Windows Virtual Machine (VM). See the section, Upgrading XenServer Tools in VMs later in this article.
    • Customers should upgrade the XenServer Tools before configuring the network settings on VMs.

    Issues Resolved In This Hotfix

    This hotfix resolves the following issues:

    1. Customers using XenServer Platinum Edition to license Citrix Provisioning Services (PVS) may find that one PVS license per VM is checked out, rather than one PVS license per XenServer host. This may lead to a shortage of PVS licenses and an inability to provision VMs. Installing this hotfix along with CTX135672 – Hotfix CPVS61016 (Version 6.1.16) – For Citrix Provisioning Services 6.1 – English resolves this issue.
    2. Attempts to shut down Microsoft Windows Vista and later VMs can cause intermittent blue screen errors, with a "STOP: 0x0000009f..." error message.
    3. Adding more than eight NICs to Microsoft Windows Vista and later VMs, using the xe CLI can lead to a blue screen error on reboot.
    4. Copying data to a Microsoft Windows 2003 VM can cause the VMs to hang and lead to a grey screen error.
    5. When Dynamic Memory Control (DMC) is enabled, attempts to migrate Microsoft Windows XP and later VMs using XenMotion can cause the VMs to hang and lead to blue screen error.
    6. When the Citrix Xen Guest Agent service is running, Cut and Paste will not work between a XenDesktop virtual desktop and the endpoint device.
    7. Microsoft Windows XP and later VMs may hang during the boot process and may have to be forced to reboot.
    8. Attempting to install or upgrade the XenServer Tools on Microsoft Windows Vista and later VMs, which do not have access to a paravirtualized or an emulated network device can cause the installation process to hang.
    9. Manually installing the Legacy XenServer Tools without changing the device_id to 0001 can result in a "STOP: 0x0000007B..." error when rebooting a Windows VM. After installing this hotfix, customers will not be able to manually install the Legacy XenServer Tools by running xenlegacy.exe. When customers start the XenServer Tools installation process, the installwizard.msi will be launched automatically.
    10. Microsoft Volume Shadow Copy Services (VSS) (required for third party backup solutions) was unavailable on Microsoft Windows Server 2008 in the original version of XenServer 6.1.0. After installing this hotfix, XenServer 6.1.0 customers will be able to take quiesced snapshots on Microsoft Windows Server 2003 and Windows Server 2008 VMs. Note VSS is not supported for Windows Server 2008 R2.

    In addition, this hotfix also contains several usability and performance improvements


  • Powershell XenApp Deployment Wizard v1

    Ever wanted an easier way to deploy XenApp machines en mass? Well have I got a treat for you.

    XenDesktop has an easy way to deploy virtual machines from Citrix Provisioning Server (PVS) but XenApp with PVS is missing this component making deploying virtual machines sometimes a very tedious task. I want to make that easier for myself, I mean the community :). I have began working on a script with another engineer and friend that should ease that pain. This script is only a v1 with future versions to support other hypervisors and remove some of the manual ad nauseum type work on large deployments.

    Currently the script is designed to do the following.

    Prerequisites:

    1. You will need to create two files currently placed in the root of C: (paths and files can be changed) 
      1. One file will contain a list of servers (servers.txt) and the other the list of ip addresses (ips.txt) Match up the lines in each file so the server and IP match up.
    2. You will need to run this script from the Provisioning Server
    3. Download and configure the Following Powershell Snap Ins
      1. XenServer Powershell Snap-IN
        1. Download XS-PS Windows installer
      2. Configure the PVS Powershell MCLI snap in
        1. The snapin comes with the Provisioning Services Console. To use the snapin, you have to first register it (requires .Net framework). If your Windows is 32bits, use this command: 
          1. “C:WindowsMicrosoft.NETFrameworkv2.0.50727installutil.exe” “C:Program FilesCitrixProvisioning Services ConsoleMcliPSSnapIn.dll” 
        2. For 64bits: “C:WindowsMicrosoft.NETFramework64v2.0.50727installutil.exe” “C:Program FilesCitrixProvisioning Services ConsoleMcliPSSnapIn.dll” 
        3. If you encountered error, make sure that you are running the Command Prompt as administrator. 
        4. Once registered, start a PowerShell console and add the snapin using “add-PSSnapIn mclipssnapin”. The main cmdlets are mcli-run, mcli-get, mcli-set and mcli-delete. To get a detailed help on the cmdlets, use mcli-help.

    Once you have completed the prerequisites you can run the script. The script is currently designed to do the following.

    1. Enter variables needed for script to run and confirm settings
    2. Create XenServer VMs based upon servers identified in c:servers.txt from template
    3. Create c:macs.txt listing all Mac addresses for each XenServer VM created from servers.txt
    4. Add IP MAC Reservations to primary Microsoft DHCP Server
    5. Add Devices to Citrix PVS server in appropriate collection and Site
    6. Export IP Mac Reservations from primary Microsoft DHCP server to Secondary DHCP server

    As this script is a v1 it is making a lot of assumptions and I plan on building more logic and support for various configurations into the script. If you have any ideas or suggestions, please leave me a comment or contact me.

    Upcoming Features

    • VMware Support

    ##########################################################################
    # XenApp PVS Deployment Wizard
    # This script is designed to help deploy XenApp machines en masse to a XenApp Farm using XenServer and Microsoft DHCP
    # XenApp_Wizard_v1.ps1 script written by Phillip Jones and David Ott
    # Version 1.0
    # This script is provided as-is, no warrenty is provided or implied.
    #
    # The author is NOT responsible for any damages or data loss that may occur
    # through the use of this script.  Always test, test, test before
    # rolling anything into a production environment.
    #
    # This script is free to use for both personal and business use, however,
    # it may not be sold or included as part of a package that is for sale.
    #
    # A Service Provider may include this script as part of their service
    # offering/best practices provided they only charge for their time
    # to implement and support.
    #
    # For distribution and updates go to: http://www.wwwp2vme.com
    ##########################################################################

    add-pssnapin xenserverpssnapin
    add-pssnapin mclipssnapin

    # Variables Section – This will define the variables that the script requires in order to create the VMs in DHCP, PVS and XenServer

    $sitename = Read-Host “Enter the PVS Site Name.”
    $collectionname = Read-Host “Enter the PVS collection name.”
    $xenserver = Read-Host “Enter the XenServer host name to connect to.”
    $XSBase = Read-Host “Enter the base VM to copy. (Case Sensitive!)”
    $SR = Read-Host “Enter the storage repository name. (Case Sensitive!)”
    $pdhcpip = Read-Host “Enter the IP address of the primary DHCP server.”
    $sdhcpip = Read-Host “Enter the IP address of the secondary DHCP server.”
    $pdhcpscope = Read-Host “Enter the DHCP scope (ie:10.xxx.xxx.0).”

    ” “
    “Please confirm before continuing.”
    ” “

    “PVS Site Name: “+$sitename
    “PVS Collection Name: “+$collectionname
    “XenServer: “+$xenserver
    “Base VM: “+$XSBase
    “Storage Repository: “+$SR
    “Primary DHCP IP: “+$pdhcpip
    “Secondary DHCP IP: “+$sdhcpip
    “DHCP Scope: “+$pdhcpscope

    $n = ([System.Management.Automation.Host.ChoiceDescription]”&No”)
    $n.helpmessage = “No, exit script”
    $Y = ([System.Management.Automation.Host.ChoiceDescription]”&Yes”)
    $y.helpmessage = “Yes, continue script”
    $YN= ($Y,$N)

    Function Prompt-YesNo ($Caption = “Confirm”, $Message = “Do you want to continue?”,$choices = $YN)
        {
            $host.ui.PromptForChoice($caption,$Message,[System.Management.Automation.Host.ChoiceDescription[]]$choices,1)
        }

    $answer = Prompt-YesNo
        if ($answer -eq 0) {“Continue”} else {Exit}
            Connect-XenServer -server $xenserver
            cmd /c if not exist c:csv md c:csv
        if (Test-Path c:macs.txt) {remove-item c:macs.txt}
            $vmnames = get-content c:servers.txt
            $ips = get-content c:ips.txt
            Remove-Item c:csv*.*

    # Xenserver – create VMs then pull MAC addresses for each and append c:MACs.txt

    foreach ($vmname in $vmnames)
        {
        Invoke-Xenserver:VM.Copy -VM $XSBase -NewName $vmname -SR $SR
            $vifs = Get-XenServer:VM.VIFs -VM $vmname
            $vmname | Out-File c:CSVVMs.csv -append -Encoding ASCII
            $vifs.mac | Out-File c:MACs.txt -append -Encoding ASCII
        }

    # MAC Translations – Required for DHCP and PVS as MAC formats are different for each program
    # PVS MAC MCLI input format
    Get-Content c:MACs.txt | ForEach-Object { $_ -replace “:”, “-” } | Set-Content c:csvMDevice.csv

    # DHCP MAC input format
    Get-Content c:MACs.txt | ForEach-Object { $_ -replace “:”, “” } | Set-Content c:csvMDHCP.csv

    # Obtain IP addresses from ips.txt file
    Get-Content c:ips.txt | Set-Content c:csvips.csv
        $num = 0
        $items = get-content c:csvvms.csv

    # DHCP and Citrix PVS
    foreach ($item in $items)
        {
            $server = get-content C:csvVMs.csv | Select-Object -Index $num
            $mdhcp = get-content C:csvMDHCP.csv | Select-Object -Index $num
            $ip = Get-Content C:csvips.csv | Select-Object -Index $num
            $mdevice = Get-Content C:csvMDevice.csv | Select-Object -Index $num
            “Dhcp Server \”+$pdhcpip+” Scope “+$pdhcpscope+” Add reservedip “+$ip+” “+$mdhcp+” “+”`”$server`””+” “+”`”`””+” “+”`”DHCP`”” | Out-File c:csvprimdhcp.txt -append -Encoding ASCII
            “Dhcp Server \”+$sdhcpip+” Scope “+$pdhcpscope+” Add reservedip “+$ip+” “+$mdhcp+” “+”`”$server`””+” “+”`”`””+” “+”`”DHCP`”” | Out-File c:csvsecdhcp.txt -append -Encoding ASCII
    # Citrix PVS add device to Site and Collection
            Mcli-Add Device -r siteName=$siteName, collectionName=$collectionName, deviceName=$server, deviceMac=$mdevice
            $num = $num + 1
        }

    “@Echo Off” | out-file c:csvdhcpimport.cmd -encoding ASCII

    #DHCP – This will export the settings of the DHCP reservations added above
    “netsh exec c:csvprimdhcp.txt” | out-file c:csvdhcpimport.cmd -append -encoding ASCII

    #DHCP – This will import the reservations on your secondary Microsoft DHCP server
    “netsh exec c:csvsecdhcp.txt” | out-file c:csvdhcpimport.cmd -append -encoding ASCII
    “echo Please verify all objects have been created successfully” | out-file C:csvdhcpimport.cmd -append -encoding ASCII
    “pause” | out-file C:csvdhcpimport.cmd -append -encoding ASCII
    Remove-Item c:csv*.csv
    cmd /c C:csvdhcpimport.cmd


  • Shrinking VHD Files for Xenserver and Citrix PVS

    A question that often comes up when working with Dynamic vDisk when using Citrix Provisioning Server is does PVS automatically shrink the vDisk or is there a built in method to compact them. Citrix PVS does not have a way to do this automatically but with a few steps this can save some disk space on your storage.

    ** Update: 9/23 You can find the PowerShell script to Shrink VHD files here

    A good use case is lets say you clean up your images and remove old programs, installation files and things you no longer need, you will notice the file size does not go down. In order to maximize your storage investment, you want to keep these images as small as possible so you can do this on a regular basis.

    This method can also be used to shrink any VHD files which are used by Hyper-V, Citrix PVS, and you can even configure Windows 2008 and Windows 7 to use VHD files.

    Basic steps

    1. Make a copy of the VHD file that you have to compact 
    2. Open Server Manager
    3. Expand Storage
    4. Right-click on Disk Management on the server.
    5. Select Attach VHD.
    6. Select the required VHD File (The VHD appears as a volume on the server.)
    7. Defragment the drive for performance and storage optimization. (After defragmentation and optimization, the data on the VHD is now all at the beginning of the disk and defragmented.)
    8. Detach the VHD from within Disk Management. (Ensure that you do not delete the VHD when you are detaching the VHD.)
    9. Run the DISKPART command from a command Window.
    10. Run the following commands, substituting the path to your VHD file
      1. select vdisk file =”c:pathvdisk.vhd”
      2. attach vdisk readonly
      3. compact vdisk
      4. detach vdisk 
      5. exit

    Coming soon I will write a script that will execute against a folder and compact all VHD files in the folder. Keep an eye out here for that script 🙂