PowerShell script exchange
Post Reply
defmy
Lurker
Posts: 2
Liked: never
Joined: Nov 17, 2021 10:41 am
Contact:

List of VMs with Specific Tags no work with v11

Post by defmy »

Hello,

Since my update to version 11, I can no longer load the list of VMs with a specific tag. I see indeed that the command "Find-VBRViEntity -Server $ server -Tags" no longer has a VM type...

Everything worked fine with version 10. And according to example 5 in the documentation, it is still possible to do this (https://helpcenter.veeam.com/docs/backu ... l?worm=110).

Is this normal? Is there another solution ? If not, can I correct the problem without reverting to version 10?
soncscy
Veteran
Posts: 643
Liked: 312 times
Joined: Aug 04, 2019 2:57 pm
Full Name: Harvey
Contact:

Re: List of VMs with Specific Tags no work with v11

Post by soncscy »

Hrm, I agree the example suggests it, but seems the documentation disagrees with itself:

> Tags Defines that the cmdlet will return only tags.

From the parameter's table.

I suppose maybe the behavior was changed to match the parameter description?
defmy
Lurker
Posts: 2
Liked: never
Joined: Nov 17, 2021 10:41 am
Contact:

Re: List of VMs with Specific Tags no work with v11

Post by defmy »

I looked at the documentation for version 10, we have exactly the same description.

Then I can do otherwise, I don't have a problem, I would just like to retrieve the list of VMs associated with a tag.
oleg.feoktistov
Veeam Software
Posts: 1912
Liked: 635 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: List of VMs with Specific Tags no work with v11

Post by oleg.feoktistov »

What Harvey described was exactly what happened. This was fixed as a bug in 11a to match the parameter's purpose. I asked technical writers to remove this example from v11 guide. Thanks!
masonit
Service Provider
Posts: 325
Liked: 23 times
Joined: Oct 09, 2012 2:30 pm
Full Name: Maso
Contact:

Re: List of VMs with Specific Tags no work with v11

Post by masonit »

Hi!

Also ran into this issue after upgrade to v11a, this is really bad for us.. I have this line: $veeamvcenter | Find-VBRViEntity -Tags | where-object type -eq "Vm".

But type = vm does not exist anymore. How can I see what tags vm has now?

\Magnus
oleg.feoktistov
Veeam Software
Posts: 1912
Liked: 635 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: List of VMs with Specific Tags no work with v11

Post by oleg.feoktistov »

Hi Magnus,

Vm type does exist, it is just not reflected within Find-VBRViEntity -Tags query anymore. And the one reflected within Find-VBRViEntity -VMsAndTemplates has resource pools as parent, not tags. It was fixed as a bug as it doesn't correspond to a designed behaviour for -Tags parameter. Currently searching vms by tags would involve using PowerCLI, but I have this request noted.

Thanks,
Oleg
masonit
Service Provider
Posts: 325
Liked: 23 times
Joined: Oct 09, 2012 2:30 pm
Full Name: Maso
Contact:

Re: List of VMs with Specific Tags no work with v11

Post by masonit »

This is a major issue for us! :( We have alot of automation totally dependent on getting this tag information for vms from Veeam (Find-VBRViEntity). I can't understand why you are changing the code and removing a very good function. Instead of just updating the documentation to match the behaivure..!

Is there no way around this now? It's easy to just point towards PowerCLI but that would take ALOT extra work for us. I can still get tag and vm information using Find-VBRViEntity but I does not seem to be a good way to link them..

I will create a support case, we need this function back asap.

\Magnus
oleg.feoktistov
Veeam Software
Posts: 1912
Liked: 635 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: List of VMs with Specific Tags no work with v11

Post by oleg.feoktistov »

Hi Magnus and whoever else sees this,

After internal discussions we decided to roll back this behavior in v12. We do admit it wasn't wise to fix it as a bug due to several reasons: such query didn't mess anything, but turned out to be rather useful, and was already present in v10 guide as an official example, so people used it as one. For workflows impacted - please ask for a hotfix via support case.

Apologies and Best regards,
Oleg
masonit
Service Provider
Posts: 325
Liked: 23 times
Joined: Oct 09, 2012 2:30 pm
Full Name: Maso
Contact:

Re: List of VMs with Specific Tags no work with v11

Post by masonit »

Hi!

Fix is installed since a couple of days. Seems to work fine. Thank you for quick solution.

Why does a hotfix like this one affect remote console? We have a mgmt server where we connect to 4 vbr using remote console. This hotfix was needed on 2 of the vbr. But remote console on mgmt server needed to be updated to be able to connect to vbr with hotfix installed. Now remote console can't connect to the other 2 vbr where the hotfix is not installed. Seems like I now need to install the hotfix one the other 2 vbr just to be able to use remote console on them as well..?

\Magnus
oleg.feoktistov
Veeam Software
Posts: 1912
Liked: 635 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: List of VMs with Specific Tags no work with v11

Post by oleg.feoktistov »

Hi Magnus,

Yes, this is expected. We compare file hashes on a backup server and a backup console during connection.
If there is a discrepancy on any side, we require an update.

Thanks,
Oleg
masonit
Service Provider
Posts: 325
Liked: 23 times
Joined: Oct 09, 2012 2:30 pm
Full Name: Maso
Contact:

Re: List of VMs with Specific Tags no work with v11

Post by masonit »

Hi!

I have used the hotfix on version 11.0.1.1261_20211005. If I update vbr with latest version (11.0.1.1261 P20211211). Will I have to install the hotfix again then and will the hotfix work for that version?

\Magnus
oleg.feoktistov
Veeam Software
Posts: 1912
Liked: 635 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: List of VMs with Specific Tags no work with v11

Post by oleg.feoktistov »

No, in this case we would need to rebuild this private fix so that it could work over another patch.
If necessary, you can ask for it via support case. Thanks!
Daniel N.
Enthusiast
Posts: 52
Liked: 5 times
Joined: Feb 15, 2015 7:03 am
Contact:

Re: List of VMs with Specific Tags no work with v11

Post by Daniel N. »

I also require a PowerShell cmdlet that returns not only available tags, but tagged VMs aswell - and of course what tags they're tagged with. Having only tags without anyway to cross reference them is useless.
oleg.feoktistov wrote: Nov 22, 2021 3:45 pm What Harvey described was exactly what happened. This was fixed as a bug in 11a to match the parameter's purpose. I asked technical writers to remove this example from v11 guide. Thanks!
Are you talking about this part: "To get the necessary tags of the VMware objects, you must specify the vCenter Server in the Server parameter"? If so, this combination makes no sense. You already connect to a particular vCenter server. You should rather have a Switch like -TagsAndVms. Or better, just have -Tags return the tags and populate -VmsAndTemplates with the tags.
oleg.feoktistov
Veeam Software
Posts: 1912
Liked: 635 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: List of VMs with Specific Tags no work with v11

Post by oleg.feoktistov »

Hi,

I was talking about the example, which was mentioned under Example 4. Getting List of VMware Tags. But, as I mentioned above, we already decided to rollback to this behavior and show tagged VMs along with the Tags when using -Tags switch. To be available in v12 and through requesting a private fix. What you mentioned makes sense but in the guide it solely means that you need to specifically pass vCenter as a server, not ESXi host. It doens't mean it is required. For example:

Returns tags for the vCenter passed:

Code: Select all

Find-VBRViEntity -Server vcenter.local -Tags
Returns tags for all the added vCenters:

Code: Select all

Find-VBRViEntity -Tags
Returns nothing as ESXi host was passed instead:

Code: Select all

Find-VBRViEntity -Server esxi.local -Tags
The wording in the guide might be confusing. It could be clearer if it mentioned that passing vCenter is not required, but if you want to get tags for a specific vCenter, you need to specify CVcItem[], not CEsxItem[]. I'll ask tech writers to update the article.

Hope it helps,
Oleg
Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests