VMware OVF Tool is a command-line utility that allows you to import and export OVF packages to and from many VMware products. Use Fusion Pro to connect to VMware vCloud Air, the public cloud service by VMware, to securely manage and download cloud workloads, or run an entire cloud environment directly on your Mac, all from within VMware Fusion 8 Pro. Leverage the cloud to share virtual machines with anyone in your organization for tests, analysis or demonstrations. VMware ESX is embedded hypervisor software and is available in two versions: ESX Server and ESXi Server. Open Virtualization Format (OVF) is an open-source standard for packaging and distributing software applications for virtual machines (VM). An OVF package contains multiple files in a single directory. VMware Project Photon; The OVF Tool supports the following Mac OS X 64-bit operating systems: Mac OS X 10.11; Mac OS X 10.10; Mac OS X 10.9; Supported VMware Products and Platforms. Version 4.3 of the OVF Tool supports the following VMware software: vSphere 6.7, 6.5, 6.0, and 5.5; vCloud Director 8.20, 8.10, 8.0, 5.6, and 5.5 (source from OVF. The OVF runtime environment is only available while the VM is powered and it can be accessed from either VMware Tools or from a special ISO that is mounted to the guestOS CD-ROM device. To enable the OVF runtime environment, you just need to perform these two simple steps: 1. Edit your VM and select the Options tab and enable the vApp Options.
- Published: March 6, 2017
- Author:Ludovic Rivallain
- Tags:scriptlinuxvmwareovfcustomization
In order to fully configure a virtual machine after a clone of OVF deployment, it may be useful to use settings from virtualization layer in the guest OS: for example to run Guest OS customization as already discussed in this blog.
Today, we will focus on OVF properties.
- Presentation of OVF properties
- Get OVF properties from the guestOS
If you deploy some VM through OVF/OVA files, you are probably already familiar with OVF settings. They appear as the possibility to customize VM settings during the deployment process:
Typical OVF properties include: Network settings (IP address, netmask, gateway…), users configuration (username, password). As properties are not restrictives, it is possible to create custom keys to manage any other kind of customization.
OVF properties are a part of the full OVF environment encapsulating a VM deployment process and to use it inside of a VM, some scripting is necessary.
Representation of OVF properties
XML representation of an OVF environment configuration can be retrieved in a guest OS by 2 ways:
- As a CD-ROM drive containing the XML document
- VMware Tools in the
guestinfo.ovfEnv
variable
Here is an example of OVF environment of a VM with customized properties:
PropertySection
contains the list of OVF properties that can be used to customize a guest OS.
When you create a new template for OVF export, it is possible to create/edit/delete custom OVF properties.
From vSphere Web client -> Edit Settings of a VM -> vApp Options: In Authoring section, it is possible to give a name/version/url to describe your future OVF and to manage properties:
In the edition/creation wizard, the most useful fields are:
- Label: How is named the parameter when user is prompted to fill its value
- KeyID: How is named the parameter in the XML file
- Category: a way to order parts of the customization form fields by grouping properties together
- Description: to give more information about the purpose of the field to end users
Vmware Ovf Macアドレス
It is possible to choose between 2 types of properties:
- Static propertie: Values will be configured by user or will be fixed by the default ones.
- Dynamic propertie: Values will be set according to the virtualization layer information (ex: getting IP from an IP Pool attached to a PortGroup.)
Then you can choose between sub-types:
- String
- Password
- Integer
- Real
- Boolean
- (external) IP address
- …
You can also set default value, or some requirements (like the minimal/maximal length of a string):
As we saw previously, a user deploying an OVF coming from export of VM where properties are set, will be prompted to fill the values of the properties.
it is also possible to edit properties values of an already deployed VM: From vSphere Web client -> Edit Settings of a VM -> vApp Options.
In this case, you may have to run ‘again’ some GuestOS glue code to take the change into account.
When you configure an OVF environment, you can choose between CD-ROM and VMware-tools methods to transport information into the virtual machine:
VMware tools
If you choose VMware tools
transport method for OVF environment, according to the used OS type, the method to retrieve properties can vary a bit. Here are two samples to get the XML representation.
Vmware Ovf Mac Address
On Windows:
On Linux:
ISO image
If you choose ISO image
transport method for OVF environment, you need to :
- mount the CD-ROM drive to your guest OS
- read the
ovf-env.xml
file
Properties usage
Ovf Vmware For Mac Catalina
Here is a very simple Python helper to deal with the XML blob from OVF environment to export properties:
From here, it is pretty simple to customize the guest OS. For example, to change the root password based on root_password
properties:
Now you are ready to produce OVF appliances with customization on deployment. This can be very useful to easily script the deployment of many VM instances or to provide a ‘ready-to-deploy’ appliances to customers.
Full script for the customization of the guestOS can be found here: get-ovfenv.py
Comments are closed.