我和我的同事有Azure帐户(使用BizSpark计划)。 我们都在每个中创建了VNets和一些VM。 现在,他想访问我创建的一些虚拟机,因此我们尝试在这些帐户之间设置VNet对等。 有可能吗?
PS:我们尝试使用VNet对等选项,因为VPN成本很高。
更多信息 :
没有重叠的IP范围。 所有虚拟机都位于同一地区(美国中南部)。 订阅具有不同的租户IDPPS:在学习本教程后更多信息
我有两个订阅:
Sub1: SubscriptionName:Visual Studio Enterprise:BizSpark SubscriptionId:79409421-0edc-40c5-a55b-4ef3ccfb0d53 TenantId:b726dcac-a1f2-420b-8713-cbee132aa6cc 用户登录ID:aaaa@example.com VNet名称:vnet1 资源组:newRG
分公司2:
SubscriptionName:Visual Studio Enterprise:BizSpark SubscriptionId:3a97ecb8-5b69-4f7b-a46b-a678eb05ae00 TenantId:88cc20a7-90cf-4854-9201-6f1424ebf7fa 用户登录ID:bbbb@example.com VNet名称:vnet2 资源组:newRG
我打开了两个Powershell窗口并按如下方式运行命令
Window1(对于Sub 1):
Login-AzureRmAccount ( logged in with aaaa@example.com ) Get-AzureRmSubscription Select-AzureRmSubscription -SubscriptionId "79409421-0edc-40c5-a55b-4ef3ccfb0d53" New-AzureRmRoleAssignment -SignInName "bbbb@example.com" -RoleDefinitionName "Network Contributor" -Scope /subscriptions/79409421-0edc-40c5-a55b-4ef3ccfb0d53/resourceGroups/newRG/providers/Microsoft.Network/VirtualNetworks/vnet2Window2(对于Sub 2):
Login-AzureRmAccount( logged in with bbbb@example.com ) Get-AzureRmSubscription Select-AzureRmSubscription -SubscriptionId "79409421-0edc-40c5-a55b-4ef3ccfb0d53" New-AzureRmRoleAssignment -SignInName "aaaa@example.com" - RoleDefinitionName "Network Contributor" -Scope /subscriptions/3a97ecb8-5b69-4f7b-a46b-a678eb05ae00/resourceGroups/newRG/providers/Microsoft.Network/VirtualNetworks/vnet1Window1 (for Sub 1):
Login-AzureRmAccount ( logged in with aaaa@example.com ) Get-AzureRmSubscription Select-AzureRmSubscription -SubscriptionId "79409421-0edc-40c5-a55b-4ef3ccfb0d53" New-AzureRmRoleAssignment -SignInName "bbbb@example.com" -RoleDefinitionName "Network Contributor" -Scope /subscriptions/79409421-0edc-40c5-a55b-4ef3ccfb0d53/resourceGroups/newRG/providers/Microsoft.Network/VirtualNetworks/vnet2Window2 (for Sub 2):
Login-AzureRmAccount( logged in with bbbb@example.com ) Get-AzureRmSubscription Select-AzureRmSubscription -SubscriptionId "79409421-0edc-40c5-a55b-4ef3ccfb0d53" New-AzureRmRoleAssignment -SignInName "aaaa@example.com" - RoleDefinitionName "Network Contributor" -Scope /subscriptions/3a97ecb8-5b69-4f7b-a46b-a678eb05ae00/resourceGroups/newRG/providers/Microsoft.Network/VirtualNetworks/vnet1when I run the above command, getting the same error as above
最满意答案
是的,“只要两个订阅的特权用户授权对等,并且订阅与同一个Active Directory租户相关联,就可以在两个不同订阅中的虚拟网络之间建立对等关系。”
我在下面链接的页面上还有其他一些警告,例如。 你不能有重叠的IP地址范围。
请参阅Azure vnet对等
Yes, "Peering can be established between virtual networks in two different subscriptions as long a privileged user of both subscriptions authorizes the peering and the subscriptions are associated to the same Active Directory tenant. "
There are some other caveats on the page I've linked to below, eg. you cant have overlapping ip address ranges.
See Azure vnet peering
更多推荐
发布评论