← Back to team overview

cloud-init team mailing list archive

Re: DNS name resolution not working


   Hi Rick.

   Thanks for the response and suggestions.  I should have mentioned that
the networking in general is working fine, it's just the DNS resolution
that isn't working.  If I manually add some Amazon entries to my
"/etc/hosts" file I'm even able to do a "yum update", but clearly that's
just a debug step, not an actual solution.

   I actually do want to use a Static IP address.  The VM's network adapter
is Bridged, and this VM is running on my home network, so I can guarantee
there is no duplication of IP addresses.  Perhaps I'll try DHCP just to see
if that is related.

   There is another symptom, though I don't know if it is related to the
DNS issue (I suspect it is, but am not sure):  Various actions (e.g.,
logging in via PuTTY/SSH) do take a minute or so to complete.  I suspect
they're waiting for some background network activity to complete or timeout.

On Wed, May 18, 2022 at 6:57 PM Rick Hornsby <rhornsby@xxxxxxxx> wrote:

> On May 18, 2022, at 14:49, Larry Menard <larry.menard@xxxxxxxxx> wrote:
> Hello.
> I've installed Amazon Linux 2 in a VMware Workstation VM as described in
> https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-2-virtual-machine.html
> .
> After starting up the VM I'm able to login as ec2-user, but the system is
> unable to resolve any DNS names.  There is absolutely nothing in
> "/etc/resolv.conf".
> I don’t think you’re doing cloud-init wrong. If I had to guess looking at
> the AWS doc you linked, the network config they tell you to use is wrong.
> Generally speaking, the network should be set to come up and use DHCP, not
> a static address, which may or may not conflict with an existing IP
> assignment, in a subnet that may or may not match your LAN.
> Most likely, your VM has no network connectivity at all and the DNS issues
> you’re seeing are a symptom of that.
> I would suggest seeing if you can at least ping the gateway address, but
> even that looks dodgy. While it can be anything, conventionally it’s
> x.x.x.1, not .254.
> Assuming the VM’s NIC is already configured to bridge, you should be able
> to adjust those values to match your actual network, selecting an address
> for your VM that’s not being used. Better is to set it to use DHCP. If the
> NIC is not bridged, but rather is the default and is set up to NAT, you’ll
> have to make the VM use DHCP.

Larry Menard
"Defender of Geese and of All Things Natural"
E-mail: larry.menard@xxxxxxxxx

Follow ups