Qué vas a conseguir
Publicar una aplicación en Citrix Virtual Apps and Desktops para un grupo de usuarios y resolver, con un orden fijo, el ticket más común de VDI: "pulso en la aplicación y no se abre" o "se queda en Connecting...".
Antes de empezar
- Acceso a Citrix Studio (o Web Studio) con un rol de administrador de aplicaciones o de ayuda al usuario, y a Citrix Director para ver sesiones.
- Saber dónde está instalada la aplicación: en los servidores del catálogo de máquinas (Windows Server con el VDA), no en el equipo del usuario.
- El Citrix Workspace app en el equipo del usuario, y la URL del StoreFront o de Workspace.
1. Las piezas
- Catálogo de máquinas: los servidores o escritorios con el VDA (Virtual Delivery Agent) instalado. Se crean desde una imagen maestra.
- Grupo de entrega: une máquinas del catálogo con los usuarios que pueden usarlas. Aquí se publican las aplicaciones y los escritorios.
- Delivery Controller: el cerebro. Los VDA se registran en él; sin registro, la máquina existe pero no sirve sesiones.
- StoreFront / Workspace: la tienda que ve el usuario. Pide la lista de apps al Controller y entrega el fichero
.icaque abre la sesión.
2. Publicar la aplicación
Con PowerShell desde el Controller se hace lo mismo y queda documentado:
Add-PSSnapin Citrix*New-BrokerApplication -Name "ERP" -CommandLineExecutable "C:\Program Files\ERP\erp.exe" -WorkingDirectory "C:\Program Files\ERP" -DesktopGroup "DG-Finanzas-Apps" -UserFilterEnabled $trueAdd-BrokerUser -Name "CONTOSO\GG-ERP-Usuarios" -Application "ERP"Get-BrokerApplication -Name "ERP" | Select-Object Name, Enabled, AssociatedDesktopGroupUids, UserFilterEnabledName Enabled AssociatedDesktopGroupUids UserFilterEnabled---- ------- -------------------------- -----------------ERP True {3} TrueEl usuario la verá en Workspace tras actualizar la lista (icono de refrescar, o cerrar y abrir la app). Si no aparece: no está en el grupo del filtro, o el grupo de entrega no incluye su cuenta.
3. "No me abre": el orden
3.1 ¿Hay máquinas disponibles?
Get-BrokerMachine -DesktopGroupName "DG-Finanzas-Apps" | Select-Object MachineName, RegistrationState, InMaintenanceMode, SessionCount, LoadIndexMachineName RegistrationState InMaintenanceMode SessionCount LoadIndex----------- ----------------- ----------------- ------------ ---------CONTOSO\XA-APP-01 Registered False 41 8200CONTOSO\XA-APP-02 Unregistered False 0 0CONTOSO\XA-APP-03 Registered True 0 0Aquí ya ves el problema del día: una máquina Unregistered (el VDA no habla con el Controller: casi siempre se ha reiniciado mal, el servicio BrokerAgent está parado o tiene la hora desajustada), otra en mantenimiento (alguien la dejó así tras parchear), y la que queda con carga al tope (LoadIndex 10000 es el máximo). Resultado: las sesiones nuevas no entran.
- Unregistered: en la máquina,
Restart-Service BrokerAgent; si sigue, revisa el visor de eventos (origen *Citrix Desktop Service*) y que resuelve el nombre del Controller. - Mantenimiento:
Set-BrokerMachine -MachineName "CONTOSO\XA-APP-03" -InMaintenanceMode $falseuna vez comprobado que está parcheada y bien.
3.2 ¿Es el usuario o es todo el mundo?
En Director → Buscar usuario aparecen sus sesiones: si tiene una sesión Disconnected de ayer en otra máquina, la app intenta reconectar a esa y falla. Log off de esa sesión desde Director y que vuelva a probar. Si nadie puede abrir la app, es el 3.1 o la propia aplicación en el servidor.
3.3 ¿Llega el .ica?
Si al pulsar en la app el navegador descarga un fichero .ica y no pasa nada, Workspace app no está asociado al tipo de fichero o no está instalado. Si el fichero se abre y se queda en Connecting: el equipo del usuario no llega al VDA por el puerto 1494 (ICA) o 2598 (Session Reliability): Test-NetConnection XA-APP-01 -Port 2598 desde el equipo. Lo normal es un firewall entre la red del usuario (VPN, oficina nueva) y los servidores VDA.
3.4 La aplicación abre y se cierra
Ya no es Citrix: es la aplicación. Entra por RDP en el servidor VDA como el usuario (o con una cuenta de prueba del mismo grupo) y ábrela a mano. Lo que falle ahí (licencia de la app, permisos en una carpeta, un perfil de usuario corrupto en C:\Users) es lo que hay que arreglar. Los perfiles con Citrix Profile Management o FSLogix se restablecen borrando el contenedor del usuario, con su permiso y con copia.
4. Qué poner en el ticket
Nombre de la app, grupo de entrega, resultado de Get-BrokerMachine, en qué paso se queda (lista, .ica, Connecting, dentro) y el nombre de la máquina a la que intentaba conectar (Director lo muestra). Con eso, el equipo de Citrix no tiene que repetir nada.
Siguientes pasos
- Un script diario con
Get-BrokerMachineque avise de máquinas Unregistered o en mantenimiento evita la mitad de los tickets de la mañana. - Aprende a actualizar la imagen maestra y a hacer *rollout* a un catálogo con MCS: es el siguiente paso natural.
- En el Nivel 2 también está VMware Horizon, la alternativa con los mismos conceptos y otros nombres.
¿Falta algo o en tu entorno es distinto? Escríbeme y lo corrijo.
What you'll get
Publish an application in Citrix Virtual Apps and Desktops for a group of users and solve, in a fixed order, the most common VDI ticket: "I click the app and nothing opens" or "it sits on Connecting...".
Before you start
- Access to Citrix Studio (or Web Studio) with an application administrator or help desk role, and to Citrix Director to see sessions.
- Know where the application is installed: on the servers in the machine catalog (Windows Server with the VDA), not on the user's device.
- The Citrix Workspace app on the user's device, and the StoreFront or Workspace URL.
1. The pieces
- Machine catalog: the servers or desktops with the VDA (Virtual Delivery Agent) installed. Created from a master image.
- Delivery group: joins machines from the catalog with the users who may use them. Applications and desktops are published here.
- Delivery Controller: the brain. VDAs register with it; without registration, the machine exists but serves no sessions.
- StoreFront / Workspace: the store the user sees. It asks the Controller for the app list and hands over the
.icafile that opens the session.
2. Publish the application
PowerShell from the Controller does the same, and it stays documented:
Add-PSSnapin Citrix*New-BrokerApplication -Name "ERP" -CommandLineExecutable "C:\Program Files\ERP\erp.exe" -WorkingDirectory "C:\Program Files\ERP" -DesktopGroup "DG-Finance-Apps" -UserFilterEnabled $trueAdd-BrokerUser -Name "CONTOSO\GG-ERP-Users" -Application "ERP"Get-BrokerApplication -Name "ERP" | Select-Object Name, Enabled, AssociatedDesktopGroupUids, UserFilterEnabledName Enabled AssociatedDesktopGroupUids UserFilterEnabled---- ------- -------------------------- -----------------ERP True {3} TrueThe user sees it in Workspace after refreshing the list (refresh icon, or close and reopen the app). If it does not appear: they are not in the filter group, or the delivery group does not include their account.
3. "It won't open": the order
3.1 Are there machines available?
Get-BrokerMachine -DesktopGroupName "DG-Finance-Apps" | Select-Object MachineName, RegistrationState, InMaintenanceMode, SessionCount, LoadIndexMachineName RegistrationState InMaintenanceMode SessionCount LoadIndex----------- ----------------- ----------------- ------------ ---------CONTOSO\XA-APP-01 Registered False 41 8200CONTOSO\XA-APP-02 Unregistered False 0 0CONTOSO\XA-APP-03 Registered True 0 0The day's problem is right there: one machine Unregistered (the VDA is not talking to the Controller: almost always a bad reboot, the BrokerAgent service stopped, or the clock off), another in maintenance (someone left it there after patching), and the remaining one at full load (LoadIndex 10000 is the maximum). Result: new sessions don't get in.
- Unregistered: on the machine,
Restart-Service BrokerAgent; if it persists, check Event Viewer (source *Citrix Desktop Service*) and that it resolves the Controller's name. - Maintenance:
Set-BrokerMachine -MachineName "CONTOSO\XA-APP-03" -InMaintenanceMode $falseonce you have confirmed it is patched and healthy.
3.2 Is it the user or everyone?
In Director → Search user their sessions appear: if they have a Disconnected session from yesterday on another machine, the app tries to reconnect to that one and fails. Log off that session from Director and have them try again. If nobody can open the app, it is 3.1 or the application itself on the server.
3.3 Does the .ica arrive?
If clicking the app makes the browser download an .ica file and nothing happens, Workspace app is not associated with the file type or not installed. If the file opens and sits on Connecting: the user's device cannot reach the VDA on port 1494 (ICA) or 2598 (Session Reliability): Test-NetConnection XA-APP-01 -Port 2598 from the device. It is usually a firewall between the user's network (VPN, new office) and the VDA servers.
3.4 The application opens and closes
That is no longer Citrix: it is the application. RDP into the VDA server as the user (or with a test account from the same group) and open it by hand. Whatever fails there (the app's licence, permissions on a folder, a corrupt user profile in C:\Users) is what needs fixing. Profiles with Citrix Profile Management or FSLogix are reset by deleting the user's container, with their permission and a backup.
4. What to put in the ticket
App name, delivery group, the Get-BrokerMachine output, which step it gets stuck at (list, .ica, Connecting, inside) and the name of the machine it tried to connect to (Director shows it). With that, the Citrix team repeats nothing.
Next steps
- A daily script with
Get-BrokerMachinethat flags Unregistered or maintenance machines removes half the morning tickets. - Learn to update the master image and roll it out to a catalog with MCS: that is the natural next step.
- Level 2 also has VMware Horizon, the alternative with the same concepts and different names.
Is something missing, or different in your environment? Get in touch and I'll fix it.
Tech Career Lab · newsletter
¿Te ha servido? Cada dos semanas envío una idea práctica para perfiles IT: LinkedIn, proyectos, networking y procesos de selección.Found this useful? Every two weeks I send one practical idea for IT professionals: LinkedIn, projects, networking and hiring processes.
Apúntate y llévate las 33 ideasSign up and get the 33 ideas →