Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 247559

vami_ovf_process fails to call vami_set_dns correctly

$
0
0

Hi,

 

We faced this problem while trying to pass on three IPs for DNS through the Edit Settings section of VM Properties. The new IPs we pass would as expected are part of the /opt/vmware/etc/vami/ovfEnv.xml . In vmware 2.1, the vami_ovf_process located at /opt/vmware/share/vami would strip the DNS IPs present in the ovfEnv.xml to pick only the first two and would then call vami_set_dns located at the same location to update the DNS IPs on the file, /etc/resolv.conf .

 

However with the VMS 2.6, when more than 2 IPs are passed for DNS through the ovfEnv.xml, the vami_ovf_process isn't taking the first 2 IPs as it was supposed to be and ends up restoring the default DNS configuration. However when only 2 IPs are provided, it works fine. So i'd think the process of picking up only the first 2 is going for a toss.

 

Below is the log snippet:

 

lglob229:/opt/vmware/share/vami # ./vami_ovf_process --setnetwork

Appliance Name - DevKit

Configuration for eth0 found

Device    : eth0

Ip      : 10.247.14.229

Netmask : 255.255.255.0

Gateway : 10.247.14.1

vami_login: no process found

Dns     : 102.254.166.25,102.254.166.26,102.254.166.27

Usage : vami_set_dns DNS_Server_1 [DNS_Server_2]

 

The vami_ovf_process script lines as it was on 2.1:

 

    dnsList = dns.split(',')

    dnsArg = ""

    if len(dnsList) > 0:

        dnsArg = dnsList[0]

    if len(dnsList) > 1:

        dnsArg = dnsArg + " " + dnsList[1]

    if len(dnsList) > 2:

        log.message (vami_log.LOG_WARNING, "VAMI can configure a maximum of two DNS servers. Ignoring the rest.");

 

The vami_ovf_process script lines as it is on 2.6:

 

    dnsList = dns.split(',')

 

    # remove whitespace from each address

    dnsList = map(lambda x: x.strip(), dnsList)

 

    if len(dnsList) > 2:

        log.message (vami_log.LOG_WARNING, "VAMI can configure a maximum of two DNS servers. Ignoring the rest.");

 

Is this something that can be resolved?

 

Thanks,

Harsha,

EMC^2


Viewing all articles
Browse latest Browse all 247559

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>