VMworld 2012 Session (OPS-CIM1274)
Looks like I will be speaking at VMworld on a panel session with Thomas Corfmat, Igor Stoyanov, Sean Harrison, and Vivienne Cleveland:
Looks like I will be speaking at VMworld on a panel session with Thomas Corfmat, Igor Stoyanov, Sean Harrison, and Vivienne Cleveland:
So this year I have a couple of topics that I and a couple of others (Cody Bunch, Joerg Lew) have turned into for the Call for Papers. User voting for the topics has opened (here) and we would appreciate your help in getting these sessions selected. Here are the sessions:
I know that I would definitely appreciate your vote for the above sessions! Also, don’t forget to vote for the many other great sessions that have been turned in. There are way too many to list but you can go see for yourself!
In response to Cody Bunch‘s recent post on Testing DPM with PowerCLI, I decided to translate this into a vCO workflow. I did this because I thought it would be fun. The workflow is relatively simple and does the following:
Instead of making this a lengthy post, I have attached the workflow for you to download if you want to see it or play with it. Enjoy!
Test DPM vCO Workflow
I was in need of automatically renaming a generic datastore name in one of my host deployment workflows and found that the renameDatastore() method was deprecated (Thanks Jörg!) and that we are to use rename_Task(). The rename_Task() method is one that takes any manageable object. Here is an exert from the API reference:
Rename_Task
Renames this managed entity.
Any % (percent) character used in this name parameter must be escaped, unless it is used to start an escape sequence. Clients may also escape any other characters in this name parameter.
See name
- Required Privileges
- When object is VirtualMachine - VirtualMachine.Config.Rename
When object is Datacenter - Datacenter.Rename
When object is Folder - Folder.Rename
When object is VirtualApp - VApp.Rename
When object is ResourcePool - Resource.RenamePool
When object is ClusterComputeResource - Host.Inventory.RenameCluster
When object is DistributedVirtualSwitch - DVSwitch.Modify
When object is DistributedVirtualPortgroup - DVPortgroup.Modify
When object is Datastore - Datastore.Rename
When object is Network - System.Read
So I implemented the following code into a new scriptable task within my workflow:
1 2 3 4 5 6 7 8 | var hostDatastoreSystem = VcPlugin.toManagedObject( host, host.configManager.datastoreSystem ); // Rename datastore on host matching Datastore for each (var datastore in hostDatastoreSystem.datastore) { if(datastore.name == "Datastore"){ datastore.rename_Task("newDsName"); System.log("Changing datastore name to "+newDsName); } |
Another thing I realized was that the API explorer within vCO is not always as forthcoming with information so a word to the wise, always check the API reference (http://pubs.vmware.com/vsphere-50/topic/com.vmware.wssdk.apiref.doc_50/right-pane.html) for more detailed information.