Azure 我删除了门户上的 VMAccessForLinux 扩展

标签 azure virtual-machine azure-virtual-machine reinstall

如标题所示,我删除了VMAccessForLinux Extension。 但是,无法恢复该扩展。

如何在我的虚拟机上重新安装扩展?

在使用 Azure CLI 的情况下,它会出现如下错误:


2016 年 2 月 24 日星期三 20:56:17 GMT+0900(韩国时间): { [错误:对角色的扩展引用的更新无效:Look360VM 和引用:VMAccessForLinux。] 代码:'错误请求', 状态代码:400, 请求 ID: '36d5f8a1bcd37ce480e26e31a2742249' } 错误:对角色:Look360VM 和引用:VMAccessForLinux 的扩展引用的更新无效。 在 Function.ServiceClient._normalizeError (/usr/local/azure/node_modules/azure-common/lib/services/serviceclient.js:815:23) 在/usr/local/azure/node_modules/azure-common/lib/services/filters/errorhandlingfilter.js:44:29 在Request._callback(/usr/local/azure/node_modules/azure-common/lib/http/request-pipeline.js:109:14) 在Request.self.callback(/usr/local/azure/node_modules/azure-common/node_modules/request/request.js:199:22) 在 Request.emit (events.js:110:17) 按要求。 (/usr/local/azure/node_modules/azure-common/node_modules/request/request.js:1160:14) 在 Request.emit (events.js:129:20) 在传入消息。 (/usr/local/azure/node_modules/azure-common/node_modules/request/request.js:1111:12) 在 IncomingMessage.emit (events.js:129:20) 在 _stream_read.js:908:16


上面写着“BadRequest”。我不知 Prop 体原因,但可能是我删除了扩展程序。

如果您有经验,请评论解决方案。 谢谢。

最佳答案

在当前的 Azure CLI 中,始终使用实用程序命令 azure vm reset-access 及其参数来执行此工作(假设您采用的是 ARM 部署)。这是最简单的方法,因为你不必担心 json 的东西......

azure vm reset-access --help
help:    Enables you to reset Remote Desktop Access or SSH settings on a Virtual Machine and to reset the password for the account that has administrator or sudo authority.
help:
help:    Usage: vm reset-access [options] <resource-group> <name>
help:
help:    Options:
help:      -h, --help                             output usage information
help:      -v, --verbose                          use verbose output
help:      -vv                                    more verbose with debug output
help:      --json                                 use json output
help:      -g, --resource-group <resource-group>  the resource group name
help:      -n, --name <name>                      the virtual machine name
help:      -u, --user-name <user-name>            the user name
help:      -p, --password <password>              the password
help:      -M, --ssh-key-file <ssh-key-file>      path to public key PEM file or SSH Public key file for SSH authentication (valid only when os-type is "Linux")
help:      -r, --reset-ssh                        Reset the SSH configuration to default
help:      -E, --extension-version <version>      Version of VM Access extension [1.4]
help:      -e, --expiration <expiration>          password expiration
help:      -R, --remove-user <remove-user-name>   Remove a user account with specified name
help:      -s, --subscription <subscription>      the subscription identifier
help:
help:    Current Mode: arm (Azure Resource Management)

关于Azure 我删除了门户上的 VMAccessForLinux 扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35601635/

相关文章:

mysql - 用于将数据从 Azure MSSQL 复制到 Azure MySQL 的 Azure 管道复制数据事件

php - 链接 (CSS) 和脚本不会使用共享文件夹文档根更新我的 VM 上的内容

azure - 无法在 PowerShell Runbook 中从 Azure 存储下载模板文件

已达到 Azure Batch 池配额

powershell - 安装模块 : The term 'Install-Module' is not recognized as the name of a cmdlet

Azure云服务网络带宽

powershell - 如何使用 ARM Powershell 为新创建的虚拟机分配网络接口(interface)?

php - 为什么我的 twilio Web 应用程序可以在 XAMPP 中运行,但不能在 AZURE 中运行

azure - 使用外部 IP 时在同一区域中的两个 Azure VM 之间进行路由

virtual-machine - Windows Vista 虚拟机错误 : VMware Tools are not running in the guest