Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powershell 使用两个NIC配置Azure VM_Powershell_Azure_Networking_Azure Storage - Fatal编程技术网

Powershell 使用两个NIC配置Azure VM

Powershell 使用两个NIC配置Azure VM,powershell,azure,networking,azure-storage,Powershell,Azure,Networking,Azure Storage,我正在使用Windows Server 2012路由和远程访问服务RRAS在Azure虚拟网络中使用站点到站点VPN实现站点到站点VPN 要配置它,我需要一台带有两个NIC的Windows Server 2012计算机。 使用Microsoft Azure Powershell,我正在尝试创建它 我将按照此步骤进行操作 我从Azure Image Gallery中选择VM $image = Get-AzureVMImage -ImageName "a699494373c04fc0bc8f2bb1

我正在使用Windows Server 2012路由和远程访问服务RRAS在Azure虚拟网络中使用站点到站点VPN实现站点到站点VPN

要配置它,我需要一台带有两个NIC的Windows Server 2012计算机。 使用Microsoft Azure Powershell,我正在尝试创建它

我将按照此步骤进行操作

我从Azure Image Gallery中选择VM

$image = Get-AzureVMImage -ImageName "a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201408.01-en.us-127GB.vhd"
然后,我创建了一个VM配置,包括它的名称、cores4的编号和映像。我不知道什么是可用性集

$vm=New AzureVMConfig-Name MultiNicVM-InstanceSize超大-Image$Image.ImageName–AvailabilitySetName“MyAVSet”

为VM创建登录名

添加AzureProvisioningConfig–VM$VM-Windows-AdminUserName”“-密码”

4.添加具有静态IP地址的附加NIC

Add-AzureNetworkInterfaceConfig -Name "Ethernet1" -SubnetName "Midtier" 
-StaticVNetIPAddress "10.1.1.111" -VM $vm
默认NIC的配置。对于默认NIC,它应该是公共IP,为什么给它一个私有IP

设置AzureSubnet-子网名称前端-VM$VM 设置AzureStaticVNetIP-IPAddress 10.1.0.100-VM$VM

创建虚拟机,多NIC VNet已作为虚拟网络存在

新AzureVM-ServiceName MultiNIC CS–VNetName“MultiNIC VNet”-VM$VM

在步骤6,它得到一个错误:托管服务不存在

New-AzureVM : ResourceNotFound: The hosted service does not exist.
At line:1 char:1
+ New-AzureVM -ServiceName "MultiNIC-CS" –VNetName “MultiNIC-VNet” –VM $vm
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [New-AzureVM], CloudException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.PersistentVMs.NewAzureVMCommand
我所需要的是一个具有公共IP的NIC和一个具有专用IP的NIC,它充当站点到站点VPN的局域网。但是默认NIC被赋予一个私有IP,那么会自动创建另一个具有公共IP的NIC吗


为什么我获取的错误托管服务不存在?

新AzureVM中未指定位置或AffinityGroup参数 创建新服务时,需要其中一个