Sunday, December 29, 2019

Horizon View - "Failed to connect to Connection Server" when accessed via LB WIP or DNS alias

Scenario
Horizon View - "Failed to connect to Connection Server" when accessed via LB WIP or DNS alias
Works fine when accessed with server FQDN



Solution
If you are facing this issue after upgrading to view 7.X, you are not alone! And this is not an issue.
It's a new security feature part of 7.X and can be disable by steps mentioned in this KB.


All you need to do is 
> Create file with the name locked.properties
> Add line "checkOrigin=false" (without quotes)
> Save and copy this to C:\Program Files\VMware\VMware View\Server\sslgateway\conf folder on all your connection servers.
> Reboot them or restart connection service on them one by one like you normally do




Thursday, December 12, 2019

VMware Horizon View 7.X desktop “Agent unreachable” status

Scenario -: 
We had a VDI user reporting issues connecting to his VDI machine.



Checking View Admin page shows this VDI machine 


First thing first

1) Checked vCenter and made sure that the VM is up and running, not down or suspended. 
2) I could remote desktop to it and checked services
3) Restarted Agent Service. No luck
4) Rebooted VM, no luck there too.

Started to look at the logs at this point

C:\ProgramData\VMware\VDM\logs

debug-2019-12-12-150326.txt

2019-12-12T15:03:35.940+10:00 DEBUG (25A0-26C4) <Thread-4> [AgentMessageSecurityHandler] Configuring message security (ON).
2019-12-12T15:03:36.033+10:00 DEBUG (25A0-26C4) <Thread-4> [BrokerUpdateUtility] Published CHANGEKEY request
2019-12-12T15:03:51.035+10:00 DEBUG (25A0-26C4) <Thread-4> [BrokerUpdateUtility] Timeout waiting for success response

So looks like it was trying to change the Key, but wasn't successful. So I decided to push it from
Connection server instead 

1) Login to one of out View Connection Servers
2) Opened a CMD as Admin
3) Ran below commands

Cd C:\Program Files\VMware\VMware View\Server\tools\bin
vdmadmin -A -d <Name of the Desktop Pool> -m <Machine Name> -resetkey

4) You should be able to see the Agent Public Key listed there and thats all good. 
5) Wait for a few mins and could can see status reporting :)

Reporting as "Unassigned User Connected" coz it was assigned to someone else and I logged in there with Admin ID. So rebooted VM and all good afterwords.


Update - 20/03/2020

We have see the same issue when few users enabled installed Docker and part of that Hyper-V feature was enabled!

Removed Hyper-V feature from Add/Remove Programs -> Turn Windows Feature On/Off

Rebooted the VDI machine and that brought Agent back online








Tuesday, December 10, 2019

vCenter SSO User password Expired

We had a vCenter SSO user created for SRM and it's password expired. Here is how you can check it and fix it.

User name is srm@vsphere.local

1) Login to VCSA with SSH and below are commands

root@vcenterserver [ ] cd /usr/lib/vmware-vmafd/bin/

root@vcenterserver [ /usr/lib/vmware-vmafd/bin ]# ./dir-cli user find-by-name --account srm --level 2
Enter password for administrator@vsphere.local:
Account: srm
UPN: srm@VSPHERE.LOCAL
Account disabled: FALSE
Account locked: FALSE
Password never expires: FALSE
Password expired: TRUE

root@vcenterserver [ /usr/lib/vmware-vmafd/bin ]#./dir-cli user modify --account srm  --password-never-expires
Enter password for administrator@vsphere.local:
Password set to never expire for [srm].


root@vcenterserver [ /usr/lib/vmware-vmafd/bin ]#./dir-cli password reset --account srm --password XXXXXXXX