Azure / custom-script-extension-linux

Azure Custom Script Virtual Machine Extension :new:
Apache License 2.0
106 stars 32 forks source link

custom-script-extension: cannot execute binary file: Exec format error #207

Open abamoshes opened 1 year ago

abamoshes commented 1 year ago

dnsadmin@mxsfreebsd13:~ $ cat /etc/os-release NAME=FreeBSD VERSION="13.1-RELEASE-p5" VERSION_ID="13.1" ID=freebsd ANSI_COLOR="0;31" PRETTY_NAME="FreeBSD 13.1-RELEASE-p5" CPE_NAME="cpe:/o:freebsd:freebsd:13.1" HOME_URL="https://FreeBSD.org/" BUG_REPORT_URL="https://bugs.FreeBSD.org/" dnsadmin@mxsfreebsd13:~ $ waagent.log

mxsuser@moshes01-PC:~$ az vm extension set \ --resour> --resource-group mxsfreebsd13_group \ --vm-na> --vm-name mxsfreebsd13 --name customScript \

--publisher Microsoft.Azure.Extensions \ -setting> --settings '{"CommandToExecute" : "echo hello>>hello"}' (VMExtensionHandlerNonTransientError) The handler for VM extension type 'Microsoft.Azure.Extensions.customScript' has reported terminal failure for VM extension 'customScript' with error message: '[ExtensionOperationError] Non-zero exit code: 126, /var/lib/waagent/Microsoft.Azure.Extensions.customScript-2.1.7/bin/custom-script-shim install [stdout] /var/lib/waagent/Microsoft.Azure.Extensions.customScript-2.1.7/bin/custom-script-shim: line 60: lsof: command not found

  • /var/lib/waagent/Microsoft.Azure.Extensions.customScript-2.1.7/bin/custom-script-extension install /var/lib/waagent/Microsoft.Azure.Extensions.customScript-2.1.7/bin/custom-script-shim: line 124: /var/lib/waagent/Microsoft.Azure.Extensions.customScript-2.1.7/bin/custom-script-extension: cannot execute binary file: Exec format error

[stderr] '.

'Install handler failed for the extension. More information on troubleshooting is available at https://aka.ms/vmextensionlinuxtroubleshoot'

abamoshes commented 1 year ago

Ran this on ubuntu 22 and everything is working great. Assuming my issue was trying to use an unsupported system. Any feedback if Freebsd is supported would be great. https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/custom-script-linux#operating-system