Will Huang
Will Huang

Reputation: 3586

DNS problem when creating VM from deprovisioned Linux VM image in DevTest Lab

I tried many times. It looks like a bug in Azure DevTest Labs.

Here is the steps to reproduce the problem:

  1. Create a VM from Ubuntu Linux 18.04 LTS
  2. Create custom image from this VM with Run deprovision on virtual machine..
  3. Create a new VM from this new image.
  4. SSH to this VM.
  5. Run host www.google.com will fail.

Are these steps wrong?

Upvotes: 0

Views: 368

Answers (1)

Charles Xu
Charles Xu

Reputation: 31424

There is no step wrong which you have done. But the reason that you fail running host www.google.com is the second step. The deprovision will do some things when you execute the command waagent -deprovision+user:

enter image description here

When you create a VM from the deprovision custom image, there is no resolv.conf file in it. So you fail in running host www.google.com. The solution is that create a resolv.conf file in the directory /etc/.

The content of file resolv.conf will be different for the VM in the different locations. For example, the file resolv.conf will be like this if your VM in the location Japan East:

nameserver 127.0.0.53
search bbuuanmggeiengfg01a443drie.lx.internal.cloudapp.net

Upvotes: 1

Related Questions