扩展“VMAccessForLinux”启用失败

时间:2016-11-23 09:06:14

标签: azure

最近我从上传到Azure存储blob的自定义VHD文件中配置了一个Linux虚拟机(Centos 7 / Resource Manager)。除了我在下面观察到的两个问题外,一切看起来都很好:

问题1:首先手动为linux安装最新的VM代理,但无论我使用powershell命令还是通过门户重置用户密码,它总是会失败,并在扩展日志中找到以下错误消息。

2016/11/23 15:25:10 [Microsoft.OSTCExtensions.VMAccessForLinux-1.4.6.0] sequence number is 0
2016/11/23 15:25:10 [Microsoft.OSTCExtensions.VMAccessForLinux-1.4.6.0] setting file path is/var/lib/waagent/Microsoft.OSTCExtensions.VMAccessForLinux-1.4.6.0/c onfig/0.settings
2016/11/23 15:25:10 [Microsoft.OSTCExtensions.VMAccessForLinux-1.4.6.0] JSON con fig: {"runtimeSettings": [{"handlerSettings": {"protectedSettings": "MIIB4AYJKoZ IhvcNAQcDoIIB0TCCAc0CAQAxggFpMIIBZQIBADBNMDkxNzA1BgoJkiaJk/IsZAEZFidXaW5kb3dzIEF 6dXJlIENSUCBDZXJ0aWZpY2F0ZSBHZW5lcmF0b3ICEF53i2Gow5OnR8IvFRsSasswDQYJKoZIhvcNAQE BBQAEggEAiGxKv6VTW5IluLGMZ26eJnXToWQxzY1oTtVnKQf1snHEV7JBaDoPJlM2NuInvDXs1rA51RD lAU17Og9rDLm3NTem55WyRG9ANT87mf869vdL/M5fdZhB9QbO1aJTCkBn2bpnps5t7X8lCUfGekrAeMD hACnrZKlaKlmkxPN7YX/ARBsD9TyVrauXz7fshVOT8PeVvxue8C+MddM58ot6N98gt3HueEH1GxTzuiH CSuLXSN34qeRPQ46Jbz1IiF0y08t1JFGqcNZvcn2P4UWr3bx34xiEm6M0VYKX5LXMNiemWI9K/bgcpJ8 jpZRMPrx/tmkVHFhPe1MCqu/3BY2l8DBbBgkqhkiG9w0BBwEwFAYIKoZIhvcNAwcECENgdMLZao8ugDg jt+RrqDVVWuCtp9DiWxm5D05974fSO9Ssv2tk5n7R1gmr3vtnBSATRD4VFdJKzrYw97ox3iGAtg==", "publicSettings": {}, "protectedSettingsCertThumbprint": "4546850E7C0933BE6145AE 51035EF8D4D5DEFFB5"}}]}
2016/11/23 15:25:10 [Microsoft.OSTCExtensions.VMAccessForLinux-1.4.6.0] Config d ecoded correctly.
2016/11/23 15:25:10 [Microsoft.OSTCExtensions.VMAccessForLinux-1.4.6.0] Install, success,0,Install Succeeded
2016/11/23 15:25:11 [Microsoft.OSTCExtensions.VMAccessForLinux-1.4.6.0] sequence number is 0
2016/11/23 15:25:11 [Microsoft.OSTCExtensions.VMAccessForLinux-1.4.6.0] setting file path is/var/lib/waagent/Microsoft.OSTCExtensions.VMAccessForLinux-1.4.6.0/c onfig/0.settings
2016/11/23 15:25:11 [Microsoft.OSTCExtensions.VMAccessForLinux-1.4.6.0] JSON con fig: {"runtimeSettings": [{"handlerSettings": {"protectedSettings": "MIIB4AYJKoZ IhvcNAQcDoIIB0TCCAc0CAQAxggFpMIIBZQIBADBNMDkxNzA1BgoJkiaJk/IsZAEZFidXaW5kb3dzIEF 6dXJlIENSUCBDZXJ0aWZpY2F0ZSBHZW5lcmF0b3ICEF53i2Gow5OnR8IvFRsSasswDQYJKoZIhvcNAQE BBQAEggEAiGxKv6VTW5IluLGMZ26eJnXToWQxzY1oTtVnKQf1snHEV7JBaDoPJlM2NuInvDXs1rA51RD lAU17Og9rDLm3NTem55WyRG9ANT87mf869vdL/M5fdZhB9QbO1aJTCkBn2bpnps5t7X8lCUfGekrAeMD hACnrZKlaKlmkxPN7YX/ARBsD9TyVrauXz7fshVOT8PeVvxue8C+MddM58ot6N98gt3HueEH1GxTzuiH CSuLXSN34qeRPQ46Jbz1IiF0y08t1JFGqcNZvcn2P4UWr3bx34xiEm6M0VYKX5LXMNiemWI9K/bgcpJ8 jpZRMPrx/tmkVHFhPe1MCqu/3BY2l8DBbBgkqhkiG9w0BBwEwFAYIKoZIhvcNAwcECENgdMLZao8ugDg jt+RrqDVVWuCtp9DiWxm5D05974fSO9Ssv2tk5n7R1gmr3vtnBSATRD4VFdJKzrYw97ox3iGAtg==", "publicSettings": {}, "protectedSettingsCertThumbprint": "4546850E7C0933BE6145AE 51035EF8D4D5DEFFB5"}}]}
2016/11/23 15:25:11 [Microsoft.OSTCExtensions.VMAccessForLinux-1.4.6.0] Config d ecoded correctly.
2016/11/23 15:25:11 [Microsoft.OSTCExtensions.VMAccessForLinux-1.4.6.0] set most recent sequence number to 0
2016/11/23 15:25:11 ERROR:[Microsoft.OSTCExtensions.VMAccessForLinux-1.4.6.0] Fa iled to enable the extension with error: no element found: line 22, column 31, s tack trace: Traceback (most recent call last):
2016/11/23 15:25:11 ERROR: File "/var/lib/waagent/Microsoft.OSTCExtensions.VMAc cessForLinux-1.4.6.0/./vmaccess.py", line 96, in enable
2016/11/23 15:25:11 ERROR: _set_user_account_pub_key(protect_settings, hutil)
2016/11/23 15:25:11 ERROR: File "/var/lib/waagent/Microsoft.OSTCExtensions.VMAc cessForLinux-1.4.6.0/./vmaccess.py", line 162, in _set_user_account_pub_key
2016/11/23 15:25:11 ERROR: ovf_env = waagent.OvfEnv().Parse(ovf_xml)
2016/11/23 15:25:11 ERROR: File "/var/lib/waagent/Microsoft.OSTCExtensions.VMAc cessForLinux-1.4.6.0/waagent", line 4778, in Parse
2016/11/23 15:25:11 ERROR: dom = xml.dom.minidom.parseString(xmlText)
2016/11/23 15:25:11 ERROR: File "/usr/lib64/python2.7/xml/dom/minidom.py", line 1931, in parseString
2016/11/23 15:25:11 ERROR: return expatbuilder.parseString(string)
2016/11/23 15:25:11 ERROR: File "/usr/lib64/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
2016/11/23 15:25:11 ERROR: return builder.parseString(string)
2016/11/23 15:25:11 ERROR: File "/usr/lib64/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
2016/11/23 15:25:11 ERROR: parser.Parse(string, True)
2016/11/23 15:25:11 ERROR:ExpatError: no element found: line 22, column 31
2016/11/23 15:25:11 ERROR:
2016/11/23 15:25:11 [Microsoft.OSTCExtensions.VMAccessForLinux-1.4.6.0] Enable,e rror,0,Enable failed.

同时VM无法通过门户重启 我试图删除扩展然后再次运行命令,但问题仍然存在。任何人都可以建议我如何解决这个问题?非常感谢!!

问题2:门户网站上的计算机名称为空白,我想这可能涉及自定义映像或任何代理或扩展程序无法正常工作,因为Azure图像库中的其他VM配置没有此类问题。请指教....谢谢!

1 个答案:

答案 0 :(得分:0)

我将ovf-env.xml从另一个Azure VM(Working Fine)手动复制到当前版本后解决了问题1,还需要修改ovf-env.xml,如hostname和username,以确保此设置与当前VM匹配环境。修复完成后,“重新启动”按钮和“重置密码”功能将重新开始在Azure门户上运行!但是现在我正在努力解决第2个问题,即“计算机名称”在门户网站上是空的。如果有任何进一步的更新,将继续发布。如果您有任何好主意或专业知识,请在这里写下来!谢谢!