VMware Horizon Community
ramachandrankes
Enthusiast
Enthusiast

Already used state - VDI Machines

Hi Team,

I am seeing most of the VDI showing as already used state but no users are connected really.

This creates problem for me in my infrastructure. I tried the following link references and noticed that pae-DirtyVMPolicy attribute not available or not even able to create.

VMware Knowledge Base

Please help me on how to resolve this issue.

My Horizon version is 7.

Thanks & regards,

Ram

18 Replies
a_p_
Leadership
Leadership

To me this sounds as if you've accidentally configured the pool for dedicated user assignment instead of floating assignment.

see User Assignment in Desktop Pools

Andé

0 Kudos
Shreyskar
VMware Employee
VMware Employee

You should be able to see pae-DirtyVMpolicy in ADAM database. I am wondering if you are checking in the right location or not.

Please connect to ADAM as per VMware Knowledge Base  and set this value to 2.

As mentioned in last comment, let us know if you are using dedicated or floating desktop pool.

0 Kudos
sjesse
Leadership
Leadership

Also please state if your using appvolumes I've seen this happen when appstacks don't detach properly and get the desktop to restart but not actually delete if using instant clones or linked clones that delete on logoff.. This will cause a new vm to be created that's a duplicate.

0 Kudos
Lieven
Hot Shot
Hot Shot

0 Kudos
ramachandrankes
Enthusiast
Enthusiast

Hi @a.p.,

My desktop pools are configured with Floating Assignment.

User Assignment on the Horizon View Admin Portal shows as Floating.

Thanks,

Ram

0 Kudos
ramachandrankes
Enthusiast
Enthusiast

Hi @Shreyskar,

I am using desktop pools as floating assignment only.

I have used the same KB as per the link I shared and not sure if I am locating to correct ADSIEDIT.MSC or not.

I do not see an icon in the name ADAM ADSIEDIT.MSC instead I see only ADSIEDIT.MSC where we see AD attributes.

Inside that, I do not see this attribute value.

Do I need to check my AD attributes or Horizon related attributes.

Thanks,

Ram

0 Kudos
ramachandrankes
Enthusiast
Enthusiast

Hi sjesse,

Yes, we use AppStacks and whether it is possible to check if any application is running live where user access to applications via app stack hosted on the particular VM via any command?

So that I can confirm that users are connected and I do not want to see a false information as already used.

Thanks,

Ram

0 Kudos
ramachandrankes
Enthusiast
Enthusiast

Hi Lieven,

I do not see this ADAM in my Active Directory.

Go to Start > Programs > ADAM > ADAM ADSI Edit.

Thanks,

Ram

0 Kudos
Lieven
Hot Shot
Hot Shot

Hi Ram,

The ADAM database is not related to your Active Directory.

The ADAM database is located on your VMware Horizon View Connection server.

See VMware Knowledge Base for instructions on how to connect to the Horizon View ADAM instance

Regards,

Lieven

0 Kudos
Shreyskar
VMware Employee
VMware Employee

Hi Ram,

Launch adsiedit as domain administrator and connect. It will show all the items.

If it fails to connect, please share the screenshot of configuration that you are using in adsiedit to connect to ADAM.

If you are using appstack, On machines which are in 'already used' state, check if appstack is detached after logoff in vsphere client.

On master image set this value and push/recompose.It will make sure machine is rebooted once after appstack is detached gracefully:

HKLM\SYSTEM\CurrentControlSet\services\svservice\Parameters

REG_DWORD

RebootAfterDetach = '1'

If issue still persist, implement KB VMware Knowledge Base and see if it helps.

ramachandrankes
Enthusiast
Enthusiast

Hi Lieven,

Thank you for your response.

We have installed Horizon View Server on a Windows Server 2019 DC Edition.

I accessed adsiedit.msc and what is the distinguished name, I should use? Should I use DN name where HORIZON View server available?

Thanks,

Ram

0 Kudos
ramachandrankes
Enthusiast
Enthusiast

Hi Shreyskar,

Thanks. I will look into the same.

Regards,

Ram

0 Kudos
sjesse
Leadership
Leadership

Type exactly what they describe in

VMware Knowledge Base

In the field below Select or type a Distinguished Name or Naming Context, type:

dc=vdi,dc=vmware,dc=int

Lieven
Hot Shot
Hot Shot

The distinguished name should be dc=vdi,dc=vmware,dc=int.

ramachandrankes
Enthusiast
Enthusiast

Hi Lieven,

Is it possible if anyone can help me to find ADAM Database?

I do not see the mentioned attribute.

Thanks,

Ram

0 Kudos
ramachandrankes
Enthusiast
Enthusiast

Hi Sjesse, Leiven,

Sorry, I thought I should type in my OWN DN name.

Thanks, I can connect now to the ADAM Database and noticed my Desktop Pools name under Server Groups.

Please advise me what is the best practice on assigning this value. I do not want VM to simply in already used state. Also, how the refresh interval works when already used state appears for a VM.

The pae-DirtyVMPolicy values provide these options for the Refresh on logoff policy:

pae-DirtyVMPolicy=0: Mark virtual machines that were not cleanly logged off as Already used and block user access to them. This is the default behavior in View 4.6 and later releases.

pae-DirtyVMPolicy=1: Allow virtual machines that were not cleanly logged off to become available without being refreshed. View Client users can access these desktops.

pae-DirtyVMPolicy=2: Automatically refresh virtual machines that were not cleanly logged off. View Client users can access these desktops after the refresh operation is completed.

Thanks,

Ram

0 Kudos
Shreyskar
VMware Employee
VMware Employee

No you can't assign your own DN value as it is AD LDS database and follows a specific architecture for each and every object and for horizon the DN value is always dc=vdi,dc=vmware,dc=int.

1)First take a backup of ADAM database. On connection server run:

C:\Program Files\VMware\VMware View\Server\tools\bin\vdmexport.exe  > vdmconfig.ldf

2)Simply set attribite value 'pae-DirtyVmPolicy' to 2 on the affected pools in ADAM under OU='Server Groups'.

It will fix your 'Already used' state VMs.

ramachandrankes
Enthusiast
Enthusiast

Hi Shreyskar,

Thanks, I will backup and configure value as 2.

Regards,

Ram

0 Kudos