2016-01-20 39 views
0

我已安裝Windows Server 2016 Technical Preview 4 on VMware Warkstation。
它具有2 GB RAM和60 GB磁盤空間。
如何在安裝Docker時在Windows Server 2016 TP4中正確創建虛擬交換機? (不是boot2docker)

我嘗試安裝的Windows Server主機泊塢窗根據official Microsoft instruction.
Instruction in general in the picture

我不需要Hyper-V的集裝箱技術,因此對於本指南我沒有使步驟標有星號'*'

因此,我們有6個步驟來安裝Windows Server主機和Docker:

  1. 安裝容器特性
  2. 創建虛擬交換機
  3. 配置NAT
  4. 配置MAC地址欺騙
  5. 安裝集裝箱OS圖像
  6. 安裝泊塢 **

我有兩個步驟的一個問題:科瑞虛擬交換機,而在PowerShell中輸入接下來的cmdlet:

PS C:\> New-VMSwitch -Name "Virtual Switch" -SwitchType NAT -NATSubnetAddress 172.16.0.0/12 
New-VMSwitch : Failed while adding virtual Ethernet switch connections. 
Internal miniport create failed, name = '8A407781-1BF5-4BB0-8538-35CFF056C598', friendly name = 'vEthernet (Virtual Switch)', MAC = 'DYNAMIC': One or more arguments are invalid 
(0x80070057). 
At line:1 char:1 
+ New-VMSwitch -Name "Virtual Switch" -SwitchType NAT -NATSubnetAddress ... 
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : InvalidArgument: (:) [New-VMSwitch], VirtualizationException 
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.NewVMSwitch 

我應該在這種情況下怎麼辦?

+0

NAT是2016年SwitchType參數的有效類型嗎?目前的文件表明,只有內部或私人。 https://technet.microsoft.com/en-us/library/hh848455.aspx –

回答

1

我能夠使用Microsoft guide自動安裝而是採用manual guide安裝搬運工:

# Auto-install instruction. 

PS C:\> powershell.exe 
PS C:\> start-process powershell -Verb runas 
PS C:\> wget -uri https://aka.ms/tp4/Install-ContainerHost -OutFile C:\Install-ContainerHost.ps1 
PS C:\> C:\Install-ContainerHost.ps1 -HyperV 

# Wrong! 

但在最後一行重點-HyperV錯誤。
我們需要則會忽略它,所以最後一行是這樣的:

PS C:\> powershell.exe 
PS C:\> start-process powershell -Verb runas 
PS C:\> wget -uri https://aka.ms/tp4/Install-ContainerHost -OutFile C:\Install-ContainerHost.ps1 
PS C:\> C:\Install-ContainerHost.ps1 

# Currect! 

使用正確的指令,我是能夠安裝搬運工。

1

我有同樣的錯誤納米服務器上的第一次,我跑:

PS C:\> New-VMSwitch -Name "Virtual Switch" -SwitchType NAT -NATSubnetAddress 172.16.0.0/12 

SwitchType NAT是絕對正確的,因爲該命令不接受任何其他然後一個NAT switchtype的NATSubnetAddress參數。 再次運行它,然後在我的Nano服務器上運行。

+0

你使用標準的PowerShell或ISE嗎?不知何故,標準PS似乎更好地工作。 – aaspnas

相關問題