为了保护,我试图将反病毒扩展添加到虚拟机中,但是当我试图在Azure门户中添加这个扩展时,我会得到以下错误:
未能向虚拟机添加扩展。虚拟机请求无效,指定的源映像是用户映像。图像必须是平台映像。
我安装了VMAgent。
作为附加信息,我尝试使用powershell命令安装扩展,方法是使用以下命令并获取相应的响应:
$vm = Get-AzureVM -ServiceName "MyServiceName“-Name "MyVMName"
详细:.-已完成的操作: Get部署*
Set-AzureVMExtension Microsoft.Azure.Security -ExtensionName IaaSAntimalware -Version 1.* -VM $vm.VM
警告:资源扩展引用列表为空或空
{Microsoft.WindowsAzure.Commands.ServiceManagement.Model.NetworkConfigurationSet} DataVirtualHardDisks:{ "MyVMName“}标签: OSVirtualHardDisk : Microsoft.WindowsAzure.Commands.ServiceManagement.Model.OSVirtualHardDisk RoleName:”MyVMName“RoleSize : LargeRoleType : PersistentVMRole WinRMCertificate : X509Certificates : NoExportPrivateKey : False NoRDPEndpoint : False NoSSHEndpoint : False DefaultWinRmCertificateThumbprint : F4CF28C735C5E557C7B47742E4F16A08959272F1 ProvisionGuestAgent : ResourceExtensionReferences:{IaaSAntimalware} DataVirtualHardDisksToBeDeleted:
更新-AzureVM -Name "MyServiceName“-ServiceName MyVMName”-VM $vm.VM“
详细: 11:15:10 -已完成操作:获取部署详细: 11:15:10 -开始操作:更新-AzureVM详细: 11:15:42 -完成操作:更新-AzureVM
OperationDescription OperationId OperationStatus
在运行命令之后,我检查并在VM上安装了VMAgent,但是没有扩展。
有人有什么想法吗?
谢谢!!
发布于 2014-11-03 06:37:01
原因可能是您的第一行$vm = Get-AzureVM -ServiceName "MyServiceName“-Name "MyVMName”
试试这个:
https://stackoverflow.com/questions/26671219
复制相似问题