I just started out automating everything on my Nutanix CE cluster and discovered some problems with the unattended installation of the Nutanix AHV MCS Plugin for Citrix XenDesktop 7.9 or later. In this post I’m going to show you how to workaround the problem to be able to Automate Everything.
I started out as I always do by downloading the MSI, grabbing the URL and using the default MSI arguments.
1 2 |
$UnattendedArgs = "/i $PackageName.$InstallerType ALLUSERS=1 /qn /liewa $LogApp" (Start-Process msiexec.exe -ArgumentList $UnattendedArgs -Wait -Passthru).ExitCode |
The installation completed with the expected exit code 0 (Success) but files and folders where not created according to this Citrix eDoc article.
Next step was to open the MSI with the free ORCA MSI editor. Going through the Property rows I quickly spotted that the License Agreement was set to No. Time to test again.
1 2 |
$UnattendedArgs = "/i $PackageName.$InstallerType IAgree=YES ALLUSERS=1 /qn /liewa $LogApp" (Start-Process msiexec.exe -ArgumentList $UnattendedArgs -Wait -Passthru).ExitCode |
Still now files and folders, but I now noticed a C:\[INSTALLFOLDER]
Since the MSI log file didn’t show anything unusual I decided to uninstall and then install the MSI manually inspecting the log file in %TEMP%. I quickly discovered the missing Properties INSTALLFOLDER and REGISTERPLUGINSTOREPATH.
I don’t like extremely long Arguments so time to head back to Orca to create a custom MST file.
Open the MSI – Transform – New Transform – Add the missing Properties and finally select Generate Transform or if you’re lazy download here.
Below is the complete script that will automatically download the Nutanix AHV MCS Plugin for Citrix XenDesktop 7.9 or later MSI file and then apply the custom MST file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
Write-Verbose "Setting Arguments" -Verbose $StartDTM = (Get-Date) $Vendor = "Nutanix" $Product = "MCS Plugin" $Version = "1.1.3.0" $PackageName = "NutanixAHV-MCS-XD7_9" $InstallerType = "msi" $Source = "$PackageName" + "." + "$InstallerType" $LogPS = "${env:SystemRoot}" + "\Temp\$Vendor $Product $Version PS Wrapper.log" $LogApp = "${env:SystemRoot}" + "\Temp\$PackageName.log" $MST = "Nutanix.mst" $UnattendedArgs = "/i $PackageName.$InstallerType TRANSFORMS=$MST ALLUSERS=1 /qn /liewa $LogApp" $url = "http://download.nutanix.com/firmware/citrix/1.1.3/NutanixAHV-MCS-XD7.9+or+later.msi" Start-Transcript $LogPS if( -Not (Test-Path -Path $Version ) ) { New-Item -ItemType directory -Path $Version } CD $Version Write-Verbose "Downloading $Vendor $Product $Version" -Verbose If (!(Test-Path -Path $Source)) { Invoke-WebRequest -Uri $url -OutFile $Source } Else { Write-Verbose "File exists. Skipping Download." -Verbose } Write-Verbose "Starting Installation of $Vendor $Product $Version" -Verbose (Start-Process msiexec.exe -ArgumentList $UnattendedArgs -Wait -Passthru).ExitCode Write-Verbose "Customization" -Verbose Add-PSSnapin Citrix* Get-HypHypervisorPlugin Write-Verbose "Stop logging" -Verbose $EndDTM = (Get-Date) Write-Verbose "Elapsed Time: $(($EndDTM-$StartDTM).TotalSeconds) Seconds" -Verbose Write-Verbose "Elapsed Time: $(($EndDTM-$StartDTM).TotalMinutes) Minutes" -Verbose Stop-Transcript |
I’m pleased to share that the Nutanix AHV MCS Plugin works perfectly on Windows 2016 Server Core.
Hope you enjoyed this Quick Tip article, BTW it’s 02:43 AM in the morning…
Can you please paste the Nutanix.mst file contents
Added download link to post.