VMware Cloud Community
KThorlund
Enthusiast
Enthusiast

Update vCAC properties / Inventory - vCAC/VC Sync

Hi,

I have a custom Say-2 action which allows the user to change CPU and Memory.

it calls the function "System.getModule("com.vmware.library.vc.vm").changeVMvCPU(vm,newCPU) ;" which will update the VM in VC with the correct information.

Thou, the vCAC infomation is not updated with the right value / CPU count until the Inventory task runs.

I have an action which can trigger an Inventory scan / refresh, but as we know it is a rather heavy task as it runs on all entries/VMs.

I have tried to set the CPU count directly into the vCAC, but I does not seem to work. The old CPU is still shown in the vCAC entry.

- Have tried with following properties:

System.getModule("com.vmware.library.vcac").addUpdatePropertyFromVirtualMachineEntity(vCACHost,vmentity,"VMCPUs","4",false,false,false,false);

and

System.getModule("com.vmware.library.vcac").addUpdatePropertyFromVirtualMachineEntity(vCACHost,vmentity,"VirtualMachineProperties","4",false,false,false,false);

Does anyone know if it is possible to update the vCAC with the proper information, so I dont have to wait for or trigger the Inventory refresh.

I often feel I miss a faster synchronization between vCAC and VC... Dont you?

Regards, Kjeld

Reply
0 Kudos
4 Replies
daphnissov
Immortal
Immortal

Question:  Why are you using your own custom day-2 for this as opposed to the OOTB Reconfigure action which does the same thing?

Reply
0 Kudos
KThorlund
Enthusiast
Enthusiast

Because I dont wanna give the users access to all the options available in Reconfigure, e.g. reconfiguration of drives, network etc.

And I also wanna keep track of the amount of CPUs each business groups uses. I have create a pool for them, so they can only allocate what they have have been allowed to. Eg. each BG can use 20% of the total CPUs. We all need know the people who allocate whatever is available. This way they will trash their own BG..

In this this case it is an upgrade on 2 additional CPU. If the total goes over 50, the request will be rejected.

pastedImage_0.png

Reply
0 Kudos
daphnissov
Immortal
Immortal

Then you're going to have to seriously expand your XaaS so the reconfig updates the resources through vRA and not just vCenter. There should be some sample code out here if you search, and possible on {code}.

Reply
0 Kudos
TheOnlyJuan
Contributor
Contributor

similar issue here adding disks directly to the VC VM, vcac vm does not update until the data sync/collection...

did you find any workaround?

Reply
0 Kudos