Hi
I am trying to Edit the VCAC vm specs using the VCO workflow "Request for Resource Action". The workflow executes fine but the changes are not applied to the VM.
Regards,
Deepak M.
Hi Deepak,
those resource actions are sometimes really tricky, because you won't get any error messages, if something is missing.
For the Resource Action: Edit, you have to specify the following properties:
If one of those is missing, nothing will happen, or sometimes an error message will be displayed for missing properties.
So, to reconfigure a virtual machine, you have to provide all parameters. Also those, you do not want to change! Its something like a rewrite, instead of an update.
Properties in detail:
Property | Value | Example |
---|---|---|
provider-operationId | Infrastructure.Machine.Action.Reconfigure | |
provider-machineId | <IaaS virtualMachineID> | fe384475-893e-4819-bdfd-8fafabdfa9eb |
provider-TARGET_MACHINE_NAME | <vm name> | vm-test-0001 (needs to match with machineId) |
provider-Cafe.Shim.VirtualMachine.Reconfigure.PropertyBag | <JSON Array as STRING, containing all Custom Properties> | [{"PropertyName":"myProperty1","PropertyValue":"myValue1","IsHidden":false,"IsRuntime":false,"IsEncrypted":false},{"PropertyName":"myProperty2","PropertyValue":"myValue2","IsHidden":false,"IsRuntime":false,"IsEncrypted":false}] |
provider-Cafe.Shim.VirtualMachine.Reconfigure.Requestor | 1 | |
provider-Cafe.Shim.VirtualMachine.Reconfigure.ExecutionSelector | 1 | |
provider-Cafe.Shim.VirtualMachine.Reconfigure.RequestDate | <M/d/yyyy h:mm:ss> | 11/19/2014 07:30:00 |
provider-Cafe.Shim.VirtualMachine.Reconfigure.CpuCount | <new CPU# value> | 2 |
provider-Cafe.Shim.VirtualMachine.Reconfigure.MemorySize | <new Memory value in MB> | 4096 |
provider-Cafe.Shim.VirtualMachine.Reconfigure.Storages | <JSON Array as STRING, containing all attached disks> | [{"ExternalId":"6000C273-4237-971b-bd1d-2c12d9390b35","CapacityInGB":30,"StoragePath":"VMFS_DEMO_01","StoragePolicy":null,"StoragePolicyMode":null,"Label":null,"Device":null,"CustomProperties":[{"PropertyName":"Name","PropertyValue":"Hard disk 1","IsHidden":false,"IsRuntime":false,"IsEncrypted":false}]}] |
provider-Cafe.Shim.VirtualMachine.Reconfigure.Networks | <JSON Array as STRING, containing all attached networks> | [{"NetworkName":"pg01-vlan1234","MacAddress":"00:50:56:98:df:32","CustomProperties":[{"PropertyName":"PortID","PropertyValue":"10","IsHidden":false,"IsRuntime":false,"IsEncrypted":false},{"PropertyName":"SubnetMask","PropertyValue":"255.255.255.0","IsHidden":false,"IsRuntime":false,"IsEncrypted":false}]},{"NetworkName":"pg02-vlan4321","MacAddress":"00:50:56:96:c7:a4","CustomProperties":[{"PropertyName":"PortID","PropertyValue":"20","IsHidden":false,"IsRuntime":false,"IsEncrypted":false},{"PropertyName":"SubnetMask","PropertyValue":"255.255.255.0","IsHidden":false,"IsRuntime":false,"IsEncrypted":false}]}] |
Hope this will help you.
For me it's working
Greets
Sascha
Hi Sascha,
Thank you for a wonderful Post.
Is there any way to get the properties values for
provider-Cafe.Shim.VirtualMachine.Reconfigure.PropertyBag,provider-Cafe.Shim.VirtualMachine.Reconfigure.Storages,provider-Cafe.Shim.VirtualMachine.Reconfigure.Networks
i am able to get all the VCAC vm properties with the inbuilt VCO action but is there any way to map/format to a string so, it can be passes as a value to the above properties.
Regards,
Deepak M.
Hi,
you can serialize a Properties object or an array of Properties object by using the action:
org.dojotoolkit.dojo.json.serialize
As result, you will get a json representation of the provided Properties input to use as value for the Edit input fields.
Greets
Or using JSON.stringify(object). The action you referred to may not stay since it was mainly used as part of the webviews which are to be deprecated in the next major version of vCO.
Have the same question.
How does one get current values for:
How to get values for provider-Cafe.Shim.VirtualMachine.Reconfigure.Storages, provider-Cafe.Shim.VirtualMachine.Reconfigure.Networks and propertyBag.I was thinking it should be in vcac Entity but could not find them.
Any help appreciated
Now I have the same question as many others here. How do we get these via the vCAC/vRA API.
I would like to use a portal to make REST call to vCAC/vRA API reconfigure action to change the Memory/CPU.
I was able to capture JSON from 'makerequest' from the Web UI but see no other way to get these value by direct REST call.
Any help greatly appreciated.