Richard Parmiter

Virtualisation blog and Knowledge Base

  • You are here: 
  • Home
  • Scripts/Reg

use xe.exe to start/shutdown vm’s on XenServer

Posted on July 27th, 2010

I wanted to stress test a Citrix XenServer 5.6 computer to see how it copes with a number of simultaneou startup and shutdown requests.

I also wanted to see the IOPS passed to back end storage where the virtual machine hard drives are stored.

Rather than manually selecting the machine in XenCenter and shutting down or starting I wrote a script to perform the same action which made it a little quicker and easier when performing this task many times.

I wanted to perform the actions on a specific list of vm’s listed in a text file

List of VM’s – vm.txt

Name-of-VM1

Name-of-VM2

Name-of-VM3

Remember they are case sensitive and the same name you see in XenCenter. It can also be acheived with UUID’s of the VM’s but this is less friendly, so the names were used.

Startup VM’s

This is a simply dos batch script

set XenServer=[server name or IP]
set XenUser=[username]
set XenUserPwd=[password]

for /F %%1 in (vm.txt) do (
start “start %%1″ “c:\program files (x86)\Citrix\XenCenter\xe.exe” -s %XenServer% -u %XenUser% -pw %XenUserPwd% vm-start name-label=%%1
)

I have used the start command to open a seperate dos box for each VM so they are done in parallel. Without this the command waits for each VM to start before starting the next one. Running them all in parallel is *much* better for a stress test of a boot storm simulation!

Shutdown VM’s

set XenServer=[server name or IP]
set XenUser=[username]
set XenUserPwd=[password]

for /F %%1 in (vm.txt) do (
start “shutdown %%1″ “c:\program files (x86)\Citrix\XenCenter\xe.exe” -s %XenServer% -u %XenUser% -pw %XenUserPwd% vm-shutdown name-label=%%1
)

I will no doubt be working on some updates to these scripts in the near future and will share them soon.

Tags: , , , , , ,
Filed under Citrix XenServer, Scripts/Reg | No Comments »

Using Settings.sol to set Adobe Flash Settings

Posted on March 21st, 2010

When using Adobe Flash to access old content that was coded on previous versions, a message can appear stating that Flash has stopped a potentially unsafe operation. This message could also appear for content running from network shares. The message will be similar to:

If you select the ‘settings’ options the web based Adobe Global Setting panel appears. This actually connects via the internet to a macromedia.com site.

It seems strange that you must connect to an external web site to change settings for a locally installed version of flash – hopefully Adobe will remove this nonsense in the future and release an adm template or something instead. Anyway, each client can set options within this Global Security Settings screen. In this can either the “always allow” option can be selected or a location can be added to the trust list.

Select to Edit Locations | Add location and paste in the value prompted by the gui as this is what was just denied. Or add any other location you want to trust:

Close this web site, relaunch the content and it should now work as expected and display the content without the pop-up warning message.

However, in a situation where multiple clients need to run this content it is inconvenient to ask the users to set this themselves or manually set it on thousands of desktops.

Instead the settings.sol file can be used.

Any of the settings chosen from the web page GUI will be set in the following file (for a WinXP profile)

%userprofile%\Application Data\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys\settings.sol

So to resolve for everyone do the following:

  • Logon as one user
  • Set the relevant options in the web based GUI
  • Copy the settings.sol file to a central location
  • Set a logon scripts to copy this file into each users profile at logon

job done.

Tags: , , , , , , , ,
Filed under Applications, Scripts/Reg | No Comments »

Profiling Adobe Acrobat Reader 9.2

Posted on October 21st, 2009

In order to profile Adobe Acrobat Reader 9.2 for Citrix streaming I did the following.

Stage 1 – Download source files

Download and install the Adobe Customization wizard 9

Download the distribution version of Acrobat reader 9.2. You need to register on the adobe site to get access to this download.

Extract the msi from the .exe that was downloaded by running the following

AdbeRdr920_en_US.exe” -nos_ne -nos_o”Extracted”

This will place the extracted files in the “Extracted” folder

Stage 2 – Create a customised installation

Open the customization wizard

Open the Reader msi (extracted above)

Select the options desired. I chose the following:

Supress display of EULA

Remove acrobat.com features

disbale all updates

disable help | Digital editions

Disable product improvement programs

Disable help | Purchase acrobat

Save the customisation MST file

Stage 3 – install

Create a .cmd file that contains the install string including the MST file. For example:

msiexec /i “acroread.msi” TRANSFORMS=”adobe_9_2_transform.MST”

Launch this .cmd file from the Citrix Streaming Profiler

Install as normal

Stage 4 – Add a pre-launch script

Even though the option to disable updates was selected during the customisation wizard, it is not disabled when streaming the app. The same applies to the customer improvment program.

The best way to remove these is to run a pre-launch script to set the reg keys to remove these options.

Create a .vbs script with the following contents

Set objWshShell = CreateObject(“WScript.Shell”)
objWshShell.RegWrite “HKLM\Software\Adobe\Adobe ARM\1.0\ARM\iCheck”, 0 ,”REG_DWORD”
objWshShell.RegWrite “HKCU\Software\Adobe\CommonFiles\Usage\Reader 9\OptIn”, 0 ,”REG_DWORD”

Call this script as a pre-launch script within the streaming profiler.

..

Tags: , , , , , , , ,
Filed under Citrix XenApp, Scripts/Reg | 3 Comments »

Remove the Network icon from the systray – Windows 2008

Posted on September 10th, 2009

Windows 2008 has some icons that appear in the systray by default. The network icon is an example that appears even in a terminal server or Citrix session, as shown:

It is un-necessary clutter that would be best to remove in the terminal server session. However, there is no Group Policy option to do this in a Windows 2003 domain.

The following registry keys are available and can be used to remove all the systray icons:
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\HideSCAVolume
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoAutoTrayNotify
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\HideSCANetwork
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoTrayItemsDisplay
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\HideClock
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\HideSCAPower

These can be added as a REG_DWORD and set to 1 to enable the setting.

They can also be added to the HKCU hive if required.

Tags: , , , , , , , ,
Filed under Scripts/Reg, Windows 2008 | No Comments »

Using Web Interface 5.x to send the full UPN username to a RADIUS server

Posted on September 2nd, 2009

Situation

Web Interface 5.1 (or 5.x)

Two factor authentication server is RADIUS

All user accounts use the full UPN name to login (i.e. user.name@domain.com)

Problem

By default, Web Interface does not send the full UPN username to the RADIUS server, so the two factor authentication fails.

Resolution

The following file needs to be edited to force Web Interface to send the full UPN username to the two factor authentication RADIUS server.

C:\Inetpub\wwwroot\Citrix\RADIUS\app_code\PagesJava\com\citrix\wi\pageutils\TwoFactorAuth.java

The method that requires changing is public static String getUserName(UPNCredentials token, boolean fullyQualified) at line 131

it should be changed to be:

public static String getUserName(UPNCredentials token, boolean fullyQualified) {

/*if (fullyQualified) {

return token.getShortDomain() + “\\” + token.getShortUserName();

} else {

return token.getShortUserName();

}*/

return token.getUserIdentity(); // This returns the full UPN as entered by the user

}

Web inteface 5.1 will now send the full UPN name to the RADIUS server.

References

Previous versions of Web Interface have different files that need to be edited.

Web Interface 3.x

Web Interface 4.x

Tags: , , , , , , , ,
Filed under Citrix Web Interface, Scripts/Reg | No Comments »

Ads

Ads