I found the following post which explained using the ovftool command line utility to set an IP address: https://www.mylesgray.com/virtualisation/deploying-ovaovf-remote-vcenter-using-ovftool/
My problem is that when I run the ovftool against the ova (and the ovf inside), I do not get the output I need to determine the Instance ID for the network adapater. The only Instance ID that comes up is for the disk, which doesn't work.
[root@delphi OVA_Build]# ovftool SSMS-2.1.3-Stage-root-unlocked.ova
OVF version: 1.0
VirtualApp: false
Name: SSMS2.1.3-Prod-OVF
Download Size: 2.68 GB
Deployment Sizes:
Flat disks: 200.00 GB
Sparse disks: 6.79 GB
Networks:
Name: VM Network
Description: The VM Network network
Virtual Machines:
Name: SSMS2.1.3-Prod-OVF
Operating System: centos64guest
Virtual Hardware:
Families: vmx-07
Number of CPUs: 4
Cores per socket: 1
Memory: 4.00 GB
Disks:
Index: 0
Instance ID: 8
Capacity: 200.00 GB
Disk Types: SCSI-lsilogic
NICs:
Adapter Type: PCNet32
Connection: VM Network
I'm trying to run the following command (using env variables $VERSION, $BUILD_NUMBER, and $BUILD_IP_ADDRESS) but I do not know what goes in the InstanceID slot. Alternately, I would be ok with a command that keeps the existing IP address, but right now the networking info (IP, Gateway, Netmask) are all getting cleared out.
ovftool \
-ds=Skywalker \
-n=SSMS-$VERSION-Stage-$BUILD_NUMBER \
--ipAllocationPolicy=fixedPolicy \
--prop:vami.netmask0.<InstanceID>=255.255.255.0\
--prop:vami.gateway0.<InstanceID>=172.18.77.1\
--prop:vami.ip0.<InstanceID>=$BUILD_IP_ADDRESS\
--prop:vami.DNS.<InstanceID>=64.102.6.247\
--powerOn \
SSMS-2.1.3-Stage-root-unlocked.ova \
vi://root:[email protected]/Corona/host/RTP