pages

Wednesday, December 28, 2011

vCO - Auto Deploy Plug-in

I used the holidays to test around with the new vCenter Orchestrator Plug-in for VMware Auto Deploy. The main value is that there is no need to use Microsoft Powershell which isn´t really often available in pure linux environments :)

First you have to configure the vCenter Server Appliance to act as a TFTP or DHCP server if this one isn´t already in place. This page describes the DHCP/TFTP configuration:

http://jreypo.wordpress.com/tag/vsphere-auto-deploy/

Once the services are configured you have to download the ESXi depot file from our download area and place it on a webserver. After that you can download the Plug-in for the vCenter Orchestrator and install it with the vCenter Orchestrator configuration interface.




Now you can add the vCenter Server Appliance as a VMware Auto Deploy host:














After adding the host you need to add a depot too. Please note that you have to extract the ESXi depot .zip file downloaded in the beginning cause you have to point to the "index.xml" file in the package.












With the host and depot you can now create a deploy rule and activate it with the included workflows.













You can check the activation really fast by clicking the "Inventory" tab and taking a look into the Auto Deploy tree.













If everything looking as expected you can now check to start a host system (I tested it with some virtual machines) and see if it boots into an ESXi image.














This is just a small quick start, there are some more possibilities (answer files etc.) but it shows how to get your feet on the street. See you next year!

P.S.: The TFTP/DHCP service isn´t a supported scenario. Thanks William for the hint.


Tuesday, December 13, 2011

vCO - How to add a second SCSI controller


Sometimes you will miss some OOTB workflows in your vCenter Orchestrator library. The last time I searched for a workflow the customer task was:

"Add a second disk with a different controller type and and a new bus ID (1)."

Reading this the task sounds really simple, but when searching there is only an "Add disk" workflow in the library which always crashes if you set the bus ID to 1, cause there isn´t a second SCSI controller.
Also there is no workflow to add a second SCSI controller and there is no method in the vSphere Client. So I decide to check how the vSphere client handle this event and used Onyx (http://labs.vmware.com/flings/onyx) to look for the used specifications.

So I found out that there is only an "add disk" method in the vSphere Client which automatically adds a second SCSI controller. With this knowledge I build a workflow which adds a second SCSI controller and then a second hard disk on this SCSI controller.

First make a clone of the "createVirtualScsiControllerConfigSpec" action and change the lines:

controller.key = 1;
controller.busNumber = 1;

Now create a new workflow and add a "Scriptable Task" element and the "vim3WaitTaskEnd" action. My IN parameter are: the VM (VC:VirtualMachine), the diskSize (number), the datastore (VC:Datastore) and the thinProvisioned (boolean) switch. The attributes are: task, progress, pollRate.












In the "Scriptable Task" element I added the lines shown in the screenshot. As you can see I use my cloned action to create the second controller. Than just add the second disk and push all into the array and start the reconfigVM task.

Have fun!