DEV Community

Ashish-Chorge
Ashish-Chorge

Posted on

VMware Appliance OVF Properties update through CLI

This article is to update VMware appliance ovf properties through command line. Sometimes we cannot access VC and only can access VMs through ESX UI.

Check over properties exists in VM

  1. login to VM as root and execute ovfenv command
root@vcf91-installer [ ~ ]# ovfenv
[vm.vmname]=VCF-SDDC-Manager-Appliance-9.1.0.0300.25536191
[ROOT_PASSWORD]=
[LOCAL_USER_PASSWORD]=
[vami.hostname]=vcf91-installer.mylab.com
[guestinfo.ntp]=172.30.20.3
[vami.ip_address_version.SDDC-Manager]=IPv4
[vami.ip0.SDDC-Manager]=172.30.20.12
[vami.netmask0.SDDC-Manager]=255.255.255.0
[vami.gateway.SDDC-Manager]=172.30.20.1
[vami.ipv6.SDDC-Manager]=null
[vami.ipv6_prefix.SDDC-Manager]=null
[vami.ipv6_gateway.SDDC-Manager]=null
[vami.domain.SDDC-Manager]=mylab.com
[vami.searchpath.SDDC-Manager]=mylab.com
[vami.DNS.SDDC-Manager]=172.30.20.2,172.30.20.3

Enter fullscreen mode Exit fullscreen mode
  1. Change the directory to the VM scripts folder where all the firstboot and subsequent boot scripts are stored.
cd /opt/vmware/vcf/commonsvcs/scripts/

Enter fullscreen mode Exit fullscreen mode
  1. Example to change NTP server details
cd /opt/vmware/vcf/commonsvcs/scripts/ntp/

root@vcf91-installer [ /opt/vmware/vcf/commonsvcs/scripts/ntp ]# ls -ltr
total 12
-r-xr-x--- 1 root vcf 853 Jun 27 02:53 update-ntp_server.sh
-r-xr-x--- 1 root vcf 231 Jun 27 02:53 setup-ntp.sh
-r-xr-x--- 1 root vcf  45 Jun 27 02:53 refresh-ntp.sh


./update-ntp_server.sh 172.30.20.250

reboot the VM
Enter fullscreen mode Exit fullscreen mode

Top comments (0)