在 VMM 計算網狀架構中新增 Windows 伺服器做為 Hyper-V 主機或叢集Add Windows servers as Hyper-V hosts or clusters in the VMM compute fabric

重要

已不再支援此版本的 Virtual Machine Manager (VMM),建議升級至 VMM 2019This version of Virtual Machine Manager (VMM) has reached the end of support, we recommend you to upgrade to VMM 2019.

閱讀本文章,以了解如何將現有的 Windows 伺服器做為 Hyper-V 主機伺服器或叢集新增至 System Center - Virtual Machine Manager (VMM) 網狀架構,以及如何設定主機和叢集內容。Read this article to learn about adding an existing Windows server as a Hyper-V host server or cluster to the System Center - Virtual Machine Manager (VMM) fabric, and configuring the host and cluster properties.

本文內容與新增含或不含 Hyper-V 角色的 Windows 伺服器電腦有關。The article is relevant for adding Windows server computers with or without the Hyper-V role. 如果您新增未安裝 Hyper-V 的 Windows 伺服器,只要該伺服器符合先決條件,VMM 就會安裝 Hyper-V 角色。If you add a Windows server that doesn't have Hyper-V installed, VMM will install the Hyper-V role as long as the server meets the prerequisites.

在您開始使用 Intune 之前Before you start

新增現有 Hyper-V 主機伺服器或叢集的先決條件取決於是否已安裝 Hyper-V,以及伺服器所在的位置。The prerequisites for adding an existing Hyper-V host server or cluster depend on whether Hyper-V is installed and where the server is located.

主機位置Host location 必要條件Prerequisite
不含 Hyper-V 的伺服器Server without Hyper-V 如果您想要新增未安裝 Hyper-V 的伺服器,該伺服器就必須符合 Hyper-V 安裝的先決條件If you want to add a server that doesn't have Hyper-V installed it must meet the prerequisites for Hyper-V installation.

伺服器必須執行支援的 Windows Server 版本The server must be running supported version of Windows Server.

如果您想要新增 VMM 管理伺服器做為受管理的 Hyper-V 主機,則在新增之前,必須先在該伺服器上安裝 Hyper-V 角色。If you want to add the VMM management server as a managed Hyper-V host the Hyper-V role must be installed on the server before you add it. 您無法新增高可用性的 VMM 伺服器做為受管理的 Hyper-V 主機叢集。You can't add a highly available VMM server as a managed Hyper-V host cluster.
如果您想要新增 Hyper-V 叢集,本文中的指示假設叢集已經存在。If you want to add a Hyper-V cluster the instructions in this article presume that the cluster already exists. 如果您想要從 VMM 網狀架構中現有的 Hyper-V 主機建立叢集,請閱讀本文。Read this article if you want to create a cluster from existing Hyper-V hosts in the VMM fabric.

本文假設您想要新增的伺服器上已經有執行中的作業系統。This article assumes that the server you want to add already has an operating system running on it. 如果您想要新增裸機電腦做為 Hyper-V 主機或叢集,請閱讀本文。If you want to add a bare-metal computer as a Hyper-V host or cluster read this article.
與 VMM 伺服器相同的網域或雙向信任的網域Same domain as VMM server, or two-way trusted domain 您必須在要新增的電腦上,指定具有系統管理權限之帳戶的帳戶認證。You must specify account credentials for an account that has administrative rights on the computers that you want to add. 您可以輸入使用者名稱和密碼,或指定 RunAs 帳戶。You can enter a user name and password or specify a RunAs account.

如果您使用群組原則來設定 Windows 遠端管理 (WinRM) 設定,請注意下列設定:If you use Group Policy to configure Windows Remote Management (WinRM) settings, note these settings:

WinRM 服務設定必須透過群組原則來設定,且僅適用於受信任 Active Directory 網域中的主機。WinRM Service settings must be configured through Group Policy, and can only apply to hosts that are in a trusted Active Directory domain. 具體來說,VMM 支援 [允許自動設定接聽程式]、[開啟相容性 HTTP 接聽程式] 和 [開啟相容性 HTTPS 接聽程式] 群組原則設定的組態。Specifically, VMM supports the configuration of the Allow automatic configuration of listeners, Turn On Compatibility HTTP Listener, and Turn on Compatibility HTTPS Listener Group Policy settings. VMM 不支援其他 WinRM 服務原則設定。VMM does not support other WinRM Service policy settings.

如果您啟用 [允許自動設定接聽程式] 原則設定,必須將其設為允許來自任何 IP 位址的訊息。If you enable the Allow automatic configuration of listeners policy setting, you must configure it to allow messages from any IP address. 換句話說,在原則設定中,必須將 IPv4 篩選器和 IPv6 篩選器 (根據您是否使用 IPv6 而定) 設為 *****。In other words, in the policy setting, the IPv4 filter and IPv6 filter (depending on whether you use IPv6) must be set to *****.

WinRM 用戶端設定無法透過群組原則來設定。WinRM Client settings cannot be configured through Group Policy. 這些原則設定可能會覆寫 VMM 需要用來使 VMM 代理程式正常運作的用戶端內容。These policy settings might override client properties that VMM requires for the VMM agent to work correctly.

如果您啟用任何不支援的 WinRM 群組原則設定,則 VMM 代理程式的安裝可能會失敗。If you enable any unsupported WinRM Group Policy settings, installation of the VMM agent may fail.
不信任的網域Untrusted domain VMM 不支援在不信任 Active Directory 網域中的主機上,設定 Windows 遠端管理 (WinRM) 群組原則設定 (服務或用戶端)。VMM doesn't support configuring Windows Remote Management (WinRM) Group Policy settings (Service or Client) on hosts that are in an untrusted Active Directory domain. 若啟用 WinRM 群組原則設定,VMM 代理程式的安裝 (主機上所需的) 可能會失敗。If WinRM Group Policy settings are enabled, installation of the VMM agent—required on the hosts might fail.

在不信任的網域中,當 VMM 在伺服器或叢集上安裝代理程式時,它也會產生憑證。In an untrusted domain, when VMM installs the agent on the servers or clusters, it also generates a certificate. 憑證可用來協助保護與主機的通訊安全。The certificate is used to help secure communications with the host. 當 VMM 新增主機或叢集時,該憑證會自動匯入 VMM 管理伺服器的受信任憑證存放區。When VMM adds the host or cluster, the certificate is automatically imported into the VMM management server trusted certificate store.
脫離的命名空間 (DNS 尾碼不符合其所屬的網域)Disjoined namespace (DNS suffix doesn't match the domain of which it's a member) System Center Virtual Machine Manager 服務必須以本機系統帳戶,或是有權在 Active Directory 中登錄服務主體名稱 (SPN) 的網域帳戶來執行。The System Center Virtual Machine Manager service must be running as the local system account or as a domain account that has permission to register a Service Principal Name (SPN) in Active Directory.

當您嘗試新增的電腦位於脫離的命名空間時,VMM 就會檢查 Active Directory,以查看 SPN 是否存在。When you try to add a computer that is in a disjointed namespace, VMM checks Active Directory to see if an SPN exists. 如果它不存在,VMM 即會嘗試建立一個。If it doesn't VMM tries to create one. 如果權限正確,VMM 就會自動新增遺失的 SPN。If the permissions are OK VMM adds the missing SPN automatically. 否則,主機新增會失敗,而您必須手動新增 SPN。Otherwise, host addition fails and you'll need to add the SPN manually. 若要執行這項操作,請輸入︰setspn -A HOST/To do this type: setspn -A HOST/. 例如,setspn -A HOST/hypervhost03.contosocorp.com hypervhost03。For example, setspn –A HOST/hypervhost03.contosocorp.com hypervhost03.

如果主機叢集位於脫離的命名空間中,而 VMM 管理伺服器不是,請將主機叢集的 DNS 尾碼新增至 VMM 管理伺服器上的 TCP/IP 連線設定。If the host cluster is in a disjointed namespace and the VMM management server is not, add the DNS suffix for the host cluster to the TCP/IP connection settings on the VMM management server.

如果您使用群組原則來設定 Windows 遠端管理 (WinRM) 設定,請檢閱下列需求:If you use Group Policy to configure Windows Remote Management (WinRM) settings, review the following requirements:

WinRM 服務設定必須透過群組原則來設定,且僅適用於受信任 Active Directory 網域中的主機。WinRM Service settings must be configured through Group Policy, and can only apply to hosts that are in a trusted Active Directory domain. 具體來說,VMM 支援 [允許自動設定接聽程式]、[開啟相容性 HTTP 接聽程式] 和 [開啟相容性 HTTPS 接聽程式] 群組原則設定的組態。Specifically, VMM supports the configuration of the Allow automatic configuration of listeners, Turn On Compatibility HTTP Listener, and Turn on Compatibility HTTPS Listener Group Policy settings. VMM 不支援其他 WinRM 服務原則設定。VMM does not support other WinRM Service policy settings.

如果您啟用 [允許自動設定接聽程式] 原則設定,就必須將其設為允許來自任何 IP 位址的訊息。If you enable the Allow automatic configuration of listeners policy setting, you must configure it to allow messages from any IP address. 換句話說,在原則設定中,必須將 IPv4 篩選器和 IPv6 篩選器 (根據您是否使用 IPv6 而定) 設為 *In other words, in the policy setting, the IPv4 filter and IPv6 filter (depending on whether you use IPv6) must be set to *.

WinRM 用戶端設定無法透過群組原則來設定。WinRM Client settings cannot be configured through Group Policy. 這些原則設定可能會覆寫 VMM 需要用來使 VMM 代理程式正常運作的用戶端內容。These policy settings might override client properties that VMM requires for the VMM agent to work correctly.

如果您啟用任何不支援的 WinRM 群組原則設定,則 VMM 代理程式的安裝可能會失敗。If you enable any unsupported WinRM Group Policy settings, installation of the VMM agent may fail.
周邊網路或工作群組Perimeter network or workgroup 您需要在目標主機上本機安裝 VMM 代理程式。You'll need to install the VMM agent locally on the target host. 若要執行這項操作,以系統管理員身分執行 VMM 安裝程式,然後按一下 [選擇性安裝] > [本機代理程式] 。To do this run VMM setup as an administrator and click Optional Installations > Local Agent. 在 [安全性檔案資料夾] 中,選取 [此主機位在周邊網路] 並輸入加密金鑰。In Security File Folder select This host in on a perimeter network and enter an encryption key. 在 [主機網路名稱] 中,指定 VMM 伺服器將連線主機伺服器的方式,並記下電腦名稱或 IP 位址。In Host network name specify how the VMM server will contact the host server and note the computer name or IP address. 完成精靈。Finish the wizard.

檢查 SecurityFile.txt 檔案位於 VMM 伺服器上。Check that a file SecurityFile.txt is located on the VMM server. 依預設,該檔案位於 C:\Program Files\Microsoft System Center version\Virtual Machine Manager。By default it's located in C:\Program Files\Microsoft System Center version\Virtual Machine Manager.

注意

在主機上安裝 VMM 代理程式之後,本機電腦帳戶會自動新增至本機 Administrators 群組。After VMM agent installation on the host, local computer account gets automatically added to the local Administrators group. 這不是 VMM 代理程式的必要需求;如有需要,您可以手動將本機電腦帳戶從主機上的 Administrators 群組移除。This is not a mandatory requirement for VMM agent; If needed, you can manually remove the local computer account from the Administrators group on the host.

新增伺服器Add servers

  1. 在 VMM 主控台中,開啟 [網狀架構] > [伺服器] 。In the VMM console open Fabric > Servers.

  2. 按一下 [新增群組] > [新增資源] > [Hyper-V 主機和叢集] 。Click Add group > Add Resources > Hyper-V hosts and Clusters.

  3. 在 [新增資源精靈] > [資源位置] 中,選取您想要新增的伺服器所在位置。In the Add Resource Wizard > Resource location, select where the server you want to add is located.

    • 如果您要在周邊網路中新增主機,則選取 [周邊網路中的 Windows Server 電腦] 。If you're adding a host in a perimeter network select Windows Server computer in a perimeter network.
  4. 在 [認證] 中,針對在您要新增的所有主機上具有系統管理權限的網域帳戶輸入認證In Credentials, specify credentials for a domain account that has administrative permissions on all hosts that you want to add. (針對不信任網域中的電腦,您必須使用 RunAs 帳戶)。(For computers in an untrusted domain, you must use a RunAs account.)

  5. 在 [探索範圍] 中,指定:In Discovery scope specify:

    • 相同網域或雙向信任的網域Same domain or domains with two-way trust:
      • 如果您按一下 [依名稱指定 Windows Server 電腦] ,則要在 [電腦名稱] 中輸入名稱或 IP 位址,每行一個。If you click Specify Windows Server computers by names, in Computer names enter names or IP addresses, one per line. 如果您要新增 Hyper-V 主機叢集,需指定叢集或任何叢集節點的名稱或 IP 位址。If you are adding a Hyper-V host cluster, specify the name or IP address of the cluster or of any cluster node.
      • 如果您按一下 [指定 Active Directory 查詢以搜尋 Windows Server 電腦] ,您可以輸入或產生查詢。If you click Specify an Active Directory query to search for Windows Server computers, you can type or generate a query.
    • 不信任的網域:[探索] 頁面未出現Untrusted domain: Discovery page doesn't appear
    • 脫離的命名空間:輸入主機 FQDN,然後選取 [跳過 AD 驗證]。Disjointed namespace: Enter the host FQDN and select Skip AD verification.
  6. 在 [目標資源] 中,指定您想要新增的電腦。In Target resources, specify the computers you want to add. 針對所有主機重複執行。Repeat for all hosts. 如果探索成功,該主機將會列於 [電腦名稱] 之下。If discovery succeeds the host will be listed under Computer name. 以如下方式新增:Add as follows:

    • 受信任的網域或脫離的命名空間:針對您要新增的每部電腦選取其旁邊的核取方塊,然後按一下 [下一步]。Trusted domain or disjointed namespace: Select the check box next to each computer that you want to add, and then click Next. 如果您在上一個步驟中指定了叢集名稱或叢集節點,請選取該叢集名稱旁的核取方塊If you specified a cluster name or cluster node in the previous step, select the check box next to the cluster name. (叢集名稱會與關聯的叢集節點一併列出)。(The cluster name is listed together with the associated cluster nodes.)
    • 不信任的網域:針對您要新增的伺服器或叢集輸入其 FQDN 或 IP 位址,然後按一下 [新增]。Untrusted domain: Enter the FQDN or IP address of the server or cluster that you want to add, and then click Add. 對於叢集,您可以輸入叢集或其中一個叢集節點的 FQDN 或 IP 位址。For a cluster, you can enter an FQDN or IP address of the cluster or of one of the cluster nodes.
    • 周邊網路/工作群組:輸入周邊網路中主機的 NETBIOS 名稱或 IP 位址。Perimeter network/workgroup: Enter the NETBIOS name or IP address of the host in the perimeter network. 輸入您在主機上安裝代理程式時建立的加密金鑰,然後在安全性檔案路徑中,輸入 SecurityFile.txt 檔案的路徑。Enter the encryption key you created when you installed the agent on the host, and in Security file path enter the path to the SecurityFile.txt file.
  7. 在 [主機設定] > [主機群組] 清單中,按一下您想要指派主機或主機叢集的目標主機群組。In the Host settings > Host group list, click the host group to which you want to assign the host or host cluster. 如果該主機已經和不同的 VMM 管理伺服器相關聯,請選取 [將這部主機與這個 VMM 環境重新關聯] 。If the host is already associated with a different VMM management server, select Reassociate this host with this VMM environment. 如果該主機並未與另一部 VMM 管理伺服器相關聯,則它將會在該伺服器上停止運作。If the host was associated with a different VMM management server, it will stop working on that server.

    • 針對獨立主機,在 [新增下列路徑] 中,輸入主機上的路徑以用來儲存部署於主機之虛擬機器的檔案,然後按一下 [新增] 。For a standalone host, in Add the following path, enter a path on the host for storing files for virtual machines that are deployed on the host, and then click Add. 重複執行以新增一個以上的路徑。Repeat to add more than one path. 如果路徑不存在,它會自動建立。If the path doesn't exist it's created automatically. 如果您將此方塊留白,預設值為 %SystemDrive%\ProgramData\Microsoft\Windows\Hyper-V。If you leave the box empty, the default is %SystemDrive%\ProgramData\Microsoft\Windows\Hyper-V. 最佳做法是新增的預設路徑不要與作業系統檔案位於相同磁碟機。As a best practice don't add default paths that are on the same drive as the operating system files.
    • 請勿針對叢集指定預設的虛擬機器路徑。For a cluster don't specify default virtual machine paths. VMM 會根據主機叢集可用的共用存放裝置,自動管理虛擬機器可用的路徑。VMM automatically manages the paths that are available for virtual machines, based on the shared storage that is available to the host cluster
  8. 在 [摘要] 頁面上確認設定,然後按一下 [完成] 。On the Summary page, confirm the settings, and then click Finish. [作業] 對話方塊會出現並顯示作業狀態。The Jobs dialog box appears to show the job status. 等候 [已完成] 狀態。Wait for a Completed status. 確認主機或叢集已新增至主機群組 > 主機或叢集名稱中。Verify that the host or cluster was added in the host group > host or cluster name. 狀態應為 [確定] 。The status should be OK.

設定 Hyper-V 主機的內容Configure properties for Hyper-V hosts

在 VMM 網狀架構中新增 Hyper-V 主機和伺服器之後,有許多您可以為獨立的主機和叢集設定的屬性。After you've added Hyper-V hosts and servers in the VMM fabric there are a number of properties you can configure for standalone hosts and clusters.

索引標籤Tab 設定Settings
一般General 檢視主機的識別和系統資訊。View identity and system information for the host. 這包含的資訊,如處理器資訊、總計和可用的記憶體和存放裝置、作業系統、Hypervisor 的類型,以及 VMM 代理程式版本。This includes information such as processor information, total and available memory and storage, the operating system, the type of hypervisor, and the VMM agent version.

輸入主機說明。Enter a host description.

設定主機是否可用於放置。Configure whether the host is available for placement.

設定遠端連線通訊埠。Configure the remote connection port. 根據預設,此通訊埠設為 2179。By default, the port is set to 2179.
硬體Hardware 檢視或修改 CPU、記憶體、圖形處理器 (GPU)、存放裝置 (包括存放裝置是否可用於放置)、網路介面卡、DVD/CD-ROM 光碟機的設定和基礎板管理控制器 (BMC) 設定。View or modify settings for CPU, memory, graphics processing units (GPUs), storage (including whether the storage is available for placement), network adapters, DVD/CD-ROM drives and Baseboard Management Controller (BMC) settings.
狀態Status 列出主機的健全狀況狀態資訊。Lists health status information for the host. 包括的範圍,如整體健全狀況、Hyper-V 角色健全狀況及 VMM 代理程式健全狀況。Includes areas such as overall health, Hyper-V role health and VMM agent health. 在 [狀態] 窗格中,您也可以執行下列作業:In the Status pane, you can also do the following:

檢視錯誤詳細資料。View error details.

重新整理健康狀態。Refresh the health status.

按一下 [全部修復] 。Click Repair all. VMM 將會嘗試自動修正任何錯誤。VMM will try to automatically fix any errors.
虛擬機器路徑/虛擬機器Virtual Machine Paths/Virtual Machines 顯示位於主機上的虛擬機器及狀態資訊。Shows the virtual machines that reside on the host, together with status information. 也可讓您在主機上登錄虛擬機器。Also enables you to register virtual machines on the host.
保留Reserves 可讓您覆寫父主機群組的主機保留設定,及設定此主機的保留資源。Enables you to override host reserve settings from the parent host group, and configure reserved resources for the host. 可設定的資源包括 CPU、記憶體、磁碟空間、磁碟 I/O 和網路容量。Configurable resources include CPU, memory, disk space, disk I/O and network capacity.
存放裝置Storage 顯示已配置給主機的存放裝置,並讓您新增和移除存放裝置邏輯單元或檔案共用。Shows storage allocated to a host, and enables you to add and remove storage logical units or file shares.
虛擬交換器Virtual Switches 可讓您設定虛擬交換器。Enables you to configure virtual switches.
放置路徑/放置Placement Paths/Placement 可讓您設定主機上放置虛擬機器期間,將會使用的預設虛擬機器路徑和預設父磁碟路徑。Enables you to configure the default virtual machine paths and default parent disk paths that will be used during virtual machine placement on the host.
服務視窗Servicing Windows 可讓您選取服務視窗。Enables you to select servicing windows.
自訂內容Custom Properties 可讓您指派與管理自訂內容。Enables you to assign and manage custom properties.

Hyper-V 叢集的內容Properties for Hyper-V clusters

索引標籤Tab 設定Settings
一般General 檢視名稱、主機群組和描述。View the name, host group and description. 您也可以設定 [叢集保留 (節點)],並檢視叢集保留狀態。You can also configure the Cluster reserve (nodes) setting, and view the cluster reserve state.

[叢集保留 (節點)] 設定可指定在仍可支援目前部署到主機叢集之所有虛擬機器的情況下,叢集必須可以承受的節點失敗數。The Cluster reserve (nodes) setting specifies the number of node failures a cluster must be able to sustain while still supporting all virtual machines deployed on the host cluster. 如果叢集無法在承受指定的節點失敗數的同時,仍然讓所有虛擬機器繼續執行,叢集就會變成「過度認可」狀態。If the cluster cannot withstand the specified number of node failures and still keep all of the virtual machines running, the cluster is placed in an over-committed state. 當「過度認可」時,叢集主機會在虛擬機器放置時收到零分級。When over-committed, the clustered hosts receive a zero rating during virtual machine placement. 系統管理員可以覆寫此分級,在手動放置期間,將高可用的虛擬機器放置於過度認可的叢集。An administrator can override the rating and place a highly-available virtual machine on an over-committed cluster during a manual placement.
狀態Status 檢視主機叢集的詳細狀態資訊:View detailed status information for the host cluster:

叢集驗證測試執行且成功。Cluster validation test runs and successes. 包括最新驗證報表 (如果有的話) 的連結。Includes a link to the latest validation report (if available). 請注意,存取報表必須具有報表所在叢集節點上的系統管理員權限。Note that accessing the report requires administrative permissions on the cluster node where the report is located. 如果是主機叢集,您可以透過 VMM 執行依需求叢集驗證。For host clusters, you can perform an on-demand cluster validation through VMM. 若要如此做,請在 [網狀架構] 工作區中找到主機叢集後並按一下。To do this, in the Fabric workspace, locate and click the host cluster. 然後,在 [主機叢集] 索引標籤上,按一下 [驗證叢集] 。Then, on the Host Cluster tab, click Validate Cluster. 叢集驗證隨即開始。Cluster validation begins immediately.

叢集中的線上元素︰叢集核心資源、仲裁中的磁碟見證,和每個節點上的叢集服務。Online elements in the cluster: cluster core resources, disk witness in quorum, and the cluster service on each node.
可用的存放裝置Available Storage 顯示可用的存放裝置,亦即指派到主機叢集但不是叢集共用磁碟區 (CSV) 的存放裝置邏輯單元。Shows available storage, that is, storage logical units that are assigned to the host cluster but are not Cluster Shared Volumes (CSV).

您也可以進行下列動作:You can also do the following:

新增與移除 VMM 管理的存放裝置邏輯單元。Add and remove storage logical units that are managed by [VMM.

將可用的存放裝置轉換到共用存放裝置 (CSV)。Convert available storage to shared storage (CSV).
共用磁碟區Shared Volumes 顯示主機叢集所配置的共用磁碟區 (CSV)。Shows the shared volumes (CSVs) that are allocated to the host cluster. 您也可以進行下列動作:You can also do the following:

新增與移除 VMM 管理的 CSV。Add and remove CSVs that are managed by VMM.

將 CSV 轉換成可用的 (非 CSV) 存放裝置。Convert CSVs to available (non-CSV) storage.
自訂內容Custom Properties 您管理的自訂內容。Custom properties that you manage.