Network configuration using the OVF Tool

The VMware™ OVF Tool is a command line utility that supports fast and robust hardware configuration and validation. OVF supports efficient, secure distribution of vApps and virtual machine templates. You can create a virtual machine within VMware vSphere and use the OVF Tool to export it into an OVF package for installation, either within your organization or for distribution to other organizations.

About this task

You can use the OVF Tool on the command line to specify configuration properties, including IP address, gateway, and netmask, saving you from the time consuming tasks of configuring numerous machines individually.

Note: The following information applies to VMware only. Depending on the VMware version and features you are using, some of the information might vary. Specifically, if your VMware server is not licensed to use vmtoolsd, options specified using the --prop option are not passed through to deployed virtual machines.

Deploying an IBM API Connect OVA with the OVF Tool

The following example shows how you can use the OVF Tool to deploy an IBM® API Connect OVA:

Example

/usr/lib/vmware-ovftool/ovftool --quiet --overwrite --powerOffTarget --powerOn --acceptAllEulas --noSSLVerify -n=APIM-v2015XXXX-01 -dm=thin -ds="ESX NFS (1)" -nw="VM Network" --prop:"ConfigNET.ipaddr.1"="1.1.1.1" --prop:"ConfigNET.gateway.1"="1.1.9.1" --prop:"ConfigNET.netmask.1"="255.255.255.0" --prop:"ConfigNET.hostname.1"="myAPIM01" --prop:"ConfigNET.domain.1"="test.ibm.com" --prop:"ConfigNET.search.1"="test.ibm.com" --prop:"ConfigNET.pri_dns.1"="1.1.9.2" --prop:"ConfigNET.sec_dns.1"="1.1.9.3"  --prop:"ConfigNET.ntp.1"="1.1.9.4" /path/to/APIManagement-ManagementAppliance-2015XXXX.ova vi://serverUN:serverPW@myVMserver

After the machine in the previous example boots up, you can deploy another machine and join it to the first one, as the next example shows

/usr/lib/vmware-ovftool/ovftool --quiet --overwrite --powerOffTarget --powerOn --acceptAllEulas --noSSLVerify -n=APIM-v2015XXXX-02 -dm=thin -ds="ESX NFS (1)" -nw="VM Network" --prop:"ConfigNET.ipaddr.1"="1.1.1.2" --prop:"ConfigNET.gateway.1"="1.1.9.1" --prop:"ConfigNET.netmask.1"="255.255.255.0" --prop:"ConfigNET.hostname.1"="myAPIM02" --prop:"ConfigNET.domain.1"="test.ibm.com" --prop:"ConfigNET.search.1"="test.ibm.com" --prop:"ConfigNET.pri_dns.1"="1.1.9.2" --prop:"ConfigNET.sec_dns.1"="1.1.9.3"  --prop:"ConfigNET.ntp.1"="1.1.9.4" --prop:"ConfigCastIron.mgmt_username.1"="admin" --prop:"ConfigCastIron.mgmt_password.1"='adminPassword' --prop:"ConfigCastIron.mgmt_ipaddr.1"="1.1.1.1" /path/to/APIManagement-ManagementAppliance-2015XXXX.ova vi://serverUN:serverPW@myVMserver

With the exception of three additional properties (which join the second machine to the first machine), the commands in the two examples are identical. Here is a breakdown of each option in the second command:

/usr/lib/vmware-ovftool/ovftool    
   // required binary, they must also have the correct license for their VM server
--quiet --overwrite --powerOffTarget --powerOn --acceptAllEulas --noSSLVerify   
   // various ovftool deploy options
-n=APIM-v2015XXXX-02   
   // desired VM name
-dm=thin -ds="ESX NFS (1)" -nw="VM Network"   
   // deploy method, server disk to use, and server network to use
--prop:"ConfigNET.ipaddr.1"="1.1.1.2" --prop:"ConfigNET.gateway.1"="1.1.9.1" --prop:"ConfigNET.netmask.1"="255.255.255.0"         // static network values
--prop:"ConfigNET.hostname.1"="myAPIM02" --prop:"ConfigNET.domain.1"="test.ibm.com" --prop:"ConfigNET.search.1"="test.ibm.com"    // more static network values
--prop:"ConfigNET.pri_dns.1"="1.1.9.2" --prop:"ConfigNET.sec_dns.1"="1.1.9.3"  --prop:"ConfigNET.ntp.1"="1.1.9.4"   
   // even more static network values
 --prop:"ConfigCastIron.mgmt_username.1"="admin" --prop:"ConfigCastIron.mgmt_password.1"='adminPassword' --prop:"ConfigCastIron.mgmt_ipaddr.1"="1.1.1.1"  
   // login information to talk to the first server
/path/to/APIManagement-ManagementAppliance-2015XXXX.ova vi://serverUN:serverPW@myVMserver    
   // URI of OVA and VM server

If the deploy command is successful, the second machine's network will appear as follows:

myAPIM02/APIManagement> net show all
Hostname (Static): myAPIM02
Domain (Static): test.ibm.com
Domain Search (Static): test.ibm.com
Nameservers (Static): 1.1.9.2 1.1.9.3
Gateway (Static on eth0): 1.1.9.1
NTP (Static): 1.1.9.4

Carrier timeout: 30 seconds

Eth0 (00:50:56:8a:2d:3f): Static
  Address: 1.1.1.1, Netmask: 255.255.255.0, Broadcast: 1.1.1.255
  MTU: 1500
  Link Status is not available

Routes: [None]

myAPIM02/APIManagement> net show status
Last attempt to start networking: Wed Sep 16 19:06:18 2015 GMT
Last time networking started:     Wed Sep 16 19:06:18 2015 GMT
Last time networking stopped:     Wed Sep 16 19:06:06 2015 GMT
Reason for last networking stop:  Normal shutdown
Current activity:                 Monitoring network