To my knowledge it is not possible to use EBS to alter description as it isn't included in the rest of the payload or otherwise exposed. It essentially goes straight into the postgres database as-is and remains there. It's not even possible to later call that deployment to change it (again, AFAIK).
Could you please clarify this - I know that "Deployment" description works that way you said (it is not even exposed in any EBS subscription and not possible to change it later through reconfigure/any vro class/whatever). Here i'm trying to work with machine's description
I can see it in my payload (as "__Notes" - double underscore), even can modify it but it is ignored by provisioning process... Is it goes directly to Postgress too?
Oh, sorry, that you can modify but because the VRM agent uses this information to write out the Notes field on a deployed VM you have to update the IaaS model for that. There's a vRO method in the plug-in that has an example. I haven't done it personally but a while back did some exploration on this very same topic and we came to the conclusion you'd have to do it there. Don't have much more specific info to provide. Maybe qc4vmware has done this before.
Thanks, I consider it as a "plan B" - I just don't see a point to make additional calls to IaaS just to update machine's notes/annotation - i'd like to take care of it on provisioning phase instead (feed all necessary info before machine even started building process). Am I asking too much?
You misunderstand, I don't mean make a separate call once it's written out, I mean the IaaS entity model for the deployment. The vRA plug-in for vRO has a method which allows you to update these values which will then take effect when machineBuilding starts. I just haven't done it myself so I don't remember which method/action it is and the syntax.
Hmm, and here is my problem - I don't know how to call entity manager on deployment's object at the "Requested -- PRE". If I understand correctly, at that moment deployment and its children do not exist yet... I completely lost here...
You've hit the nail on the head there - at the Requested(PRE) stage the IaaS entities don't exist so there is no VM record to update the "_Notes" field for.
If the only property you want to update is that one then perhaps just pick a later phase? It is not a crucial value on the VM build?
Alternatively, you could wrap the IaaS request with an XaaS form and then you can set the Description before submission
Also, forgot these parts of the EBS payload
Check here for a way to use this - vRA7 how to use virtualMachineAddOrUpdateProperties to update vRA VM Properties from vRO.
Well, I do understand that machine does not exist at this stage, however - if I redefine settings as CPU/Mem/Disk/name on this stage - IaaS would create a machine with this redefined properties. So, the question - how to tell IaaS to use updated "Description" field for the machine it is going to create? I just want to avoid additional call to IaaS to change machine's annotation/notes/description AFTER provisioning. Why not to use updated description right BEFORE provisioning call?
I can see that updated "__Notes" goes to payload and persist across all provisioning phases, but none of them actually uses it...
I was trying this out just there and I can do the following
This runs perfectly and vRO reports that the "__Notes" property is updated
A second run confirms that the value did go into the DB too!
(See the '.' on the end of the "__Notes" value read in the second time + the '..' on the 2nd update)
However, no matter whether how I refresh the VM view "Managed Machines" page or the "Items" page (reload VM view / full browser refresh / logout+login) the value displayed in the VM view is NEVER updated to show the new value stored in the DB
Seems very odd & very like a vRA bug IMO.
I can understand your frustration now
One other thing I did find was Gary Coburn's blog where he mentions this (in the comments/responses for a user named skraack) - vRealize Automation 7 – Enabling the Event Broker part 2 – Extending Clouds
He indicates that the virtualMachineAddOrUpdateProperties from the payload can be used to change this in the same phase you're using (Requested/PRE)
Right, will be quiet now and leave you be.
Thank you for the test. I would say if you work with already built machine in IaaS/vCAC you better to use "notes" property - it correlates to vCenter's machine annotation. Or you can change it in vCenter and vCAC will update machine's description after inventory collection.
I was not lucky with virtualMachineAddOrUpdateProperties for "__Notes". it works for everything but "__Notes", and that is my big problem here. My is vRA 7.4. There is a discussion I found about "__Notes" (link in my first post), looks like "__Notes" behavior was changes later in 7.x (read-only) - can anybody confirm that?