VMware Cloud Community
cpjones44
Contributor
Contributor

vCO 5.5 Linux Customisation not setting DNS Servers

Hi there,

I have recently deployed the vCO 5.5 appliance, and I'm having problems trying to figure out why my DNS servers are not being populated in /ets/resolv.conf.

I'm using the built-in Clone, Linux with single NIC workflow to clone a CentOS 6.4 template. In my workflow, as an input to the Clone, Linux with single NIC workflow, I am passing an Array/String value of my two DNS servers. I can run this workflow no problems, the VM deploys and settings like hostname, IP address, Netmask and Gateway are set - just not DNS servers.

If I run cat /etc/resolv.conf I get nothing, not even comments in the file. Name resolution fails as a result.

FYI - in my CentOS VM, I'm not using NetworkManager. I have read that vCD customisation and DNS can not play together if NetworkManager is enabled. I have checked this in my template and I can confirm I'm not using NetworkManager.

Logs from the workflow run don't show anything revealing (from /var/log/vco/app-server/server.log)

2013-12-06 11:25:11.988+1100 [http-bio-0.0.0.0-8281-exec-67] INFO  {} [AdminClientImpl] Client was created successfully

2013-12-06 11:25:12.429+1100 [http-bio-0.0.0.0-8281-exec-67] INFO  {} [AdminClientImpl] Client was created successfully

2013-12-06 11:25:14.603+1100 [http-bio-0.0.0.0-8281-exec-67] INFO  {} [SecurityTokenServiceImpl] Successfully acquired token for user: <username>@<domain>

2013-12-06 11:25:15.483+1100 [http-bio-0.0.0.0-8281-exec-67] INFO  {} [SecurityTokenServiceImpl] Successfully acquired token for user: {Name: <username>, Domain: <domain>}

2013-12-06 11:25:15.491+1100 [http-bio-0.0.0.0-8281-exec-67] INFO  {} [Execution] Executing workflow 'Clone Linux'

2013-12-06 11:25:15.499+1100 [org.springframework.jms.listener.DefaultMessageListenerContainer#0-1] INFO  {} [Execution] Invoking workflow handler.ff80808142b2f1960142c54b4be50065

2013-12-06 11:25:19.653+1100 [WorkflowExecutorPool-Thread-7] INFO  {<username>:Clone Linux:24c7350a-94a5-47f3-a2a9-1c2b467846fe:ff80808142b2f1960142c54b4be50065} [SCRIPTING_LOG] [Clone Linux/Clone, Linux with single NIC (12/6/13 11:25:15)] Found a Virtual Ethernet card at 12. Key: 4000

Anyone else had this issue or could offer pointers as to what the cause may be?

Thanks,

Chris.

0 Kudos
7 Replies
Burke-
VMware Employee
VMware Employee

For others viewing this thread, Chris has made a blog post on copying files to guest os using the Guest Operations workflows of vCO... guess which file his blog post covers... yep, resolv.conf Smiley Wink

http://cpjon.es/index.php/2013/12/vco-guest-file-operations-copy-files-from-vco-appliance-to-your-vm...

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
richardjamesloc
Contributor
Contributor

Hi Chris,

I had a similar issue with the "Clone, Linux with single NIC" workflow.  I think the issue is related to the workflow as it comes out of the box.  I duplicated the workflow and edited the fourth item - the action "getCustomizationGlobalIPSettings".  It looks like VMware did not bind the input parameters in the action to the input parameters for the overall workflow (see screenshot below), so the dnsServerList never gets put into the customisation.  If you bind the input parameters, it should work ok.  I've added other steps to my deploy Linux from template workflow, but I think this is all I did to fix the blank /etc/resolv.conf issue without copying files in.

Please let me know if that doesn't solve it for you.

Richard

getCustomizationGlobalIPSettings.jpg

0 Kudos
Burke-
VMware Employee
VMware Employee

Hi Richard - this post is not to contest what works for you ... just to mention that the item you are specifying in that screenshot is for global settings irregardless of NIC. The dnsserver list input IS passed in to individual NIC settings within the two Customize clone linux workflows since each nic can have different DNS settings. I have done extremely little with Customizing Linux in all the years I've been working with vCO so I can't comment much more than just pointing this out Smiley Wink

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
0 Kudos
richardjamesloc
Contributor
Contributor

Hi Burke,

Thanks, you're right - I hadn't noticed that in the individual NIC setting map.  As we are only customising one NIC, the solution above resolved it for us.  I'm not sure what causes the resolv.conf to be blank when customising RHEL 6 (for us) under normal circumstances.  Is the action I mentioned in my post above intentionally not bound so that it just returns a non configured GlobalIPSettings object?  I'd like to get my workflow working optimally so am keen to come up with a better fix if it shouldn't be done in this action.  It doesn't seem to apply properly in the "Get 1 Nic Setting Map" workflow that gets called.

Thanks, Richard

0 Kudos
Burke-
VMware Employee
VMware Employee

If the workflow is not working as expected (setting the DNS settings) without modification, then my recommendation would be to submit a bug, making sure to describe what fixed the issue for you. As noted in my last post, my experience with this particular workflow is extremely limited so I can't comment much more than that.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
0 Kudos
cpjones44
Contributor
Contributor

Thanks for your posts guys. As Burke- pointed out, I was able to get around this by sending a script to my VMs and running it using the Guest Operations flows. However I will still want to see such settings applied "as advertised" - so I'll file a bug to this affect and we'll go from there. Thanks.

0 Kudos
pjank
Contributor
Contributor

Was a resolution to this issue ever found?  I am seeing the exact same issue in my environment (VCO 6.0.2) with Red Hat 6.6 now and I would really like to avoid in guest work-arounds like copying files or running scripts in the guest if at all possible.

Thanks,

Pete

0 Kudos