本文介绍了Azure门户错误:无法启动虚拟机"xxxx".错误:URL'xxxx'引用的Key Vault机密不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我假设我的配置中未使用任何关键保管库,并且假定这些是我测试中的剩余物,所以我从资源管理器中删除了这些保管库.现在,我无法启动虚拟机,并且出现此错误消息.

I have deleted some Key Vaults from my resource manager after assuming that they are not used anywhere in my configuration and that those were some leftovers from my testing. Now I can't start my virtual machines and this error message appears.

您能请我告诉我如何让我的虚拟机重回正轨吗,因为我没有时间重新构建虚拟机?

Could you please advise me how to put my virtual machines back on track since I can't afford the time building them again?

非常感谢.

推荐答案

我有一个类似的问题,只是我的SSL证书需要更新.如果您使用 https://resources.azure.com ,则可以看到secrets属性中列出的旧URL.osProfile的.

I had a similar issue except my SSL certificate needed to be renewed. If you use https://resources.azure.com, you can see the old URL listed in the secrets property of the osProfile.

我无法使用ARM模板更新新的保管库证书,因此必须首先使用Powershell对其进行修复.这将删除旧的保管库,以便我的模板可以添加新的保管库.

I couldn't update the new vault certificate with my ARM template so I had to fix it with Powershell first. This removes the old vault so my template could add the new one.

$vaultName = "<your vault name>"
$vmName = "<your vm name>"
$rg = "<your resource group>"

$vaultId = (Get-AzKeyVault -VaultName $vaultName).ResourceId
$vm = Get-AzVM -ResourceGroupName $rg -Name $vmName

Remove-AzVMSecret -VM $vm -SourceVaultId $vaultId
Update-AzVM -ResourceGroupName $rg -VM $vm

这对我有用,所以我想记录下来,以防其他人使用.

This worked for me so I wanted to document it in case it helps somebody else.

这篇关于Azure门户错误:无法启动虚拟机"xxxx".错误:URL'xxxx'引用的Key Vault机密不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 01:27