GithubHelp home page GithubHelp logo

Comments (8)

szarkos avatar szarkos commented on June 10, 2024

Is this always reproducible? Can you post the output from /var/log/waagent, /etc/waagent.conf, and any cloud-init logs? Possibly /etc/resolv.conf would be nice to verify as well, just to ensure it was actually set correctly. Lastly, are you deploying into a vnet with your own DNS server, or just a simple deployment?

Recent images of Ubuntu 12.04 and 13.10 in the Windows Azure gallery actually use cloud-init to do the specialization (set the hostname, user, etc.). So some of the output above may help determine who's at fault here :)

If it's not reproducible or intermittent then it may also just be a delay in pushing the hostname to DNS. Typically what happens is that when the hostname is set either the agent or cloud-init will kick off a new DHCP negotiation, which should eventually get the the hostname published to iDNS.

Thanks!
Steve

from walinuxagent.

smereczynski avatar smereczynski commented on June 10, 2024

Hi Steve,
It is reproducible. I can give You logs, but much more quicker is to try deploy Your own machine and deprovision it. I did not do anything with the VM. It's fresh VM with no changes in configs so You can reproduce it by:

  1. create Ubuntu 12.04 VM
  2. use waagent -force -deprovsion+user
  3. use HISTSIZE=0
  4. logout
  5. shut down VM in WA Portal
  6. click to capture option and create image
  7. create VM form image You created before
  8. login via ssh and use hostname -f
  9. read an error ;-)

from walinuxagent.

g-k-r avatar g-k-r commented on June 10, 2024

I had the same issue on debian wheezy. i worked around the problem by adding a
send host-name "myhostname";
to /etc/dhcp/dhclient.conf
after the very first provisioning (and rebooting)

from walinuxagent.

smereczynski avatar smereczynski commented on June 10, 2024

g-k-r, this is not an solution. It should work with no hacks. Especially on officially supported systems like Ubuntu we can find in gallery...

from walinuxagent.

g-k-r avatar g-k-r commented on June 10, 2024

@smereczynski I don't disagree :-)

from walinuxagent.

szarkos avatar szarkos commented on June 10, 2024

This is now fixed in master.

See also this bug to track when a new walinuxagent package will be available from Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/walinuxagent/+bug/1268050

Closing this bug for now.

Thanks again,
Steve

from walinuxagent.

hsachinraj avatar hsachinraj commented on June 10, 2024

I am still seeing the issue - running waagent --deprovision on the VM before capturing the image and starting an instance from it makes the instance unreachable. How do I apply the fix?

from walinuxagent.

PoisonousJohn avatar PoisonousJohn commented on June 10, 2024

@szarkos , it seems that problem got back. I followed pretty the same steps to get image as @smereczynski mentioned.

I use this template https://github.com/PoisonousJohn/AzureGameRoomsScaler/blob/master/AzureGameRoomsScaler/vmDeploy.json

with this image https://vhdsdisks570.blob.core.windows.net/vhds/templatevm20180117130829.vhd

Due to DNS problem my custom script extension can't download script.

/etc/resolv.conf doesn't exist.

waagent.conf

#
# Microsoft Azure Linux Agent Configuration
#

# Enable instance creation
Provisioning.Enabled=n

# Rely on cloud-init to provision
Provisioning.UseCloudInit=y

# Password authentication for root account will be unavailable.
Provisioning.DeleteRootPassword=y

# Generate fresh host key pair.
Provisioning.RegenerateSshHostKeyPair=n

# Supported values are "rsa", "dsa" and "ecdsa".
Provisioning.SshHostKeyPairType=rsa

# Monitor host name changes and publish changes via DHCP requests.
Provisioning.MonitorHostName=n

# Decode CustomData from Base64.
Provisioning.DecodeCustomData=n

# Execute CustomData after provisioning.
Provisioning.ExecuteCustomData=n

# Algorithm used by crypt when generating password hash.
#Provisioning.PasswordCryptId=6

# Length of random salt used when generating password hash.
#Provisioning.PasswordCryptSaltLength=10

# Allow reset password of sys user
Provisioning.AllowResetSysUser=n

# Format if unformatted. If 'n', resource disk will not be mounted.
ResourceDisk.Format=n

# File system on the resource disk
# Typically ext3 or ext4. FreeBSD images should use 'ufs2' here.
ResourceDisk.Filesystem=ext4

# Mount point for the resource disk
ResourceDisk.MountPoint=/mnt

# Create and use swapfile on resource disk.
ResourceDisk.EnableSwap=n

# Size of the swapfile.
ResourceDisk.SwapSizeMB=0

# Comma-seperated list of mount options. See man(8) for valid options.
ResourceDisk.MountOptions=None

# Respond to load balancer probes if requested by Microsoft Azure.
LBProbeResponder=y

# Enable verbose logging (y|n)
Logs.Verbose=n

# Is FIPS enabled
OS.EnableFIPS=n

# Root device timeout in seconds.
OS.RootDeviceScsiTimeout=300

# If "None", the system default version is used.
OS.OpensslPath=None

# Set the path to SSH keys and configuration files
OS.SshDir=/etc/ssh

# If set, agent will use proxy server to access internet
#HttpProxy.Host=None
#HttpProxy.Port=None

# Detect Scvmm environment, default is n
# DetectScvmmEnv=n

# Enable RDMA management and set up, should only be used in HPC images
# OS.EnableRDMA=y

# Enable RDMA kernel update, this value is effective on Ubuntu
# OS.UpdateRdmaDriver=y

# Enable or disable goal state processing auto-update, default is enabled
# AutoUpdate.Enabled=y

# Determine the update family, this should not be changed
# AutoUpdate.GAFamily=Prod

# Determine if the overprovisioning feature is enabled. If yes, hold extension
# handling until inVMArtifactsProfile.OnHold is false.
# Default is disabled
# EnableOverProvisioning=n

# Allow fallback to HTTP if HTTPS is unavailable
# Note: Allowing HTTP (vs. HTTPS) may cause security risks
# OS.AllowHTTP=n

# Add firewall rules to protect access to Azure host node services
# Note:
# - The default is false to protect the state of exising VMs
OS.EnableFirewall=y

Other file you can find in attachment.

I tried to configure custom DNS in a VNET, didn't work either.

cloud-init.log
cloud-init-output.log
waagent.log

Creating and filling /etc/resolv.conf fixes the issue

from walinuxagent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.