VMware Cloud Community
Rafael_P_Olivei
Contributor
Contributor
Jump to solution

Dynamic Machine Groups in VCM

Hey guys, I need a little help with Dynamic Machine Groups creations in VCM. I need to create a Windows machine group for Patching functionalities and that has to be a group of machines whom are member of a Active Directory group. Simple like that! I tried to create a Windows Machine group filter and I tried to use Windows filter group and group member but without success. Has anyone with some experience in that functionality and could help me with that?

1 Solution

Accepted Solutions
bireland
Enthusiast
Enthusiast
Jump to solution

This takes a little work but once it's in place you can use this method of creating dynamic groups for just about anything you can imagine.

1. On all servers in your environment create a reg key, i.e. HKLM\SYSTEM\CurrentControlSet\Software\VCM Groups. Populate this key with properties that you need to use for dynamic groups, i.e ProdPatch1, Client, Application, etc.. Enter values for the properties, i.e Client = Accounting

2. VCM - Under the Admin tab, Settings\Asset Extensions\Hardware Configuration Items\VCM Devices, click Add, select Dynamically Populated, in the SQL query field add the following query:

SELECT @return_value = (select reg_value from [dbo].[ecm_view_rpt_registry_data]

where reg_path = '[insert the reg key path you created here]'

and reg_property_name = '[insert the property name you created here]'

and machine_id = @machine_id)

Click next and finish. Perform a registry collection. You may need to add a filter pointed at your newly created key. Once the collection is completed, go back under the Admin tab, Settings\Asset Extensions\Hardware Configuration Items\VCM Devices and click "Refresh Dynamic fields". This may take some time to complete. Once the refresh is complete you will see one or more new columns (depends on how many you created) in the console tab under Asset Extensions\Hardware Configuration Items\VCM Devices.

Now for the creation of dynamic groups!

On the Administration tab, select the location you wish to create your new groups, i.e. Machines Manager\Machine/Virtual Object Groups\All Machines\All Windows Machines

Create a new group, i.e. Patching

Expand the new Patching group, click Filters, and add a new filter. For the "Data Type" select "Asset Extensions(VCM Devices)", next, Click the drop down box and select the property you created, the operator you wish to use, and the value of the property you want to utilize.

Click on  "Members" and "Refresh Members". It should populate with the end points of interest.

Hope this helps!

View solution in original post

9 Replies
bireland
Enthusiast
Enthusiast
Jump to solution

This takes a little work but once it's in place you can use this method of creating dynamic groups for just about anything you can imagine.

1. On all servers in your environment create a reg key, i.e. HKLM\SYSTEM\CurrentControlSet\Software\VCM Groups. Populate this key with properties that you need to use for dynamic groups, i.e ProdPatch1, Client, Application, etc.. Enter values for the properties, i.e Client = Accounting

2. VCM - Under the Admin tab, Settings\Asset Extensions\Hardware Configuration Items\VCM Devices, click Add, select Dynamically Populated, in the SQL query field add the following query:

SELECT @return_value = (select reg_value from [dbo].[ecm_view_rpt_registry_data]

where reg_path = '[insert the reg key path you created here]'

and reg_property_name = '[insert the property name you created here]'

and machine_id = @machine_id)

Click next and finish. Perform a registry collection. You may need to add a filter pointed at your newly created key. Once the collection is completed, go back under the Admin tab, Settings\Asset Extensions\Hardware Configuration Items\VCM Devices and click "Refresh Dynamic fields". This may take some time to complete. Once the refresh is complete you will see one or more new columns (depends on how many you created) in the console tab under Asset Extensions\Hardware Configuration Items\VCM Devices.

Now for the creation of dynamic groups!

On the Administration tab, select the location you wish to create your new groups, i.e. Machines Manager\Machine/Virtual Object Groups\All Machines\All Windows Machines

Create a new group, i.e. Patching

Expand the new Patching group, click Filters, and add a new filter. For the "Data Type" select "Asset Extensions(VCM Devices)", next, Click the drop down box and select the property you created, the operator you wish to use, and the value of the property you want to utilize.

Click on  "Members" and "Refresh Members". It should populate with the end points of interest.

Hope this helps!

Rafael_P_Olivei
Contributor
Contributor
Jump to solution

Thanks for you response Bireland Smiley Happy, but I had some doubts :smileyplain:.

I have to create 4 groups:

     Group1

     Group2

     Group3

     Group4

1. Based on your suggestion, I have to create a reg key. One reg key for each group or one reg key and in properties populate with group name? Something like the attachment? Sorry really understand "...Enter values for the properties, i.e Client = Accounting."

2. OK, I think that is easy!

Always, when I create a new server, I have to create the reg key or just create that reg key automatically with a GPO or with some automatically task, write?

Regards!

Reply
0 Kudos
bireland
Enthusiast
Enthusiast
Jump to solution

   Just create one reg key. In that key create what ever you wish, I use strings or multi-strings depending on the data that will be entered. In other words, create a string named "Client". Make the value of that string Accounting. In your screen shot, make the value of Group 1 = your desired data point, i.e. Accounting, then continue on with Group2, Group3, etc.

   I have the reg keys created during the server build based on a script or as part of a template. You can also leverage VCM by creating a compliance template. I use the compliance template to make sure the Key and strings have been created and that none of the values are null.

   Once you get the hang of this method, you'll find it invaluable

Does that clear it up?

Rafael_P_Olivei
Contributor
Contributor
Jump to solution

:smileyconfused:

I made everything that you told me. Based on my humble understanding!

Look my screenshots and help me pointing my mistakes, please.

Regards and thanks for your help!

bireland
Enthusiast
Enthusiast
Jump to solution

In your SQL query, delete the brackets as I've indicated in the attached screen shot.

Rafael_P_Olivei
Contributor
Contributor
Jump to solution

I removed the brackets and still not working! The information will be populate in new column, on that screen, when this works?

bireland
Enthusiast
Enthusiast
Jump to solution

Rafael,

   On the Console\Windows tab, browse the registry to HKLM\SYSTEM\CurrentControlSet\Software\VCM Groups. If you do not see an entry for SRV_PRD, create a registry collection filter for HKLM\SYSTEM\CurrentControlSet\Software\VCM Groups and perform a collection based on that filter (do not use the default reg collection filters), then refresh the dynamic group.

Rafael_P_Olivei
Contributor
Contributor
Jump to solution

Great!!! After created the Register Filter Set, appear the following value in Console\Windows\Registry: Image 1

Now, the automatic Group Works!!!!

Thanks Bireland!!!

Do You have skype contact?

If You want to share some VCM experience, sure! Just if You want.

Best Regards!

bireland
Enthusiast
Enthusiast
Jump to solution

Rafael,

   Sorry, I do not use Skype, but I do check this forum fairly regularly and I will post if I see something for which I can provide assistance. I'm glad this method worked out for you. I use it extensively for compliance and reporting. It fills the gap in the standard, out of the box type dynamic groups provided by VMware.

Reply
0 Kudos