cloud-init team mailing list archive
Mailing list archive
Re: DNS name resolution not working
Larry Menard <larry.menard@xxxxxxxxx>
Rick Hornsby <rhornsby@xxxxxxxx>
Wed, 18 May 2022 17:57:47 -0500
i=1; rspamd-6fcfc4d76-dkw49; auth=pass smtp.auth=dreamhost smtp.mailfrom=rhornsby@xxxxxxxx
i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1652914669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=s+68ZKrKoLwRCQqU6nAyZyR2M29TfIf6zzxt3VinmIE=; b=Lrwmop+/ehKs/SH4xv24Is1ceErPZwt8jlfwDTuPNj/SulLoYDUD2I8xtyPVRHz2ubIj2i Dx74vB2ZOVBN93XuBy69Z0gHpRhHodC9X2qHFxewpUbCuicyVcYF1NHl5R3UCGqdmK0TKp tAzr2icucVx86h9LQEKQTmad0lS/NUwLgju30Gt/cYRJao5HXldkbJ6uq3jfgqT+hbfNxh 8KbKJnyL6/52loSwyxQfew5qUjUXsA59+5NDHg1Qyz1hoGuXoLqdjxX8YDyd9PpKerKqhk 4E6IRwE9qh7W+inKNiq95HNdkEYB4x6GU7QW4+qohZnUHTCw7ry/QHQlLMA4xg==
i=1; s=arc-2022; d=mailchannels.net; t=1652914669; a=rsa-sha256; cv=none; b=Yz/iHVbaKw5Ul/czii1YVd/oaezzA/nQQIyf2Y0q2PhqLIaQ4Wz8KKTES6Qk1ScdAKkyaJ EYbN7LveIbgZes72oXIoYQJj3ka3MnxxkXU/qHAtkIVIhdaN+UgHC66iwZPMIb/O7YmkyP 2tDkT0M5Pg7+tm9Qqxvy+yXGxzC+E8e1JpZY/EPcV6H5eO9O/cWCZxnSNy6A7YR/ZGPQP6 ivp16mXkVqoTjWXfgYkZsPAlwndIMKGllhSPMkfxU/nM/+7We51NMQYgNayyOkcyhleXZ2 KsQCwI0XwQKYcBpwcWjSdSvE8AisnFDLtST8FhAtx8VE+iHsniL0WJiu5NCa/w==
> On May 18, 2022, at 14:49, Larry Menard <larry.menard@xxxxxxxxx> wrote:
> 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.