为什么New-AzureReservedIP返回ResourceNotFound:找不到部署? [英] Why does New-AzureReservedIP return ResourceNotFound: No deployments were found?

查看:87
本文介绍了为什么New-AzureReservedIP返回ResourceNotFound:找不到部署?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含两个VM的云服务.我正在尝试按照本文中列出的步骤进行操作保留我的云服务的IP地址.

I have a cloud service that has two VMs in it. I'm trying to follow the steps listed in this article to reserve my cloud service's IP address.

Login-AzureRmAccount -TenantId <my tenant id>
Set-AzureRmContext -SubscriptionId <my subscription id>
New-AzureReservedIP -ReservedIPName myname -Location "Central US" -ServiceName mycloudservicename

我总是会收到此错误:

New-AzureReservedIP:ResourceNotFound:找不到部署.

New-AzureReservedIP : ResourceNotFound: No deployments were found.

VM是在新门户中创建的,但是是经典模式.我不确定这是否是我的问题.我尝试了cmdlet的其他组合来添加帐户或设置订阅,但无济于事.

The VMs were created in the new portal but are classic mode. I'm not sure if that is somehow my problem. I've tried other combinations of cmdlets to add accounts or set subscription but nothing helps.

有什么想法吗?

推荐答案

我为此奋斗了30分钟.我不太确定为什么会这样,但是我认为选择订阅时出错.上次它是这样工作的:

I was fighting like 30 minutes with this. I'm not very sure why this was happening but I think was an error selecting the subscription. Last time it worked like this:

  • 关闭Azure Power Shell并再次将其打开.
  • 列出了我的订阅:"Get-AzureSubscription" (请确保您已登录).
  • 现在我可以看到确切的订阅ID,并使用"Select-AzureSubscription -SubscriptionId XXXXXXXX"
  • 此命令生效.
  • New-AzureReservedIP -ReservedIPName"myname"-位置"South Central US" -ServiceName"myservice"
  • Close Azure Power Shell and Open it again.
  • Listed my subscriptions with: "Get-AzureSubscription" (Make sure you are logged in).
  • Now I can see the exact Subscription ID and use "Select-AzureSubscription -SubscriptionId XXXXXXXX"
  • After that the command worked.
  • New-AzureReservedIP -ReservedIPName "myname" -Location "South Central US" -ServiceName "myservice"

希望有帮助.

这篇关于为什么New-AzureReservedIP返回ResourceNotFound:找不到部署?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆