我尝试在 Azure 上部署 flatcar 镜像,但无法部署它。以下是我执行的步骤
- 我从 https://stable.release.flatcar-linux.net/amd64-usr/current/flatcar_production_azure_image.vhd.bz2 下载了最新的 Azure 支持的 VHD .
- 我已将此 VHD 上传到 Azure 存储 Blob,并按照 Azure 指南的建议将其转换为镜像
- 我尝试从此镜像创建虚拟机。 VM 创建成功,但我们可以在创建 VM 时看到一个错误,并且 VM 创建显示为失败(即使实际上是成功的)。以下是我看到的错误:
{
"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": "VMExtensionHandlerNonTransientError",
"message": "The handler for VM extension type 'Microsoft.Azure.Diagnostics.LinuxDiagnostic' has reported terminal failure for VM extension 'LinuxDiagnostic' with error message: '[ExtensionOperationError] Non-zero exit code: 1, /var/lib/waagent/Microsoft.Azure.Diagnostics.LinuxDiagnostic-3.0.141/diagnostic.py -install\n[stdout]\n\n\n[stderr]\n File \"/var/lib/waagent/Microsoft.Azure.Diagnostics.LinuxDiagnostic-3.0.141/diagnostic.py\", line 54\n print 'A local import (e.g., waagent) failed. Exception: {0}\\n' \\\n ^\nSyntaxError: invalid syntax\n'.\r\n \r\n'Install handler failed for the extension. More information on troubleshooting is available at https://aka.ms/VMExtensionLinuxDiagnosticsTroubleshoot'"
}
]
}
我尝试浏览提供的链接,但没有多大帮助。 我还尝试了另一种选择,如下
- 通过 Azure 市场部署 flatcar 虚拟机
- 从此虚拟机捕获通用镜像
- 使用上述步骤中创建的镜像部署虚拟机
即使使用这种方法,我也会遇到同样的错误。
最佳答案
目前,waagent(Azure Linux 代理)不支持 python 3.x,因此存在此语法错误。您的操作系统上需要安装 python 2.x 才能避免此问题。
关于azure - 无法在 Azure 上部署 Flatcar 操作系统,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73477180/