Author Archives: Mike Meyer

Citrix System Monitoring Agent Service is stuck "Stopping" or Failing to Run



You notice problems with the EdgeSight agent and/or database reporting, such as:

1)  real time data is not available from the endpoint/agents

2)  the 'citrix system monitoring agent' service is not running, or stuck in a 'stopping' mode

3)  you see the error message in the event log reporting "The Citrix System Monitoring Agent has detected that the database is potentially corrupt. Database maintenance and restart will be attempted."


Potential Solution:

1)  Ensure that your anti-virus solution settings are properly set.   This problem can occur when AV is scanning the local EdgeSight .exe's, log files, or on the EdgeSight servers.

2)  The following Citrix articles may help:


Recommended AV Settings for EdgeSight:


Additional information:



XenApp IMAService Failed: "Error while connecting to database….login failed"



IMAService fails to start with the following error:

Citrix XenApp failed to connect to the Data Store. ODBC error while connecting to the database: 37000 -> [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database "MF20" requested by the login. The login failed.


Check to see if account used to connect to SQL database credentials/password has recently changed. This may be a username/password issue.

To input new credentials on server, execute the following command:

DSMAINT CONFIG /USER:<domain>\<username> /pwd:<password>

After executing this command, restart the IMA service on the XenApp server, and re-check services.



How to Change/Move the SQL Database Location for an EdgeSight 5.x Server


Part 1:

Procedure for Moving the EdgeSight Database


1. On the EdgeSight Web server system, perform the following steps to shut down critical EdgeSight processes:

a. In the Control Panel's Services interface, locate and stop the Citrix RSSH Admin Service.
b. Using the Internet Information Services (IIS) Manager tool, stop the EdgeSight Web site.

2. On the current SQL Server system, backup the existing EdgeSight database. This can be done using the SQL Enterprise Manager (SQL Server 2000) or the SQL Server Management Studio (SQL Server 2005). See">Backing Up and Restoring Databases in SQL Server for additional information.

3. On the new SQL Server system, create a new database called EdgeSight. Using the tools in step 2, restore the .bak file to the newly created EdgeSight database.

4. Create the esuser windows logon account within the new SQL Server system. The tools mentioned in Step 2 can be used to accomplish this. This account should be given full dbo rights to EdgeSight database.

5. On the existing EdgeSight Web Server computer, locate the web.cfg file, which is located in the \Program Files\Citrix\System Monitoring\Server\EdgeSight\Pages folder by default. You must edit the SQL connection string used by EdgeSight. To do so:

a. Locate the web.cfg file.
b. Create a copy of this file.
c. Edit the original and locate the <connectionStrings> tag. Edit the tag and enter the name of the new SQL Server system. Look for the Data Source= and Database. For example, if the new server is called MyNewSQLServer and the new database is called NewEdgeSight, then the line would read Data Source=MyNewSQLServer;Database=NewEdgeSight
d. Save the web.cfg file.

6. Navigate to the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\System Monitoring\Server\EdgeSight\4.0\Config

Modify the ZTECH_CONNECTION data value to reflect the same information as in step 5 above.

On 64-bit servers, the registry key is:

HKEY_LOCAL_MACHINE\SOFTWARE\WOW64Node\Citrix\System Monitoring\Server\EdgeSight\4.0\Config

7. Restart the Citrix RSSH Admin Service and run IISRESET from the command prompt.

Note:  This information taken from


Part 2:


Procedure for Updating the Reporting Services Database


If you moved the Reporting Services Database to another location, you will also have to perform the following additional steps.

From the EdgeSight Server:

1. Run Report Services Configuration Manager

2. Connect/Log In to your instance

3. Select Database / Change Database

4. Select 'Choose an Existing Report Server Database'

5. Enter proper credentials & complete this wizard

From within EdgeSight:

1. Log into EdgeSight

2. Navigate to Configure Tab / Reporting Services / Report Server

3. Re-enter the password/credentials under 'Data Source Credentials'

4. Save Changes



Screen Flicker in Internet Explorer within XenDesktop Sessions



When scrolling and doing mouse-overs in Internet Explorer (IE) frames or pages, within a Windows XP XenDesktop session, screen flicker is seen.



You need to enable the following key in the registry:

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main

Value Name: "Force Offscreen Composition"

Data Type: DWORD

Value: 1

The following registry tweak forces off screen composition within Microsoft Internet Explorer 5 and above. This tweak will prevent against screen flicker when you view a web page that contains animated content.

For more information, see the following Citrix article:



Memory Recommendations for Citrix Provisioning Servers (PVS)



How much memory should I install in my Provisioning Servers?


The basic formula Citrix recommends is this:

2 GB + (2 GB * #vDisks)

For more detailed information regarding memory allocation & recommendations, see the document "Advanced Memory and Storage Considerations for Provisioning Services"


Recommended Reading:



Virtual Machine in XenServer Will Not Shut Down or Start; Stuck/Frozen Starting/Stopping


If you’ve worked with XenServer for any length of time, you have no doubt experienced having a VM turn “orange” or “amber” or otherwise become unmanageable.  Here are couple of similar problem scenarios and solutions that might help.


Problem Scenario #1:

You notice that a VM has numerous lifecycle events on a XenServer.  It has continuously attempted to shutdown, but remains in the green/on state.  The VM will not display a console, or POST information.   Manual shutdowns in XenCenter do not work (Shutdown or Force Shutdown).


You may have success trying some of these ideas, or it may take a combination of these to obtain control of the stuck VM.

  1. Start by trying an ‘xe-toolstack-restart’ on the pool master server.   This is the easiest fix, and will work a majority of the time.   You will lose connection to your pool momentarily.  If this doesn't work, go onto the next steps listed below.
  2. If this is a XenDesktop hosted VM, put the VM in maintenance mode, if you cannot force a Start/Shutdown from the DDC
  3. From the XenServer console, try the following command to force a shutdown:  ‘xe vm-shutdown –force vm=VMNAME’.  If VM does not shutdown with this command, proceed to next step
  4. In XenCenter, once the above two items are done, attempt to "Reboot" the VM. It may restart now.

Related Issue:

I experienced a similar issue where all members were down in a XenServer pool, but the pool Master remained up and functional.  The 'toolstack' processes were not running on pool members. An ‘xe-toolstack-restart’ was required on each pool member XenServer before the server would appear functional and participate in the XenServer Pool.


Problem Scenario #2:

This is the most common scenario you will see.  A virtual machine will go into an “amber” or “orange” state and you are unable to shutdown, reboot, or even forcefully reset the VM.



  1. Find the UUID of the hung VM.
    You can do this via the command line with ‘xe vm-list’ or via XenCenter.
  2. Find the Domain ID of the hung VM.
    Run ‘list_domains’ from the command line, and match the UUID with the ID number



    id |                                 uuid |  state
    0  | 2fe455fe-3185-4abc-bff6-a3e9a04680b0 |    R
    47 | 267227f3-a59e-dafe-b183-82210cf51ec4 |    B
    59 | 298817fb-8a3e-7501-11e0-045a8aa860ff |    B
    60 | 46e3d5aa-2f02-dfdc-b053-9a8ac56ec5d1 |    B
    61 | 16cf3204-eb17-5a12-e8d0-c72087bda690 |    B
    62 | 1f9053b5-c6ca-40bb-504e-3017c37e7281 |    H
    63 | ddaec491-097a-e271-362b-f2f985e26e4a |    R
    65 | 55f3b225-4f65-d1ea-aa19-add44c5acce7 |    B
    66 | 7adef6fd-9171-5426-b333-6fb1b57b8e60 |    B H
    67 | 6046dc13-f70b-8398-56fb-069c22440a7c |    B
    68 | f201cd94-a501-00c2-d21e-8c2f03ea167b |    B H

  3. Run destroy_domain on the Domain ID.


    # /opt/xensource/debug/destroy_domain -domid 62

  4. The VM will still show itself as running, so now, we need to reboot it.


    # xe vm-reboot name-label='name of the VM' –force

  5. The VM is now rebooted, and you can bring it up as if you had just pulled the plug.  That is, check for some disk corruption, etc.






XenServer NIC Status Shows "Disconnected" in XenCenter Despite Known Physically Active/Connected State


When viewing a XenCenter host's NICs in the NIC tab, you may notice that some network interface cards display themselves as "Disconnected". You believe these interfaces are indeed connected to the physical network.  What to do?


1) Double check physical network connection, ensure physical connection/link at the switch level – ensure this is not a bad patch cable, or physical cabling issue

2) You can easily view Ethernet interfaces in XSconsole to verify which interfaces are listed as "disconnected" eg. "eth4", "eth1", etc.

3) At the XenServer command shell, run 'xe pif-list' to display a list of pifs and see if the related "eth" interfaces are listed as connected=false.

4) Obtain the UUID from the above output and run the following command 'xe pif-plug uuid=<UUID>' (inserting the UUID you have obtained from the above list).  You may find several entries for the above interfaces – try each one until the pif-plug works. This should forcefully re-attach the interface.  Once done, check back in XenCenter and you should see the Ethernet interface correctly reporting as "Connected".