agent.py - The VM doesn't have systemctl - Ubuntu 20.04
See original GitHub issueStill can’t update on Ubuntu 20.04. Can you please fix this. The system obviously does have systemctl. Also maybe run some automated build tests on each operating system you say you support please. Only change to this Azure Ubuntu 20.04 image is we ran “apt install python-is-python2” to get it to install initially. Below is the result of the update agent command run from Azure Monitor:
2021-10-06 19:36:46,416 - root - INFO - vmGuestHealthAgent write_status_json_and_exit() started for : Install
2021-10-06 19:36:46,416 - root - INFO - vmGuestHealthAgent write_status_json_and_exit() succeeded for : Install
2021-10-06 22:13:06,862 - root - INFO - FileLogger initialized successfully, logging will be at /var/log/azure/Microsoft.Azure.Monitor.VirtualMachines.GuestHealth.GuestHealthLinuxAgent/vmGuestHealthAgent.log
2021-10-06 22:13:06,862 - root - INFO - ---start of dumping the buffer of logs that were printed prior to /var/log/azure/Microsoft.Azure.Monitor.VirtualMachines.GuestHealth.GuestHealthLinuxAgent/vmGuestHealthAgent.log creation----
2021-10-06 22:13:06,863 - root - INFO - 2021-10-06 22:13:06: INFO: Successfully created ConsoleLogger
2021-10-06 22:13:06,863 - root - INFO - 2021-10-06 22:13:06: INFO: Starting to parse the HandlerEnvironment
2021-10-06 22:13:06,863 - root - INFO - 2021-10-06 22:13:06: INFO: Successfully parsed the HandlerEnvironment, got the following log_path : /var/log/azure/Microsoft.Azure.Monitor.VirtualMachines.GuestHealth.GuestHealthLinuxAgent
2021-10-06 22:13:06,863 - root - INFO - ---end of dumping the buffer of logs that were printed prior to /var/log/azure/Microsoft.Azure.Monitor.VirtualMachines.GuestHealth.GuestHealthLinuxAgent/vmGuestHealthAgent.log creation----
2021-10-06 22:13:06,868 - root - ERROR - The VM doesn't have systemctl
2021-10-06 22:13:06,870 - root - ERROR - Unsupported Operating System. OS distribution: Ubuntu OS Version: 20.04
For details, check logs in /var/log/vmGuestHealthAgent.log
Azure deployment log if you’re interested:
{
"status": "Failed",
"error": {
"code": "DeploymentFailed",
"message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.",
"details": [
{
"code": "Conflict",
"message": "{\r\n \"status\": \"Failed\",\r\n \"error\": {\r\n \"code\": \"ResourceDeploymentFailure\",\r\n \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.\",\r\n \"details\": [\r\n {\r\n \"code\": \"VMExtensionHandlerNonTransientError\",\r\n \"message\": \"The handler for VM extension type 'Microsoft.Azure.Monitor.VirtualMachines.GuestHealth.GuestHealthLinuxAgent' has reported terminal failure for VM extension 'GuestHealthLinuxAgent' with error message: '[ExtensionOperationError] Non-zero exit code: 178, /var/lib/waagent/Microsoft.Azure.Monitor.VirtualMachines.GuestHealth.GuestHealthLinuxAgent-1.0.41/./scripts/install.py\\n[stdout]\\nInitializing Logger in logger.py\\n2021-10-07 22:18:33: INFO: Successfully created ConsoleLogger\\n2021-10-07 22:18:33: INFO: Starting to parse the HandlerEnvironment\\n2021-10-07 22:18:33: INFO: Successfully parsed the HandlerEnvironment, got the following log_path : /var/log/azure/Microsoft.Azure.Monitor.VirtualMachines.GuestHealth.GuestHealthLinuxAgent\\n2021-10-07 22:18:33: INFO: Logging will continue at /var/log/azure/Microsoft.Azure.Monitor.VirtualMachines.GuestHealth.GuestHealthLinuxAgent/vmGuestHealthAgent.log\\n\\n\\n[stderr]\\nRunning scope as unit: Microsoft.Azure.Monitor.VirtualMachines.GuestHealth.GuestHealthLinuxAgent_1.0.41_[REDACTED].scope\\n'.\\r\\n \\r\\n'Install handler failed for the extension. More information on troubleshooting is available at https://aka.ms/vmextensionlinuxtroubleshoot'\"\r\n }\r\n ]\r\n }\r\n}"
}
]
}
}
Output of pidof command run manually:
root@[REDACTED]:/var/lib/waagent/Microsoft.Azure.Monitor.VirtualMachines.GuestHealth.GuestHealthLinuxAgent-1.0.41/scripts# pidof systemd
627878
Also see related issue regarding Unsupported Operating System and missing Ubuntu 20 in constants.py: #1444
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5
Top Results From Across the Web
Troubleshoot the Azure Linux Agent - Virtual Machines
Before you begin. Check the agent status and version to make sure it is still supported. See Minimum version support for virtual machine...
Read more >System has not been booted with systemd as init system (PID ...
Your release of WSL doesn't support Systemd. In this case, there are multiple workarounds available. See the Alternatives to Systemd in WSL ...
Read more >[Fixed] "System has not been booted with systemd as init ...
Learn how to fix "System has not been booted with systemd as init system (PID 1). Can't operate." with Ubuntu Linux on WSL....
Read more >Managing the Jenkins systemd Service on Ubuntu 20.04
Information referenced in this video:Managing the Jenkins systemd Service on CentOS 7.9https://youtu.be/MkokjTQ2ngc🗞️ Managing systemd ...
Read more >How to Set Up SSH Keys on Ubuntu 20.04 - DigitalOcean
Generating public/private rsa key pair. · /home/ your_home /. · Enter passphrase (empty for no passphrase): · Your identification has been saved in ......
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
Hello,
Another victim of this bug, running;
This bug will cause error on upgrading VM monitoring on all of our 20.04LTS VM’s.
Still the same here on Ubuntu Server TLS 20.04 - cant be that difficult!