VMware Cloud Community
TheVMinator
Expert
Expert
Jump to solution

Update annotation with vCO

What is the best way to update the annotations on a new VM with VCO?

Is there a script I can use to do this?

Reply
0 Kudos
1 Solution

Accepted Solutions
mcfadyenj
Hot Shot
Hot Shot
Jump to solution

var spec = new VcVirtualMachineConfigSpec);

spec.annotation = "blah";
managedObject.reconfigVM_Task(spec);

View solution in original post

Reply
0 Kudos
9 Replies
mark_j
Virtuoso
Virtuoso
Jump to solution

You may want to repost this to the vCO community forum.

If you find this or any other answer useful please mark the answer as correct or helpful.
Reply
0 Kudos
TheVMinator
Expert
Expert
Jump to solution

yes - thanks

Reply
0 Kudos
mcfadyenj
Hot Shot
Hot Shot
Jump to solution

var spec = new VcVirtualMachineConfigSpec);

spec.annotation = "blah";
managedObject.reconfigVM_Task(spec);

Reply
0 Kudos
mcfadyenj
Hot Shot
Hot Shot
Jump to solution

btw sounds like you need to look into Onyx 🙂

http://labs.vmware.com/flings/onyx

TheVMinator
Expert
Expert
Jump to solution

OK thanks

Reply
0 Kudos
svenherren
Enthusiast
Enthusiast
Jump to solution


Hi,

this changes the Notes: section in the annotations.

And how is it possible to change the self defined annotations for the vm?


Regards

Sven

Reply
0 Kudos
robrtb12
Enthusiast
Enthusiast
Jump to solution

There is an action named 'setOrCreateCustomField' in 'com.vmware.library.vc.customattribute'

Reply
0 Kudos
svenherren
Enthusiast
Enthusiast
Jump to solution

Hi robrtb12

thank's a lot. Works just great.

Do you know if there is an action or so to modify the TAGs (not create) that were introduced with the vSphere WEB Client interface, which will somehow "replace" the custom attributes in there. I know with the latest Power CLI it's possible. But is it possible witch any orchestrator action/library/workflow (preferably not powershelling).

Regards

Sven

Reply
0 Kudos
lurims
Enthusiast
Enthusiast
Jump to solution

Nice one.  I want to do this for the ESXi hosts, how to do it?  Which is the right object and could you post sample code here?

Reply
0 Kudos