VMware Cloud Community
vPupil
Contributor
Contributor
Jump to solution

Is there a way to specify static IP for a deploying OVA in the ovftool command?

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

0 Kudos
1 Solution

Accepted Solutions
mattboren
Expert
Expert
Jump to solution

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?

View solution in original post

0 Kudos
7 Replies
mattboren
Expert
Expert
Jump to solution

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?

0 Kudos
vPupil
Contributor
Contributor
Jump to solution

Thanks. This solves my problem. I did not quite understood usage of --prop from the guide but your explained right to the point.

0 Kudos
Ben_832
Contributor
Contributor
Jump to solution

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?

0 Kudos
Kayne
Contributor
Contributor
Jump to solution

Ben, please see my answer in this thread:

https://communities.vmware.com/thread/472332

0 Kudos
mzpvz2001
Contributor
Contributor
Jump to solution

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

  

0 Kudos
eaglei1982
Contributor
Contributor
Jump to solution

Can we also configure parameters like ( as mentioned below ) apart from ip address ?

default gateway

subnet netmask

dns

0 Kudos
mssc74482
Contributor
Contributor
Jump to solution

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


0 Kudos