本文列出支援的 Hyper-V 主機與 Hyper-V 管理員版本組合,並描述如何連線至遠端和本機 Hyper-V 主機,以對其進行管理。
Hyper-V 管理員可讓您管理少量的 Hyper-V 主機 (遠端和本機)。 其會在您安裝 Hyper-V 管理工具時進行安裝,而這可以透過完整 Hyper-V 安裝或僅限工具安裝來完成。 如果您執行僅限工具安裝,則可以在不符合硬體需求的計算機上使用工具來裝載 Hyper-V。 For details about hardware for Hyper-V hosts, see System requirements. 如果未安裝 Hyper-V 管理員,請遵循 安裝 Hyper-V 管理員的指示。
連線至 Hyper-V 主機
To connect to a Hyper-V host from Hyper-V Manager, right-click Hyper-V Manager in the left pane, and then select Connect to Server.
管理本機電腦上的 Hyper-V
除非您新增電腦 (包括本機電腦),否則 Hyper-V 管理員不會列出任何裝載 Hyper-V 的電腦。 若要這樣做:
- In the left pane, right-click Hyper-V Manager.
- 選取 [連線到伺服器]。
- From Select Computer, select Local computer and then select OK.
如果您無法連線:
- 可能只會安裝 Hyper-V 工具。 若要檢查是否已安裝 Hyper-V 平臺,請尋找虛擬機管理服務。 To do so, open the Services desktop app: select Start, select the Start Search box, type services.msc, and then select Enter. If the Virtual Machine Management service isn't listed, install the Hyper-V platform by following the instructions in Install Hyper-V.
- 檢查您的硬體是否符合需求。 See System requirements.
- 請確定您的用戶帳戶屬於 Administrators 群組或 Hyper-V Administrators 群組。
遠端管理 Hyper-V 主機
若要管理遠端 Hyper-V 主機,請在本機電腦和遠端主機上啟用遠端管理。
On Windows Server, open Server Manager >Local Server>Remote management and then select Allow remote connections to this computer.
或者,從任一作業系統中,以系統管理員身分開啟 Windows PowerShell,然後執行:
Enable-PSRemoting
連線至相同網域中的主機
To add a remote Hyper-V host to Hyper-V Manager, select Another computer in the Select Computer dialog and enter the remote host's hostname, NetBIOS name, or fully qualified domain name (FQDN).
Hyper-V Manager 提供更多類型的遠端連線,如下列各節所述。
以不同使用者身分連線到遠端主機
當您在本機電腦上未以 Hyper-V Administrators 群組成員或 Hyper-V 主機上 Administrators 群組成員的使用者身分執行時,這可讓您連線至 Hyper-V 主機。 若要這樣做:
- In the left pane, right-click Hyper-V Manager.
- 選取 [連線到伺服器]。
- 在 [選取計算機] 對話框中,選取 [以其他使用者身分連線]。
- Select Set User.
使用IP位址連線到遠端主機
若要這樣做:
- In the left pane, right-click Hyper-V Manager.
- 選取 [連線到伺服器]。
- Enter the IP address into the Another Computer box.
連線到位於您網域之外的遠端主機,或沒有網域的主機
若要這樣做:
在要管理的 Hyper-V 主機上,以系統管理員身分開啟 Windows PowerShell 工作階段。
針對私人網路區域,建立必要的防火牆規則:
Enable-PSRemoting
若要在公用區域上允許遠端存取,請啟用 CredSSP 和 WinRM 的防火牆規則:
Enable-WSManCredSSP -Role server
For details, see Enable-PSRemoting and Enable-WSManCredSSP.
接下來,設定您將用來管理 Hyper-V 主機的電腦。
以系統管理員身分開啟 Windows PowerShell 工作階段。
執行以下命令:
Set-Item WSMan:\localhost\Client\TrustedHosts -Value "fqdn-of-hyper-v-host"
Enable-WSManCredSSP -Role client -DelegateComputer "fqdn-of-hyper-v-host"
您可能也需要設定下列群組原則:
- Computer Configuration>Administrative Templates>System>Credentials Delegation>Allow delegating fresh credentials with NTLM-only server authentication
- Select Enable and add wsman/fqdn-of-hyper-v-host.
開啟 [Hyper-V 管理員]。
In the left pane, right-click Hyper-V Manager.
選取 [連線到伺服器]。
For cmdlet details, see Set-Item and Enable-WSManCredSSP.
安裝 Hyper-V 管理員
若要使用 UI 工具,請選擇適合您將執行 Hyper-V Manager 之電腦上的作系統:
On Windows Server, open Server Manager >Manage>Add roles and features. Move to the Features page and expand Remote server administration tools>Role administration tools>Hyper-V management tools.
在 Windows 上,可在任何包括 Hyper-V 的 Windows 作業系統上取得 Hyper-V 管理員。
- 在 Windows 桌面上,選取 [開始] 按鈕並開始輸入 [程式和功能]。
- 在搜尋結果中,選取 [ 程式和功能]。
- 在左窗格中,選取 [ 開啟或關閉 Windows 功能]。
- 展開 [Hyper-V] 資料夾,然後選取 [Hyper-V 管理工具]。
- 若要安裝 Hyper-V 管理員,請選取 [管理工具]Hyper-V。 如果您想要同時安裝 Hyper-V 模組,請選取該選項。
若要使用 Windows PowerShell,請以系統管理員身分執行下列命令:
add-windowsfeature rsat-hyper-v-tools