Home » xenserver

Tag: xenserver

Things discovered whilst implementing a PoC of Citrix HDX 3D Pro

Here is a non exhaustive list of things recently discovered during a PoC of Citrix XenDesktop 7.6 with Nvidia GPU Passthrough from XenServer 6.2 SP1 (i.e Citrix HDX 3D Pro) for the Oil and Gas Industry

The alternative (rather long) heading for this article should probably be “how to deliver 3d graphic intensive Oil and Gas Applications via a Citrix virtual desktop with HDX”

You could say its a general bunch of optimal Citrix Xendesktop 7.6 HDX 3D pro settings or lessons learned

  • It’s awesome and actually works pretty much out of the box!
  • A low network latency is required for uninterrupted performance – ensure you are seeing less than around 30ms from Session to Server (Use the Citrix HDX Monitor 3.x)
  • This can then easily be delivered to iPads, tablets, anything that supports the Citrix receiver which is pretty nifty!
  • Ensure you are using the latest receiver 4.2 on ALL the clients – reconnecting a session to an older client (3.x or 12.x) pretty much renders the live HDX session useless.
  • When installing the NVIDIA drivers in your VM for GPU passthrough you must ensure you have downloaded the driver version for the VM operating system (aka the Nvidia GRID Drivers for Windows 7 if using passthrough) – If you are using vGPU then you must get the NVIDIA GRID Drivers for vGPU XenDesktop
  • Driver version here was important when running applications like Petrel or EDM Landmark that call specific functions from the native GPU, they will open if the driver version is wrong, but certain functions (like seismic Picking will perform poorly, if at all)
  • Racked workstations with only one GPU (Nvidia K5000 etc)  will not be available for passthrough if they are the only video card available in the system. You must have one available for DOM0 / console. Then Xenserver will free up the NVIDIA for passthrough.
  • Of the performance testing we attempted on a host with 2.4GHZ Intel Xeon the performance for smaller resolutions (1440×900) was ok – but on larger resolutions (2560×1600) or for bigger processing – a minimum CPU in the host of 2.8 ghz (3.x better!) *A Faster CPU configuration may not work in some servers with 2 x Grid K2 cards as the power consumption of the cards themselves will be too high. Be sure of the resolutions you are trying to deliver first.
  • Ensure the host system BIOS settings are set for Max Power / Performance mode.
  • XenServer max NIC speed for a VM is 1gb, even with 10GB nic in the host.
  • By default the Citrix policies will only allow for 30fps, you need to apply a policy to increase this to aim for 60fps.
    • Read this article and walk through the settings listed by Jason Southern as they improve the performance of the Citrix session substantially
  • Ensure your VM is getting the correct amount of vCPUS from xenserver, if not you can change the cores per CPU socket via the following commands (workstations are limited to 2 cores per socket)
    • xe vm-list (find the UUID of the vm you want to fix / change)
    • xe vm-param-set platform:cores-per-socket=4 uuid=xxxxxxxxxxxxx (Set the number of available cores per socket assigned to the VM here) Citrix article here
    • Install http://support.citrix.com/article/CTX142095
  • With the right configurations and modest end client resolutions (dual screen 1440 * 900) from a Unigine Heaven Benchmark we were seeing 8min-147max fps, with an average of 65.3fps
  • With large client resolutions (dual screen 2560*1600) from Unigine heaven benchmark we were seeing 11min – 24max fps, with ave of 21.9fps

Drop us a message if you have any questions or leave comments below, we are happy to assist you with your virtualisation solutions!

Big thanks goes out to the teams at NVIDIA (Jason and Sarah) and CITRIX (Mark and John) for their assistance during this PoC – their instant access to knowledge, or – been there done that, meant all niggling issues could be sorted with a simple 30 minute phonecall!

XenCentre rolling pool upgrade greyed out

Situation: Rolling pool upgrade was greyed out for the two XenServer 6.0.2 hosts I had in a resource pool. The option to tick and select them all existed – but wouldnt ‘stick’

Solution: Simple one this one – it was more me being dense. Need to make sure your XenCenter console is first upgraded to the new version. (I though I had already performed this, but the admin machine I was on had its snapshot reverted!) The console will not tell you there is nothing to upgrade or that your xencentre needs to be upgraded.

Steps:

Upgrade XenCentre Console on my admin box to 6.x

Mount CD and setup NFS share for data / XenServer 6.x upgrade

Open the XenCentre Console and select Tools > Rolling Pool upgrade

Select the servers – FINALLY progress to the next step!

xen server pool window greyed out
xen server pool window greyed out

 

 

 

 

Connect to the XenServer console of an SDX Appliance to administer a VPX instance

Situation: We restored a ns.conf file to a Citrix Netscaler VPX running on an Netscaler SDX platform, however the device didnt come back online and the instance remained RED on the SDX interface.

Typically the ipaddress of the SDX XenServer is 1 greater than the host
By default the SDX SVM (Management Service) will be 192.168.100.1, then Xenserver hypervisor will be 192.168.100.2

Solution:
Putty to the IP address of the SDX XenServer Instance

Default
login: root
pass: nsroot

List all sessions running under xen server
xl list

Find the corresponding ID number of the VM in the display and then

xl session xx

xenserver_xllist

This will start an ssh session to the virtual device in question. Press up or enter key to begin working in the virtual console.

CTRL + ] will quit

XenServer Unable to Start VM

Problem: VM Was suspended and the ISO was still mounted. The server wasnot used for quite some time. Xenserver was rebooted 3-4 times since power off. WHen trying to resume the Suspended VM the error mesage was

“There were not servers available to start VM ‘X'”

“This VM needs storage that cannot be seen from that server.”

Citrix Solution:

http://support.citrix.com/article/CTX125248

This solution didnt fix my problem however.

Even pressing the shutdown / hardpower off guest wouldnt work as that would result in the xenconsole error of “There were no servers available to complete the specified operation”

So the catch 22 was that I couldnt EDIT the VM while it was suspended, I couldnt start it while the ISO was missing (even though it was still there) and I couldnt remove the CDROM while the system was in the suspended state. Thank you citrix.

My Not so Elegant Solution: SSH to the console of the xenserver and run the following command to hard power off the VM, then remove the CDROM, then turn it back on.

COMMAND

xe vm-reset-powerstate force=true vm=x

vm can simply match (cAsE senSitIve) the name in the XenConsole of the server.

DONE!

XenServer Mount USB from HOST

Situation: USB Drive attached to the XenServer host, need to mount directly into a VM for removable usb drive access.

Solution: Download the usbmount.bat from http://support.citrix.com/article/CTX118198

Edit the file with your xenserver details  and your vm and usb uuid’s.

HOW DO I FIND MY XENSERVER VM UUID?

bring up a console session on the XenServer and run

xe vm-list

HOW DO I FIND MY XENSERVER USB UUID?

the citrix provided command for listing Removable storage didn’t return any results in my setup.

xe sr-list name-label=Removable Storage

So under the XenServer Console > Click the Removable storage node in the console > Right click and copy the UUID Displayed

 

RUNNING THE SCRIPT

Edit the below script with your details

then run

usbmount.bat ATTACH

or

usbmount DETACH

—————————————————————————————–START SCRIPT —————————————————————————————————-

@ECHO OFF
setlocal
REM Attach a USB flash device to a specified VM on XenServer 4.x

REM ————- EDIT THE OPTIONS BELOW TO SUIT YOUR ENVIRONMENT ————-

REM XenServer Credentials
SET XE_USERNAME=root
SET XE_PASSWORD=CHANGEME
SET XE_SERVER=xxx.xxx.xxx.xxx

REM Removable Storage Repository UUID
SET REMOVABLE_SR_UUID=CHANGEME

REM UUID of the VM you wish to attach the USB storage to
SET VM_UUID=CHANGEME

REM Device name/order on the VM (e.g. hdb, hdc, hdd…)
set DEVICE_NAME=hdb

REM —————————————————————————

REM XenCenter Path
SET XE_CENTER_PATH=C:program filescitrixXenCenter

REM XE Binary and Baseline Parameters
SET XE_EXEC=”%XE_CENTER_PATH%xe.exe” -s %XE_SERVER% -u %XE_USERNAME% -pw %XE_PASSWORD%

REM Temporary working file
SET TEMP_FILE=%TEMP%/xs-usbmount.tmp

REM ———— DO NOT EDIT BEYOND THIS LINE —————-

IF “%1″==”ATTACH” GOTO ATTACH_STORAGE
IF “%1″==”DETACH” GOTO DETACH_STORAGE

REM No parameters
echo Usage USBMOUNT.BAT ^<ATTACH ^| DETACH^>
GOTO END

:DETACH_STORAGE
%XE_EXEC% vdi-list sr-uuid=%REMOVABLE_SR_UUID% params=vbd-uuids –minimal > %TEMP_FILE%
SET /P VBD_UUIDS= < %TEMP_FILE%

IF “%VBD_UUIDS%”==”” GOTO NOT_BOUND
%XE_EXEC% vbd-unplug uuid=%VBD_UUIDS%
%XE_EXEC% vbd-destroy uuid=%VBD_UUIDS%
echo.Storage Detached

GOTO END

:ATTACH_STORAGE

REM See if the storage is already bound to a VBD
%XE_EXEC% vdi-list sr-uuid=%REMOVABLE_SR_UUID% params=vbd-uuids –minimal > %TEMP_FILE%
SET /P VBD_UUIDS= < %TEMP_FILE%

IF NOT “%VBD_UUIDS%”==”” GOTO ALREADY_BOUND

%XE_EXEC% vdi-list sr-uuid=%REMOVABLE_SR_UUID% params=uuid –minimal > %TEMP_FILE%
SET /P VDI_UUID= < %TEMP_FILE%

%XE_EXEC% vbd-create vm-uuid=%VM_UUID% device=%DEVICE_NAME% vdi-uuid=%VDI_UUID% –minimal > %TEMP_FILE%
SET /P VBD_UUID= < %TEMP_FILE%

%XE_EXEC% vbd-plug uuid=%VBD_UUID%

echo.VBD UUID attached as: %VBD_UUID%
GOTO END

:ALREADY_BOUND
echo.Removable storage already attached to a VM – aborting.
GOTO END

:NOT_BOUND
echo.Storage device not bound to any VMs – aborting.
GOTO END

:END
endlocal

XenServer Tools not registering with XenCenter Host

Problem: Windows 7 Installed XENTools – but after multiple attempts and installations its still not registered in XenCenter 6.0

Also ensure the RPC Service are running.

Solution: Install .net Framework 4.0 FULL (including extended features) – http://www.microsoft.com/download/en/details.aspx?id=17851

MSCONFIG can play a part in this also – in my instance i had to restart all services (set MCSONFIG to normal) and then restop a bunch of garbage services to get this working even AFTER installing the .NET 4.0 extended framework

References: http://support.citrix.com/article/CTX130986

XenServer console resolution

Problem: The max console resolutIon of any server via XenCenter seems to be 1024×768 @ 24bit. I wanted to increase this for my console as at times this is the only way to access it.

Solution: The consoles support 1280x 768 but only @ 16bit.

Advanced Properties of the Display settings > Adapter Tab > List All Modes > Select 1280 @ 16bit colour.

Seems this is as high as it goes.

 

 

 

 

 

 

Applies: XenServer 5.6 and 6.0