View Only
  • 1.  Get-Tag, Get-TagCategory and Get-TagAssignment returns error

    Posted Oct 31, 2023 07:15 AM

    Get-Tag, Get-TagCategory and Get-TagAssignment returns error.

    Example for Get-TagAssignment:

    Get-TagAssignment : 10/26/2023 8:10:24 AM  Get-TagAssignment    com.vmware.vapi.std.errors.operation_not_found 
    {'messages': [com.vmware.vapi.std.localizable_message {'id': vapi.method.input.invalid.interface, 
    'default_message': Cannot find service ''., 'args': 
    []}], 'data':}
    At line:1 char:1
    + Get-TagAssignment
    + ~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Get-TagAssignment], CisException
        + FullyQualifiedErrorId : VMware.VimAutomation.ViCore.Impl.V1.Service.Tagging.Cis.TaggingServiceCisImpl. 

    1. Updated to latest PowerCLI module

    2. Tested the other commands - everything works except for the Get-Tag related.

    vCenter version -- v8.0

  • 2.  RE: Get-Tag, Get-TagCategory and Get-TagAssignment returns error

    Posted Oct 31, 2023 08:03 AM

    Sometimes a restart of the service on the VCSA helps.

    As an alternative use the REST API or one of the modules that uses this REST API.
    See get-vm -tag tagname no longer working - VMware Technology Network VMTN

  • 3.  RE: Get-Tag, Get-TagCategory and Get-TagAssignment returns error

    Broadcom Employee
    Posted Nov 02, 2023 12:29 PM

    The issue is caused by the vmware-infraprofile service going out of memory. The next version of PowerCLI will be fixed not to use it, but until then you have two options to resolve it:

    1. Restart the image infraprofile service may fix the issue until the service has OOM again

    # service-control --stop vmware-infraprofile && service-control --start vmware-infraprofile

    2. Increasing the memory for the vmware-infraprofile service should prevent future OOM messages

    Get the current memory allocted to the service

    # cloudvm-ram-size -l | grep vmware-infraprofile
    vmware-infraprofile = 332

    doubling the memory should be enough to fix the issue, however in case it does not fix it you can further increase the memory.

    # cloudvm-ram-size -C 664 vmware-infraprofile 

    You can check the memory status again

    # cloudvm-ram-size -l | grep vmware-infraprofile

    vmware-infraprofile = 684

    Then restart the infraprofile service 

    # service-control --stop vmware-infraprofile && service-control --start vmware-infraprofile