无法通过 Azure Bastion 通过虚拟机连接

Unable to connect through virtual machine via Azure Bastion

我在通过 Azure Bastion 连接到虚拟机时遇到了一些问题。我收到以下错误

Bastion is in failed state. Please delete and recreate it.

能否请您告诉我为什么会收到上述错误消息,有人可以建议我解决此问题的方法。

当 Azure Bastion 没有做好配置或您正在删除 Bastion 服务(删除服务需要几分钟)时,可能会发生错误。

将 Bastion 部署到虚拟网络后,屏幕更改为连接页面。

在这种情况下,您可以删除失败的堡垒服务。我建议 re-creating 使用 Azure PowerShell or CLI 的 Azure Bastion 主机以避免一些门户问题。

例如

# create an AzureBastionSubnet in your Azure VNet.
az network vnet create -g $RgName -n $VNetName  --address-prefix 10.0.0.0/16 --subnet-name AzureBastionSubnet  --subnet-prefix 10.0.0.0/24

# create a public IP address. The public IP address must be in the same region as the Bastion resource you are creating.
az network public-ip create -g $RgName -n $publicip --sku Standard

# create a bastion host in the same region as your VM
az network bastion create --name $name --public-ip-address $publicip --resource-group $RgName --vnet-name $VNetName --location $location

堡垒资源的创建和部署大约需要 5 分钟。请耐心等待。