locked
INFO Waiting for cloud-init to copy ovf-env.xml to /var/lib/waagent/ovf-env.xml RRS feed

  • Question

  • Hi,

    I am preparing on-premise VM to upload to azure.

    Installed Linux Azure Agent v2.2.25 to Ubuntu 16.04 on-premise hyper-v vm and got plenty of errors:

    INFO Waiting for cloud-init to copy ovf-env.xml to /var/lib/waagent/ovf-env.xml [360 retries remaining, sleeping 5s]

    All I found is that need to re-provision VM.

    Config file contains
    Provisioning.Enabled=n
    ResourceDisk.Format=n

    I shutdown VM and created new copy with new ID, but that did not help.

    Any ideas how to fix this?
    Thanks


    • Edited by Natip Wednesday, June 6, 2018 3:08 PM
    Wednesday, June 6, 2018 2:54 PM

All replies

  • As per the post “Provisioning.Enabled=n”, check if provisioning is enabled on the waagent.

    Could you help us with the error message?

    Wednesday, June 6, 2018 3:58 PM
  • Hi Nirushi,

    And how to check if provisioning is enabled on the waagent?

    Log looks like:

    2018/06/06 13:47:13.459773 INFO Azure Linux Agent Version:2.2.20
    2018/06/06 13:47:13.462050 INFO OS: ubuntu 16.04
    2018/06/06 13:47:13.463834 INFO Python: 3.5.2
    2018/06/06 13:47:13.473248 INFO Run daemon
    2018/06/06 13:47:13.476332 INFO Clean protocol
    2018/06/06 13:47:13.478111 INFO Running CloudInit provisioning handler
    2018/06/06 13:47:13.479860 INFO Waiting for cloud-init to copy ovf-env.xml to /var/lib/waagent/ovf-env.xml [360 retries remaining, sleepi$
    2018/06/06 13:47:18.503088 INFO Waiting for cloud-init to copy ovf-env.xml to /var/lib/waagent/ovf-env.xml [359 retries remaining, sleepi$
    2018/06/06 13:47:18.515757 WARNING cloud-init does not appear to be running
    2018/06/06 13:47:23.521370 INFO Waiting for cloud-init to copy ovf-env.xml to /var/lib/waagent/ovf-env.xml [358 retries remaining, sleepi$
    2018/06/08 13:14:21.353088 WARNING cloud-init does not appear to be running
    2018/06/08 13:14:26.361710 INFO Waiting for cloud-init to copy ovf-env.xml to /var/lib/waagent/ovf-env.xml [6 retries remaining, sleeping 5s]
    2018/06/08 13:14:26.388989 WARNING cloud-init does not appear to be running
    2018/06/08 13:14:31.398206 INFO Waiting for cloud-init to copy ovf-env.xml to /var/lib/waagent/ovf-env.xml [5 retries remaining, sleeping 5s]
    2018/06/08 13:14:31.419515 WARNING cloud-init does not appear to be running
    2018/06/08 13:14:36.428304 INFO Waiting for cloud-init to copy ovf-env.xml to /var/lib/waagent/ovf-env.xml [4 retries remaining, sleeping 5s]
    2018/06/08 13:14:36.450666 WARNING cloud-init does not appear to be running
    2018/06/08 13:14:41.459712 INFO Waiting for cloud-init to copy ovf-env.xml to /var/lib/waagent/ovf-env.xml [3 retries remaining, sleeping 5s]
    2018/06/08 13:14:41.479828 WARNING cloud-init does not appear to be running
    2018/06/08 13:14:46.488560 INFO Waiting for cloud-init to copy ovf-env.xml to /var/lib/waagent/ovf-env.xml [2 retries remaining, sleeping 5s]
    2018/06/08 13:14:46.508806 WARNING cloud-init does not appear to be running
    2018/06/08 13:14:51.517252 ERROR Provisioning failed: [ProvisionError] Giving up, ovf-env.xml was not copied to /var/lib/waagent/ovf-env.xml after 1800s
    2018/06/08 13:14:51.523899 INFO Detect protocol endpoints
    2018/06/08 13:14:51.527245 INFO Clean protocol
    2018/06/08 13:14:51.530590 INFO WireServer endpoint is not found. Rerun dhcp handler
    2018/06/08 13:14:51.533985 INFO Test for route to 168.63.129.16
    2018/06/08 13:14:51.537740 WARNING No route exists to 168.63.129.16
    2018/06/08 13:14:51.541315 INFO Checking for dhcp lease cache
    2018/06/08 13:14:51.544647 INFO looking for leases in path [/var/lib/dhcp/dhclient.*.leases]
    2018/06/08 13:14:51.548591 INFO cached endpoint not found
    2018/06/08 13:14:51.551808 INFO Cache exists [False]
    2018/06/08 13:14:51.555693 INFO Send dhcp request
    2018/06/08 13:14:51.564137 INFO Examine /proc/net/route for primary interface
    2018/06/08 13:14:51.568519 INFO Primary interface is [eth0]
    2018/06/08 13:14:51.579563 INFO interface [b'lo'] has flags [73], is loopback [True]
    2018/06/08 13:14:51.584138 INFO Interface [b'lo'] skipped
    2018/06/08 13:14:51.587548 INFO interface [b'eth0'] has flags [4163], is loopback [False]
    2018/06/08 13:14:51.590757 INFO Interface [b'eth0'] selected
    2018/06/08 13:14:51.612613 INFO Examine /proc/net/route for primary interface
    2018/06/08 13:14:51.616560 INFO Primary interface is [eth0]
    2018/06/08 13:14:51.619712 INFO interface [b'lo'] has flags [73], is loopback [True]
    2018/06/08 13:14:51.622917 INFO Interface [b'lo'] skipped
    2018/06/08 13:14:51.625924 INFO interface [b'eth0'] has flags [4163], is loopback [False]
    2018/06/08 13:14:51.629068 INFO Interface [b'eth0'] selected
    2018/06/08 13:14:51.750540 INFO Configure routes
    2018/06/08 13:14:51.753737 INFO Gateway:None
    2018/06/08 13:14:51.756320 INFO Routes:None
    2018/06/08 13:14:51.758977 INFO WireServer is not responding. Reset endpoint
    2018/06/08 13:14:51.761473 INFO Protocol endpoint not found: WireProtocol, [ProtocolError] WireProtocol endpoint is None
    2018/06/08 13:15:38.797450 INFO Protocol endpoint not found: MetadataProtocol, [ProtocolError] [HttpError] [HTTP Failed] GET http://169.254.169.254/Microsoft.Compute/identity?api-version=2015-05-01-preview -- IOError [Errno 113] No route to host -- 6 attempts made
    2018/06/08 13:15:38.802398 INFO Retry detect protocols: retry=0
    

    Thank you
    N

    Friday, June 8, 2018 12:38 PM
  • Agent config I haven't changed after installation:

    #
    # 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
    

    Is this a bug or I am missing something? 

    THanks
    N

    Friday, June 8, 2018 12:45 PM
  • I won't be re-provisioning this ubuntu vhd in azure, just will use only this vhd for production so not sure if I need to solve this issue in general?

    Friday, June 8, 2018 1:33 PM
  • How exactly are you installing the agent? 
    Monday, June 11, 2018 10:32 PM
  • wget https://github.com/Azure/WALinuxAgent/archive/v2.2.20.zip
    unzip v2.2.20.zip
    cd WALinuxAgent-2.2.20
    sudo apt-get install walinuxagent
    sudo reboot

    Thanks
    N

    • Edited by Natip Tuesday, June 12, 2018 7:15 AM
    Tuesday, June 12, 2018 7:14 AM
  • You mention you wont be using this VHD in Azure. To what reason are you installing this agent if that is the case? 
    Tuesday, June 12, 2018 6:30 PM
  • I will be using (uploading) only this one single VDH to azure, but not distributing many copies of it for other services, sorry for misunderstanding.

    Anyway the problem still persists and not sure where to start troubleshooting?

    Thanks
    N

    Wednesday, June 13, 2018 7:53 AM
  • Ah okay. That makes more sense then :) 

    is this the article you are following? 

    https://docs.microsoft.com/en-us/azure/virtual-machines/linux/create-upload-ubuntu

    I do not see anything requiring you to download a zip file. Rather you should just be able to run 

     # sudo apt-get update
    # sudo apt-get install walinuxagent

    Wednesday, June 13, 2018 8:23 PM
  • Removed walinuxagent:

    #sudo apt-get remove --auto-remove walinuxagent
    #sudo apt-get purge walinuxagent

    Rebooted and installed agent again:

    # sudo apt-get update
    # sudo apt-get install walinuxagent

    still same error

    am I missing something?

    Thanks

    Thursday, June 14, 2018 12:21 PM
  • Interesting.... Would you be able to spin up a new ubuntu VM on premise and try installing the agent? That way we can see if it is specific to that VM. Then from there we can get you in touch with a support engineer to help debug further if needed. 
    Thursday, June 14, 2018 7:54 PM
  • Created new Ubuntu 16.04 desktop instance. 

    Followed step from: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/create-upload-ubuntu

    Installed walinuxagent.service is in running state.

    I still found same warnings in /var/log/waagent.log

    Thanks
    n

    • Edited by Natip Monday, June 18, 2018 1:56 PM
    Monday, June 18, 2018 10:23 AM
  • Thanks for that. Can you email me at AzCommunity@microsoft.com and provide me with 

    Subscription ID

    Link to this thread

    I can enable a support request for you so we can get this sorted out. 

    Monday, June 18, 2018 11:20 PM
  • Any update on this? 
    Thursday, June 28, 2018 11:25 PM