VMware Cloud Community
habakook
Contributor
Contributor

How do I assign a static IP using ovftool?

Hello community,

I need to set up an instance with specific IP. It is on the network which doesn't have DHCP.

This answer Is there a way to specify static IP for a deploying OVA in the ovftool command? advises to use properties. But I am not using .ovf, but .ova file, and when I do:

ovftool gateway-9.1.01-6703-vmware-centos-x86_64e.ova

I get the following info from ova file:

[13:06:46][Step 5/13] OVF version:   1.0

[13:06:46][Step 5/13] VirtualApp:    false

[13:06:46][Step 5/13] Name:          gateway-9.1.01-6703-vmware-centos-x86_64

[13:06:46][Step 5/13]

[13:06:46][Step 5/13] Download Size:  1.80 GB

[13:06:46][Step 5/13]

[13:06:46][Step 5/13] Deployment Sizes:

[13:06:46][Step 5/13]   Flat disks:   50.00 GB

[13:06:46][Step 5/13]   Sparse disks: 4.28 GB

[13:06:46][Step 5/13]

[13:06:46][Step 5/13] Networks:

[13:06:46][Step 5/13]   Name:        VM Network

[13:06:46][Step 5/13]   Description: The VM Network network

[13:06:46][Step 5/13]

[13:06:46][Step 5/13] Virtual Machines:

[13:06:46][Step 5/13]   Name:               gateway-9.1.01-6703-vmware-centos-x86_64

[13:06:46][Step 5/13]   Operating System:   rhel6_64guest

[13:06:46][Step 5/13]   Virtual Hardware:

[13:06:46][Step 5/13]     Families:         vmx-07

[13:06:46][Step 5/13]     Number of CPUs:   2

[13:06:46][Step 5/13]     Cores per socket: 1

[13:06:46][Step 5/13]     Memory:           2.00 GB

[13:06:46][Step 5/13]

[13:06:46][Step 5/13]     Disks:

[13:06:46][Step 5/13]       Index:          0

[13:06:46][Step 5/13]       Instance ID:    9

[13:06:46][Step 5/13]       Capacity:       50.00 GB

[13:06:46][Step 5/13]       Disk Types:     SCSI-lsilogic

[13:06:46][Step 5/13]

[13:06:46][Step 5/13]     NICs:

[13:06:46][Step 5/13]       Adapter Type:   VmxNet3

[13:06:46][Step 5/13]       Connection:     VM Network

As you can see there are no properties for me to configure. So therefore I can't do anything like that:

--prop:{ClassID}.{Key}.{InstanceID}={Value}

So who do I set up this .ova instance with the specific IP on DMZ network?

I've tried various combination of the following, but unsuccessfully:

ovftool --nic:ipAddress="10.7.42.191" --powerOn --datastore="SSD_Datastore" --noSSLVerify --name="my_name" -dm=thin --network="DMZ" C:\Shared\gateway-9.1.00-6342-vmware-rhel-x86_64.ova vi://root:"my_password"@my.host.com

0 Kudos
4 Replies
JCMorrissey
Expert
Expert

Hi,

Not sure if you found a solution already but if not take a look at :

Static IP given during OVA deployment doesnt take effect post deployment

Please consider marking as "helpful", if you find this post useful. Thanks!... http://johncmorrissey.wordpress.com/
0 Kudos
habakook
Contributor
Contributor

Thanks for the reply JCMorrissey

No, I haven't found a solution for this problem. I've tried to follow the solution suggested in your post and this is what I got.

The answer suggests to put --prop:ClassId.Key.InstanceId=value, but my probe file (shown in the first post) doesn't show those values so I can't figure out what to put for ClassId, Key and InstanceId. Nevertheless, I assumed that vami.DNS.vPAS is somehow a default classes, key and ids, so I used that. This is what I got:

Task Completed

Warning:

- OVF property with key: 'vami.DNS.vPAS' does not exists.

- OVF property with key: 'vami.gateway.vPAS' does not exists.

- OVF property with key: 'vami.ip0.vPAS' does not exists.

- OVF property with key: 'vami.netmask0.vPAS' does not exists.

- No manifest entry found for: 'gateway-9.1.00-6342-vmware-rhel-x86_64-disk1.vmdk'.

- Skipping monitor as the --X:waitForIp option is not given.

Completed successfully

Needless to say, OVA was deployed but no IP was assigned.

Please help.

0 Kudos
sainathpadala
Contributor
Contributor

Hi habakook,

I am facing same issue as yours. There are no properties present for my ovf as well. 

Please help

0 Kudos
scott28tt
VMware Employee
VMware Employee

@habakook 

Moderator: Moved to OVFTool Discussions


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
0 Kudos