VMware Cloud Community
KThorlund
Enthusiast
Enthusiast
Jump to solution

Tags / vAPI - what brings the future.. Powershell?

Good morning,

I have used vRO 7.6 and vAPI 7.5 on DEV/TEST vCenter 6.7.0 for a good while now. But I simply cant get it to work on my other vCenter.

I believe I have tried what I can to get it working - obliviously not enough..

It thows this error:

[2020-04-24 10:12:58.882] [E] com.vmware.vapi.std.errors.unauthorized => {data=<unset>, messages=[com.vmware.vapi.std.localizable_message => {args=[DOMAIN\vROUser, read, DynamicID (com.vmware.vapi.std.dynamic_ID) => {

    type = VirtualMachine,

    id = vm-972716:1b11fb66-0496-4db5-a40a-942644acb921

}], default_message=DOMAIN\vROUser does not have read privilege on DynamicID (com.vmware.vapi.std.dynamic_ID) => {

    type = VirtualMachine,

    id = vm-972716:1b11fb66-0496-4db5-a40a-942644acb921

}, id=cis.tagging.unauthorized.error}]} (Workflow:SetTag3 / Scriptable task (item1)#47)

The DOMAIN\vROUser is full admin on the vcenter, and the DEV API seems running with out issues..)

I have given up on the error, and consider new ways to do it..

I can read it is possible to do similar with a REST call to the API. As well can I do it why Powershell/PowerCLI via the PS Host..

My question is then (preferable how to fix above Smiley Happy) is, what do you expect the future for vRO to bring. Will it at some point be native vRO, is expected to move more in to PowerCLI etc.

What is your expierence and where to you see it more - and maybe also in general - more native, more powershell, or other?

Regards, K

0 Kudos
1 Solution

Accepted Solutions
KThorlund
Enthusiast
Enthusiast
Jump to solution

I have fixed the vAPI issue now, so will stick with it for another while..

Actually there were two issues.

The vAPIEndpoint service on one of the vCenters hung, and needed to be restarted. Then the code was working one of the vCenters.

Second, I had a code mistake, where I had hard coded the wrong vCenter number, whereby the vAPI failed to access the VM and apply the tag.

Correct both, solved the issue, and I am now able to work with the tags as expected.

In the same process, the vAPI plugin was updated to 7.5.1.

View solution in original post

0 Kudos
2 Replies
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi,

I can send you a build of vAPI plug-in with the latest vAPI libraries, if you are willing to test if the issue is fixed there.

If by 'native vRO' you mean tagging support in vCenter plug-in JS API, this will probably not happen soon, as the vCenter plug-in is built around vCenter SOAP APIs, and tagging is not exposed there.

In vRO 8.1 you have the option to have scripting actions in Powershell/PowerCLI (also Python and Node.js), so you can also try that.

0 Kudos
KThorlund
Enthusiast
Enthusiast
Jump to solution

I have fixed the vAPI issue now, so will stick with it for another while..

Actually there were two issues.

The vAPIEndpoint service on one of the vCenters hung, and needed to be restarted. Then the code was working one of the vCenters.

Second, I had a code mistake, where I had hard coded the wrong vCenter number, whereby the vAPI failed to access the VM and apply the tag.

Correct both, solved the issue, and I am now able to work with the tags as expected.

In the same process, the vAPI plugin was updated to 7.5.1.

0 Kudos