Step 4 - (Optionally) You can specify some additional metadata including appliance name and URLs to help others who maybe consuming your VA once it has been exported as an OVF/OVA. Step 3 - In the OVF Details tab, select VMware Tools for the OVF environment transport Once enabled, select OVF environment for the IP allocation scheme as shown in the screenshot below. Step 2 - Select the VM in the Inventory and then click on Configure->vApp and then check the Enable vApp Options.
Install VMware Tools, apply all OS updates and then shutdown the VM before proceeding to the next step. Step 1 - In vCenter Server, create a new VM with your desired configuration and then install an operating system of your choice. Now that you have some background in how the OVF properties are defined and then consume within the GuestOS, let's now take a look at what you need to setup to start developing your own VA.
This is an important fact as this is where users will be spending the majority of their time when developing their own VA, it is completely based on how simple or complex you would like to get with your customization and the code required to perform the operations from within the GuestOS. This also means that the creation of the guest script and what it performs is completely up to the end user, this would be no different if you were to create an Automation script for the GuestOS to perform a specific task. This guest script can be written using any language and its job is to take the key/value pairs and do something with them, such as reconfiguring a network interface as an example.
GuestOS Customization ScriptĪs alluded from the previous section, the the OVF key/value properties are accessed from within the GuestOS and this is done by the use of a startup script that would run automatically run when the VM is powered on. Once this is done, we can then access these key/value pairs directly from the GuestOS for further processing. The way in which this happens is through the use of VMware Tools being installed within the GuestOS AND enabling the OVF environment transport mechanism for the given VM. The real magic is how these key/values are then processed from within the GuestOS to actually do something interesting like customizing the network stack or initializing or configuring an application to start. These key/values pairs by themselves have no meaning, you can literally have Key=Foo with Value=Bar. If you have ever deployed a VMware-based VA using the vSphere UI, you probably would have seen a wizard similar to the one above prompting for input whether that is networking, credentials, application settings or any other configuration for that matter. These are simply key/value pairs that are defined outside of the Virtual Machine and then specified during deployment by a user when importing an OVF/OVA.
I will also publish a reference Linux and Windows implementation so that you can use that as a basis to build your own VA, which is not limited to just Linux or Windows, it can be ANY GuestOS that vSphere supports. In Part 1, I will take you through the two important concepts of building your own VA and then in Part 2 and Part 3, we will take a look at building both a Linux and Windows VA. This was the perfect opportunity and excuse for me to finally document * my* process, in case it can help others wanting to do the same, especially for a home lab setup.
If you want to setup a static IP Address, you would need to first deploy the VM and then login to the console or SSH (if you have DHCP enabled) and then manually update the networking settings.įor my use case, Studio was going to be overkill and not to mention it may not even support PhotonOS or other modern OSes in general. However, everything that is needed to build your own VA is actually available right in vCenter Server. Most recently, I found myself building out a couple of VAs for my own day to day use, including a custom PhotonOS OVA that allows me to configure a static network address during deployment through the use of custom OVF properties. The official PhotonOS OVA that VMware ships does not provide this option and automatically defaults to DHCP. Studio is used by many of our partners when creating their VA offerings, although it may not be the easiest thing to get started with, it does provide a complete end-to-end solution. I normally point folks over to our official Virtual Appliance (VA) authoring tool, VMware Studio which includes a number of development resources to help get started. This has been a topic I have been wanting to write about for quite some time, especially as I get asked about this on fairly regular basis from both partners and customers.