Tag Archives: citrix

Deny Dropbox from running with GPO

Start Group Policy Management Editor
Go to:
Computer Configuration\Policies\Windows Settings\Security Settings\Software Restriction Policies

If you see:

Dropbox1

On the right screen, then you need to right click on Software Restriction Policies, and choice “New Software Restricition Policies” first.

Right click on
Additional Rules, and choice “New Path Rule…”

Path should be:
%AppData%\Dropbox\bin\*.exe
Set security level to Disallowed
Dropbox2

Make a another new Path rule, and set path to:
%AppData%\Roaming\Dropbox\bin\*.exe

Set security level to Disallowed

To update GPO right away:
Run CMD as Administrator, and type: gpupdate /force
Dropbox3

This will update the group policy on the machine this command is run at.

Citrix XenDesktop – Desktop Popsup with connection and then closes

Today i have this problem, that my brand new setup of XenDesktop just start and showing connecting, but just after a few seconds just drop the connection, and the VDI is restarting.

So I push the connect buttom and when it shows connecting, i put the machine in maintaince mode, so it is not restarting automatic.

Then look at the Event Viewer, and it was showing this error:
Source: Citrix ICA Service
Event ID: 1260
Type: Warning
Description: ICA connection is cancelled because auto-logon is enforced and auto-logon failed.
For more information, see
http://support.citrix.com/proddocs/topic/online-plugin-121-windows/ica-sson-enable.html.

When look at the support.citrix.com page I got a 404 error page.

Search the Internet and found at that my user account dosent was permitted to logon locally, enable this though Group Policy
Group Policy here: Computer Configuration -> Policies -> Windows Settings -> Security Settings -> Local Policies -> User Rights Assignment -> Allow log on locally

By default the following users and groups are granted to log on locally on windows 7:
Guest
Administrators
Users
Backup Operatiors

Citrix XenApp failed to connect to Data Store

Today i have this problems on one of the Citrix XenApp servers, that the service IMA won’t connect to the Data store.

It failed with this events:

1. Citrix XenApp failed to connect to the Data Store. ODBC error while connecting to the database: S1000 -> [Microsoft][ODBC Microsoft Access Driver] Cannot open database ‘(unknown)’.  It may not be a database that your application recognizes, or the file may be corrupt.

2. Failed to load plugin C:\Program Files (x86)\Citrix\System32\Citrix\IMA\SubSystems\ImaPsSs.dll with error IMA_RESULT_FAILURE

3. Failed to load plugin C:\Program Files (x86)\Citrix\System32\Citrix\IMA\SubSystems\ImaRuntimeSS.dll with error IMA_RESULT_FAILURE

4. Failed to load initial plugins with error IMA_RESULT_FAILURE

5. The Citrix Independent Management Architecture service terminated with service-specific error 2147483649 (0×80000001).

 

But all my others servers in the farm was working just fine, so it must be a locally problems.
The Local Host Cache database, is used to allow a Citrix server in the Citrix Farm to pursue working if the server loses acces to date store temporay. The Local Host Cache database, is an Microsoft Access database, named lmalhc.mdb, and it store ind the Independent Mangement Architecture folder, located: <ProgramFiles>\Citrix\Independent Management Architecture\

 

So the solution to this problems must be to recreate the LHC database, this can be done with this command

dsmaint recreatelhc

But first check that

The datastore is available and function okay, and that the Citrix IMA Service is down :).

The command performs these actions:

Rename the existing Local Host Cache database, create a new one, and the setting PSRequired in registry to 1. Under HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\IMA\Runtime\

Setting thise key to, force the server to connect to the data store, so that the Local Host Cache database, can be recreated.

Xenserver – Problems with the master of the pool, down – dead or corrupt

If you have problems, that you master is dead or have som troubles, and you need to selected a new master, you can do this with this commands:

xe pool-emergency-transition-to-master

Then on the others slave you can run this commands:

xe pool-emergency-reset-master master-address=NewMasterAddress

And then when the master is running again run this command on the old master

xe pool-emergency-reset-master master-address=NewMasterAddress

Kill a stuck vm in shuting down mode or pending mode

There are 3 options to do this, witch way depend on the stuck mode, start with options 1 and work you way thougt it onto the vm is shutdown.

Options 1:

SSH to the Xenserver witch running the vm

Type these commands:

xe task-list

Found the task and the UUID for this task, and kill it

xe task-cancel force=true uuid=<UUID>

 Options 2:

SSH to the Xenserver witch running the vm

xe vm-list

Find the vm han get the UUID

list_domains | grep <UUID>

Get the number in front of the UUID

/opt/xensource/debug/destroy_domain -domid <DOMID>

Options 3:

SSH to the Xenserver witch running the vm

xe-toolstack-restart

 

XenCenter – Failed to import

I have a problem with my Xencenter failed to import a OVF VM.
In XenCenter console, it just says: Failed to import.

If i look in the log files is was saying: (In XenCenter Console, push tab Help, and then clock on “View application log files. And then open op XenCenter.log):

System.Exception: Failed to import. —> System.IO.InvalidDataException: Failed to add resource Hard Disk Image. —> System.Exception: Failed to import. —> System.Exception: Failed to import virtual disk file. —> System.Xml.XmlException: Root element is missing.

Error on a Danish windows

System.Exception: Failed to import. —> System.IO.InvalidDataException: Failed to add resource Hard Disk Image. —> System.Exception: Failed to import. —> System.Exception: Failed to import virtual disk file. —> System.Xml.XmlException: Rod element mangler.

To fix this problem I did:
In XenCenter, select View -> Hidden Objects
This will show you hidden objects, such as Transfer objects.
Found the failed imported machine, right click on it and delete it.
Now you should found a XenServer Tranfer VM X.X.X-X, right click on it and delete it.

Now connect to the console on the XenServer host: (Master of the pool if you have such one)
And type this commands:

cd /opt/xensource/packages/files/transfer-vm
./install-transfer-vm.sh

Xendesktop 5 – Log off disconnected users after a certain time

Example: If you want to log off user after 120 minutes of disconnect time. You can set this up though Powershell

ASNP Citrix.*

set-BrokerDesktopGroup -name "Desktop Group Name" -OffPeakDisconnectTimeout 120
set-BrokerDesktopGroup -name "Desktop Group Name" -OffPeakExtendedDisconnectTimeout 120
set-BrokerDesktopGroup -name "Desktop Group Name" -PeakDisconnectTimeout 120
set-BrokerDesktopGroup -name "Desktop Group Name" -PeakExtendedDisconnectTimeout 120
set-BrokerDesktopGroup -name "Desktop Group Name" -OffPeakDisconnectTimeout 120

set-BrokerDesktopGroup -name "Desktop Group Name" -OffPeakExtendedDisconnectAction "shutdown"
set-BrokerDesktopGroup -name "Desktop Group Name" -OffPeakExtendedDisconnectAction "shutdown"
set-BrokerDesktopGroup -name "Desktop Group Name" -PeakDisconnectAction "shutdown"
set-BrokerDesktopGroup -name "Desktop Group Name" -PeakExtendedDisconnectAction "shutdown"
set-BrokerDesktopGroup -name "Desktop Group Name" -OffPeakDisconnectAction "shutdown"

 

Xendesktop 5 – Change logoff behavior

If you want to change a desktop group logoff behavior, this is done by PowerShell.

To turn off shutdown af use:

ASNP Citrix.*
Set-BrokerDesktopGroup -Name "Desktop Group Name" -ShutdownDesktopsAfterUse $FALSE

To turn on shutdown af use:

ASNP Citrix.*
Set-BrokerDesktopGroup -Name "Desktop Group Name" -ShutdownDesktopsAfterUse $TRUE

If you need to get a list of names of you Desktop Groups, you can run this:

ASNP Citrix.*
get-BrokerDesktopGroup | select Name

Citrix Xenconvert failed with Failed to discover 1 of 2 volumes on the destination disk! or Enable Automount on windows server Enterprise edition and run Disk Management once to take effect

Today i should convert a machine with XenConvert to XenServer, but it come with these errors:

Failed to discover 1 of 2 volumes on the destination disk!
Enable Automount on windows server Enterprise edition and run Disk Management once to take effect

What i did to fix it was:

First enable automount

C:\> DiskPart
DISKPART> automount enable
DISKPART> exit

If it still not working try this:

  1. Close XenConvert.
  2. Open a command window.
  3. Change to the XenConvert installation folder
  4. Mount the VHD:
    cvhdmount -p 1 <VHD file path>
  5. Open Windows Disk Management, then wait for the disk to appear online in Windows Disk Management, maybe you need to rescan
  6. Verify that the volumes are accessible
  7. Dismount the VHD
    cvhdmount -e 1
  8. Last thing to is editing XenConvert.ini file in c:\program files\citrix\xenconvert\xenconvert.ini
    And put this under [Parameters]
    VolumeDiscoveryTimeoutAsSeconds=120

Then try run XenConvert again.