# Filtering VMs in the “change master image” wizard

- Link: https://www.silviobalduzzi.com/en/2023/08/filtering-vms-change-master-image-wizard/
- Published: 2023-08-10T20:47:27+02:00
- Author: balduz84

I’m working more and more often in large Citrix Cloud environments, and I’ve often
had a hard time easily finding the right master in the list shown by the “Change
master image” wizard.

![](https://i0.wp.com/www.silviobalduzzi.com/wp-content/uploads/2023/08/image.png?
resize=591%2C464&ssl=1)

In this image, which is obviously just an example, you can see a list that includes
VMs that have nothing to do with the Citrix world, and it would be handy to be able
to exclude them from the list.

As you’ve surely noticed, the VMs created with MCS aren’t shown in the list either.
Why is that?

Simple: Citrix adds a tag to the VMs created with MCS, which makes the catalog update
wizard leave those machines out of the list. So we can use the same mechanism to
exclude from the list the machines we will certainly never need to use as a master
image (workaround?).

To add the tag to the VM, log in to vCenter, select the machine you want to exclude
from the list and edit the “Custom Attributes” section.

By default, VMs don’t have the “Value” field filled in for the “XdConfig” attribute,
while VMs created with MCS do. So all you need to do is fill in the “Value” field
with “XdProvisioned=true” and save.

![](https://i0.wp.com/www.silviobalduzzi.com/wp-content/uploads/2023/08/image-2.
png?resize=760%2C386&ssl=1)

![](https://i0.wp.com/www.silviobalduzzi.com/wp-content/uploads/2023/08/image-1.
png?resize=760%2C272&ssl=1)

Obviously, if there are many VMs to exclude, this could still be a time-consuming
method…but I think I can come up with a faster way using PowerShell…stay tuned.

This way we can exclude all the VMs we’re not interested in, leaving only the master
images visible. It’s not the “cleanest” solution (I would have preferred to be able
to define a tag to include and assign that tag only to the masters, instead of having
to work by exclusion), but it works.

Please note that the exclusion of the VMs may not be picked up by the Cloud right
away…I expect some kind of cache of the information is kept, so it doesn’t have 
to keep querying the hypervisor live, but after a few minutes you’ll see the result.
