Hi,
I am trying to deploy OVA using ovftool. I see the option --network and --net available for selecting the network by name, though I was not able to find a way to assign a static IP in the ovftool command itself. Something like --ip0=10.10.10.10. Is there a way we can do this? From UI when we deploy an OVA, we have provision to provide IP, Gateway, Netmask and DNS.
Thanks
Hello, vPupil-
If the ovf/ova is created to have settable properties, such as an IP of the machine, you can use the "--prop" parameter to ovftool.exe.
Per the documentation (at http://www.vmware.com/support/developer/ovf/ovf20/ovftool_201_userguide.pdf), the syntax to set a property is:
--prop:<option>=<value>
This is near the bottom of page 24, along with an example.
To see if the ovf/ova that you are using has configurable options, you can use ovftool.exe in "probe mode" (page 25). Just issue the command with only a source, no target, as such:
> ovftool.exe myAppliance.ovf
This should output the probe results, which should list any configurable properties, including their "key". This key is what you use with the "--prop" parameter. In the example probe on pages 25-26, the ovf has a couple of properties, "db-ip" and "ws-ip". So, you should be able to specify values for those properties by adding the following to your ovftool command:
... --prop:db-ip=10.10.10.10 --prop:ws-ip=10.10.10.11 ...
How does that do for you?
Hello, vPupil-
If the ovf/ova is created to have settable properties, such as an IP of the machine, you can use the "--prop" parameter to ovftool.exe.
Per the documentation (at http://www.vmware.com/support/developer/ovf/ovf20/ovftool_201_userguide.pdf), the syntax to set a property is:
--prop:<option>=<value>
This is near the bottom of page 24, along with an example.
To see if the ovf/ova that you are using has configurable options, you can use ovftool.exe in "probe mode" (page 25). Just issue the command with only a source, no target, as such:
> ovftool.exe myAppliance.ovf
This should output the probe results, which should list any configurable properties, including their "key". This key is what you use with the "--prop" parameter. In the example probe on pages 25-26, the ovf has a couple of properties, "db-ip" and "ws-ip". So, you should be able to specify values for those properties by adding the following to your ovftool command:
... --prop:db-ip=10.10.10.10 --prop:ws-ip=10.10.10.11 ...
How does that do for you?
Thanks. This solves my problem. I did not quite understood usage of --prop from the guide but your explained right to the point.
Hi,
I have used the probe tool which has output the following keys:
ip0
netmask0
Unfortunately, when I then use these keys in the ovf tool (--prop:ip0="1.1.1.11."), I get back warnings stating
ovf property with keys: ip0 does not exist
Furthermore, the ip of the virtual machine is not set properly. What am I missing here?
Ben, please see my answer in this thread:
Hi All,
I am planning to change the IP Address, Gateway and DNS of a Virtual Machine. I used the probe mode but not getting the ClassID, Key, InstanceID. Please see the output below.
C:\Program Files\VMware\VMware OVF Tool>ovftool d:\Test\Win7-test.ova
OVF version: 1.0
VirtualApp: false
Name: Win7-test
Download Size: 9.92 GB
Deployment Sizes:
Flat disks: 20.00 GB
Sparse disks: 13.55 GB
Networks:
Name: VM Network
Description: The VM Network network
Virtual Machines:
Name: Win7-test
Operating System: windows7_64guest
Virtual Hardware:
Families: vmx-08
Number of CPUs: 1
Cores per socket: 1
Memory: 3.00 GB
Disks:
Index: 0
Instance ID: 6
Capacity: 20.00 GB
Disk Types: SCSI-lsilogicsas
NICs:
Adapter Type: E1000
Connection: VM Network
-------
Without ClassID, Key and InstanceID , I cannot use the --prop parameter to set the IP, Gateway and DNS finally.
I do not know where is the problem exist.
Can anybody help me in the regard?
Thanks.
mzpvz
Can we also configure parameters like ( as mentioned below ) apart from ip address ?
default gateway
subnet netmask
dns
Hi,
I am trying to launch a vcenter ova image with the ovf tool options you specified but when launching the ova image on an ESXi host the IP is not set ( checked it through vShpere client ) and when launching the vcenter ova on a vcenter it works ( checked it through vShpere client ),
The command i have used is as follows,
For deploying on vcenter i used
os.system('ovftool --disableVerification --noSSLVerify --acceptAllEulas --ipAllocationPolicy=fixedPolicy --prop:vami.gateway.VMware_vCenter_Server_Appliance=10.207.0.1 --prop:vami.ip0.VMware_vCenter_Server_Appliance=10.206.0.35 --prop:vami.netmask0.VMware_vCenter_Server_Appliance=255.254.0.0 --datastore=cp-dsnew --powerOn --name=vCenter vCenter-Server-Appliance-5.5.0.20400-2442330_OVF10.ova vi://root:vmware@10.206.0.18/opennfv_cust_dc/host/opennfv_customer_cluster')
For deploying on ESXi i used
os.system('ovftool --disableVerification --noSSLVerify --acceptAllEulas --ipAllocationPolicy=fixedPolicy --prop:vami.gateway.VMware_vCenter_Server_Appliance=10.207.0.1 --prop:vami.ip0.VMware_vCenter_Server_Appliance=10.206.0.35 --prop:vami.netmask0.VMware_vCenter_Server_Appliance=255.254.0.0 --datastore=cp-dsnew --powerOn --name=vCenter vCenter-Server-Appliance-5.5.0.20400-2442330_OVF10.ova vi://root:vmware@10.206.0.18')
how can i make it work on ESXi?
Thanks