params = self.compute_client.models().VirtualMachineExtension(location="southeastasia",
publisher='Microsoft.VisualStudio.Services',
virtual_machine_extension_type='TeamServicesAgent',
type_handler_version='1.14',
auto_upgrade_minor_version=True,
settings={
"vstsAccountName": "xyz",
"teamProject": "xyz",
"deploymentGroup": "Virtual Machine Test",
"agentName": "",
"tags": ""
},
protected_settings={
"PATToken": "uy4luslycpkjhXXXXXXXnypzcnrlfXXXuddxrXXXXwdw5hxbzlxv5ja"
}
)
我收到Message: VM has reported a failure when processing extension 'hello'. Error message: "Failed to get status file [Errno 2] No such file or directory: '/var/lib/waagent/Microsoft.VisualStudio.Services.TeamServicesAgent-1.14.0.0/status/0.status'".
设置属性中是否有错误的参数?
答案 0 :(得分:1)
virtual_machine_extension_type='TeamServicesAgent'
仅适用于Windows VM。对于Linux VM,您应该使用TeamServicesAgentLinux
。
您可以看到此link。