Can't update waagent by script on Ubuntu
See original GitHub issueI am using an ARM Template to deploy a new Ubuntu machine. This template will run a bash script that starts by updating the machine packages system.
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update > /var/log/init_update.stdout 2> /var/log/init_update.stderr
sudo apt-get -y install htop unzip default-jre vnstat
sudo apt-get -y upgrade > /var/log/init_upgrade.stdout 2> /var/log/init_upgrade.stderr
sudo apt-get -y dist-upgrade > /var/log/init_dist_upgrade.stdout 2> /var/log/init_dist_upgrade.stderr
sudo apt-get -y autoremove > /var/log/init_autoremove.stdout 2> /var/log/init_autoremove.stderr
The latest Ubuntu machine image on Azure doesn’t have (yet) the latest version of the waagent package so my script will try to update it but it fails and returns the following error:
Preparing to unpack .../walinuxagent_2.2.21+really2.2.20-0ubuntu1~16.04.1_amd64.deb ...
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:
My workaround is to list all the packages of the machine and update everything but waagent.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to update the Azure Linux Agent on a VM - Microsoft Learn
Learn how to update Azure Linux Agent for your Linux VM in Azure. ... sudo yum check-update WALinuxAgent. Install the latest package version....
Read more >apt-get update not working as azure custom script extension
I'm deploying linux ubuntu 16.04 LTS VMSS ...
Read more >Where and how to install waagent (Linux VM Agent) via CLI?
Depending upon operating system, the commands vary a little. Below is the link for the MSFT Documentation on how to install / update...
Read more >How To Re-Install Oms Agent For Linux On Azure - TekNeed
Learn how to uninstall Oms Agent, start and enable Waagent. ... .com/Microsoft/OMS-Agent-for-Linux/master/installer/scripts/onboard_agent.sh ...
Read more >Azure Run Command for Dummies - Mandiant
On Linux, the RunShellScript command executes a shell script on the ... Contents of the /var/lib/waagent/run-command/download directory ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here is a sample ARM template that uses customdata for reference: https://github.com/Azure/azure-quickstart-templates/tree/master/101-vm-customdata
In this example the raw text customdata is added as a variable to the parameters.json and encoded using the base64() function in azuredeploy.json. However, if the customdata is not changing then it may be easier to base64-encode the customdata and add it to the parameters.json directly as a string. Just be sure to remove the base64() function in azuredeploy (don’t want to base64 twice 😃 )
Assuming this is complete