This weekend I spent sometime with the new vCenter Orchestrator virtual appliance in the ghetto lab. Instead of using the vSphere Client to deploy the OVF, I wanted to see if I could deploy it 100% from the command line using the ovftool. One of the cool things about OVF from an author perspective, is the ability to create custom variables which can then be specified during deployment to include guest customization, network or application configurations.
In the case of the new vCO virtual appliance, VMware provides the following four variables to customize the network configuration:
Using the ovftool, you can specify the following variables to not only deploy the vCO OVF through the commandline but also configure the guestOS network without having to manually go through vSphere Client or remote console.
Here is an example of the ovftool command to deploy vCO:
/usr/bin/ovftool --acceptAllEulas --skipManifestCheck '--net:Network 1=VM_Network' --datastore=vesxi50-1-local-storage-1 --diskMode=thin --name=vco --prop:vami.DNS.vCO_Appliance=172.30.0.100 --prop:vami.gateway.vCO_Appliance=172.30.0.1 --prop:vami.ip0.vCO_Appliance=172.30.0.142 --prop:vami.netmask0.vCO_Appliance=255.255.255.0 vCO_VA-18.104.22.168-507352_OVF10.ovf 'vi://root:firstname.lastname@example.org/?dns=vesxi50-1.primp-industries.com'
Opening OVF source: vCO_VA-22.214.171.124-507352_OVF10.ovf
If the command looks a little daunting, it is really not and to make the deployment of vCO even simpler, I decided to write a small shell script called deployvCO.sh that users can use.
The script assumes you have ovftool installed and downloaded both the vCO OVF and system disk in the same working directory. You will need to edit a few variables within the script which specifies the vCenter and ESXi host to deploy to and resources for vCO appliance such as network portgroup, datastore, etc.
Note: There are many ways of using the ovftool to deploy an OVF. In this simple example, it requires you to specify an ESX(i) host, but you can modify the locator to deploy to a VM folder or datacenter path. For more examples and options, please take a look at the ovftool documentation.
Here is an example of the script in action:
Once the vCO virtual appliance has been deployed, you can also have it automatically power on by specifying the following parameter --powerOn.
If everything was successful, you should now be able to point your browser to the hostname of your vCO server and you should taken to the vCO splash screen.
Now you can easily deploy vCO without the need of the vSphere Client! Happy workflowing 🙂