VMware Cloud Community
jgrall
Contributor
Contributor
Jump to solution

Does Get-Tag work on vcsa 6.5?

I'm having some issues using Get-Tag or Get-TagAssignment on two different 6.5 vcsas.  PowerCLI is 6.5 R1.  Whenever I attempt to execute either command I get the following error.  Anyone else seeing this behavior?

get-tag-err.png

Reply
0 Kudos
1 Solution

Accepted Solutions
Lug77
Enthusiast
Enthusiast
Jump to solution

The SR# was 17352321201.  Since then, I've been just working around the issue by using the FQDN. 

Recently, I updated to PowerCLI 6.5.1 and just confirmed I can now use Get-Tag without connecting with FQDN so it appears the bug has been fixed.

View solution in original post

Reply
0 Kudos
18 Replies
LucD
Leadership
Leadership
Jump to solution

Are you connected to a VCSA?
What is in $global:defaultviserver?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
jgrall
Contributor
Contributor
Jump to solution

Yes, the results are as expect when $global:defaultviserver is ran any other time.  Currently I'm only connected to a single VIServer.  The problem is reproducible from multiple clients and multiple 6.5 vCenters.  The cmdlet works on 5.5 vCenters.

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

For me it seems to be working without a problem.

tag.png

Do you have this same error on all stations with PowerCLI 6.5R1?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
jgrall
Contributor
Contributor
Jump to solution

I did a fresh install on another client and it works from there.  Did a repair install on the client that was failing but it didn't fix it.

The other interesting thing is that on the client it's failing on, I'm not getting the typical warning messages for the self-signed cert when connecting to the same vCenter.  $warningpreference is set to continue on both clients.

Reply
0 Kudos
jgrall
Contributor
Contributor
Jump to solution

It's not related to the cert.  I had another person login to the client that was failing for me.  They got the cert warning but get-tag still doesn't work.  Going to do a full uninstall reinstall of PowerCLI.

Reply
0 Kudos
jgrall
Contributor
Contributor
Jump to solution

Reinstall of PowerCLI didn't help either.:smileyconfused:

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Can you try a complete uninstall (including removing the possible leftover Folders and registry entries), a reboot and then a fresh install?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
jgrall
Contributor
Contributor
Jump to solution

Did a full uninstall of PowerShell 5.0 along with PowerCLI 6.5 but it still didn't help.  Not sure on the locations of the leftover folders and registry entries, but I'm open to try it again if you can share the locations to look for.

Reply
0 Kudos
jgrall
Contributor
Contributor
Jump to solution

Update - I installed PowerCLI 6.5 R1 and PowerShell 5.0 on another Windows Server 2012 R2 server and it works fine.  For now, I'm just going to proceed with this.

Reply
0 Kudos
Lug77
Enthusiast
Enthusiast
Jump to solution

I'm having an issue where Get-Tag just hangs on one environment but not the other.  Both environments are using vSphere 6.5 VCSAs.  The one that works in is a single vcsa with an embedded psc.  The environment it fails in is a pair of vcsa behind a LB with external PSCs.  Get-Tag hangs on either vcsa in this SSO domain but works on the simple vcsa deployment.

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

That sounds like a bug.

I suggest you open a SR for this problem.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
Lug77
Enthusiast
Enthusiast
Jump to solution

I opened a SR and they agreed it did look like a bug.

In the meantime I found a work around.  If I connect to the VCSAs with their FQDN the commands work.  Odd thing is every other command I've tried works when connected by the short name.  Also, the system that has always worked is in the same DNS zone.

Reply
0 Kudos
GNV_Javier
Contributor
Contributor
Jump to solution

Have they found a fix for this yet? Just upgraded to appliance from Windows Server and I am having this issue.

Thanks

Javier

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

This indeed looks like a bug on our side which we'll need to investigate and fix.

Can you please:

1. Provide the SR# as I still can't see this in the system (maybe it's still stuck with GSS and hasn't come down to RnD)

2. Provide as much possible info about your deployment and use case, as possible - e.g. topology (MxN), whether and how you're using fqdn, etc. I'm also interested whether Connect-CISServer  and then Get-CISService work without using FQDN works. That should hope with narrowing things down

3. To speed things up, please capture a Fiddler log (Download Fiddler Web Debugging Tool for Free by Telerik) ​and have it attached to the SR (or provide it her), so we can see which URI we're trying to use to access the service and what exact failure we're getting

Some context: as of VC 6.5 the data used by our tagging cmdlets is returned by a separate service and it seems that the connection we establish under the hood doesn't always succeed in certain deployment scenarios (like the one here). The cmdlets certainly work (as we're testing these against a predefined test bed), but as I said - as we're not covering all possible deployments, we may have missed catching a potential problem..

We'll certainly sort this out and provide a fix. Until then - please all try the suggested workaround - i.e. use FQDN when connecting to VCSA 6.5.

Cheers,

A

Reply
0 Kudos
Lug77
Enthusiast
Enthusiast
Jump to solution

The SR# was 17352321201.  Since then, I've been just working around the issue by using the FQDN. 

Recently, I updated to PowerCLI 6.5.1 and just confirmed I can now use Get-Tag without connecting with FQDN so it appears the bug has been fixed.

Reply
0 Kudos
stephan87
Enthusiast
Enthusiast
Jump to solution

Same problem with get-tagassignment using FQDN or IP makes no difference. PowerCLI 6.5.1

Get-TagAssignment -Entity <VM Name>

Get-TagAssignment : 8/14/2017 2:35:55 PM    Get-TagAssignment        Specified argument was out of the range of valid

values.

At line:1 char:1

+ Get-TagAssignment -Entity <VM Name>

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Get-TagAssignment], CisException

    + FullyQualifiedErrorId : VMware.VimAutomation.ViCore.Impl.V1.Service.Tagging.Cis.TaggingServiceCisImpl.GetTagAssi

   gnment.Error,VMware.VimAutomation.ViCore.Cmdlets.Commands.Tagging.GetTagAssignment

Reply
0 Kudos
chaston
Contributor
Contributor
Jump to solution

I am also experiencing issues with the tag cmdlets. We recently migrated from a Windows 2012R2 vCenter 5.5u1 instance to the VCSA 6.5 build: 5705665.

I have tried connecting with FQDN of the vCenter and short name, both result in same errors.

PowerTool H:\> $PSVersionTable

Name                           Value

----                           -----

PSVersion                      5.1.14393.1532

PSEdition                      Desktop

PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}

BuildVersion                   10.0.14393.1532

CLRVersion                     4.0.30319.42000

WSManStackVersion              3.0

PSRemotingProtocolVersion      2.3

SerializationVersion           1.1.0.1

PowerTool H:\> get-module vmware.*

ModuleType Version    Name                                ExportedCommands

---------- -------    ----                                ----------------

Binary     6.5.1.5... VMware.DeployAutomation             {Add-DeployRule, Add-ProxyServer, Add-ScriptBundle, Copy-DeployRule...}

Binary     6.5.1.5... VMware.ImageBuilder                 {Add-EsxSoftwareDepot, Add-EsxSoftwarePackage, Compare-EsxImageProfile, Export-Esx...

Manifest   6.5.2.6... VMware.PowerCLI

Binary     6.5.2.6... VMware.VimAutomation.Cis.Core       {Connect-CisServer, Disconnect-CisServer, Get-CisService}

Binary     6.5.1.5... VMware.VimAutomation.Cloud          {Add-CIDatastore, Connect-CIServer, Disconnect-CIServer, Get-Catalog...}

Manifest   6.5.1.5... VMware.VimAutomation.Common

Binary     6.5.2.6... VMware.VimAutomation.Core           {Add-PassthroughDevice, Add-VirtualSwitchPhysicalNetworkAdapter, Add-VMHost, Add-V...

Binary     6.0.0.5... VMware.VimAutomation.HA             Get-DrmInfo

Binary     7.1.0.5... VMware.VimAutomation.HorizonView    {Connect-HVServer, Disconnect-HVServer}

Binary     6.5.1.5... VMware.VimAutomation.License        Get-LicenseDataManager

Binary     6.5.1.5... VMware.VimAutomation.PCloud         {Connect-PIServer, Disconnect-PIServer, Get-PIComputeInstance, Get-PIDatacenter}

Manifest   1.0.0.5... VMware.VimAutomation.Sdk            {Get-InstallPath, Get-PSVersion}

Binary     6.5.1.5... VMware.VimAutomation.Srm            {Connect-SrmServer, Disconnect-SrmServer}

Binary     6.5.1.5... VMware.VimAutomation.Storage        {Copy-VDisk, Export-SpbmStoragePolicy, Get-NfsUser, Get-SpbmCapability...}

Script     1.0        VMware.VimAutomation.StorageUtility Update-VmfsDatastore

Binary     6.5.1.5... VMware.VimAutomation.Vds            {Add-VDSwitchPhysicalNetworkAdapter, Add-VDSwitchVMHost, Export-VDPortGroup, Expor...

Binary     6.5.1.5... VMware.VimAutomation.vROps          {Connect-OMServer, Disconnect-OMServer, Get-OMAlert, Get-OMAlertDefinition...}

Binary     6.5.1.5... VMware.VumAutomation                {Add-EntityBaseline, Copy-Patch, Get-Baseline, Get-Compliance...}

PowerTool H:\> Get-TagAssignment -Category Recovery

Get-TagAssignment : 9/7/2017 10:10:09 AM        Get-TagAssignment               Value cannot be null.

Parameter name: collection

At line:1 char:1

+ Get-TagAssignment -Category Recovery

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Get-TagAssignment], VimException

    + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Tagging.GetTagAssignment

PowerTool H:\> get-tag

get-tag : 9/7/2017 10:10:32 AM  Get-Tag         Specified argument was out of the range of valid values.

At line:1 char:1

+ get-tag

+ ~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Get-Tag], CisException

    + FullyQualifiedErrorId : VMware.VimAutomation.ViCore.Impl.V1.Service.Tagging.Cis.TaggingServiceCisImpl.GetTag.Error,VMware.VimAutomation.

   ViCore.Cmdlets.Commands.Tagging.GetTag

Reply
0 Kudos
stephan87
Enthusiast
Enthusiast
Jump to solution

VMware BCS Support has confirmed this issue and engineering tries to find a solution.

Update:

Re: Get-Tag fails with Specified argument was out of the range of valid values