Today I have a rather small blogpost for you guys. I noticed that one of my vCloud Usage Meter appliances, still running on an ancient 3.6.1 version build 7359407, had some difficulties collecting data for one of the connected vCenter Servers. I got loads of e-mail messages from the Usage Meter instance with a “Usage Meter Hourly Collection, Errors Detected” subject. In this e-mail however there was no error message mentioned for this specific vCenter Server. So there was no obvious reason for it to fail.
After looking at the log files located at “/var/log/usgmtr“, I noticed the following piece the exception message in the collector.log:
2021-02-24 12:52:06,515 ERROR [Collector vc01-XXXXXXXXXXXX.loc] vc.VCenterCollector: com.vmware.pbm.RuntimeFaultFaultMsg: at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:135) at com.sun.xml.internal.ws.client.sei.StubHandler.readResponse(StubHandler.java:238) at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:189) at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:276) at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:104) at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:77) at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:147) at com.sun.proxy.$Proxy97.pbmQueryProfile(Unknown Source) at com.vmware.cloud.usgmtr.collect.vc.VCenterConnector.accessStoragePolicyServer(VCenterConnector.scala:177) at com.vmware.cloud.usgmtr.collect.vc.VCenterConnector.logIn(VCenterConnector.scala:126) at com.vmware.cloud.usgmtr.collect.vc.VCenterConnector.logIn(VCenterConnector.scala:101) at com.vmware.cloud.usgmtr.collect.vc.VCenterCollector$.com$vmware$cloud$usgmtr$collect$vc$VCenterCollector$$processVC(VCenterCollector.scala:85) at com.vmware.cloud.usgmtr.collect.vc.VCenterCollector$$anonfun$1$$anonfun$apply$1.apply(VCenterCollector.scala:47) at com.vmware.cloud.usgmtr.collect.vc.VCenterCollector$$anonfun$1$$anonfun$apply$1.apply(VCenterCollector.scala:36) at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24) at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
Turns out, this is a “bug” in the version of vCloud Usage Meter we are running. Starting from Usage Meter 3.6.1 we need more permissions on the vCenter Server we are collecting from. Previously the only thing required was the “Read-Only” role, since this release you need the additional “Profile-drive Storage View” permission. This isn’t something new for us, but somebody probably removed this permission at some point making it generate this exception.
So if you want to fix this, go ahead and create a new Role in vCenter with only this permission. Assign the user that you will authenticate with this role in the root of the vCenter Server. You can do this by following the next couple of steps:
- Login to the HTML5 vSphere Client.
- Go to Administration -> Roles.
- Add a new Role and call it “vCloud Usage Meter”. Give it the “Profile-drive Storage View” permission.
- Browse to the root of the vCenter Server hierarchy and go to the Permissions tab.
- Grant the user permissions by adding the role to the user.
Once you did this everything will be fixed and vCloud Usage Meter should be able to collect the inventory again.
2 Comments
Hitesh · July 20, 2021 at 12:20 pm
Hi Bryan, Do you know if VCD 10.2.2 is compatible with vcloud usage meter 4.2. I’ve been checking the vmware documentation but dont see any information.
Bryan van Eeden · August 31, 2021 at 1:27 pm
Hi Hitesh,
Have a look at the Interoperability Matrix from VMware https://interopmatrix.vmware.com/#/Interoperability. VCD 10.2.2 is compatible with Usage Meter 4.2.