從裸機電腦佈建 Hyper-V 主機或叢集Provision a Hyper-V host or cluster from bare metal computers

重要

已不再支援此版本的 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.

請參閱本文,以便在 System Center - Virtual Machine Manager (VMM) 網狀架構中,從不含任何安裝項目的裸機電腦佈建 Hyper-V 主機或叢集。Use this article to provision a Hyper-V host or cluster from bare metal computers with nothing installed on them, in the System Center - Virtual Machine Manager (VMM) fabric.

VMM 光纖除了可將現有的 Windows 伺服器新增為 Hyper-V 主機或叢集,還可以探索實體裸機電腦、自動安裝作業系統,並將它們佈建為 Hyper-V 伺服器主機與叢集。In addition to adding existing Windows servers to the fabric as Hyper-V hosts and clusters, VMM can discover physical bare-metal machines, automatically install an operating system, and provision them as Hyper-V server hosts and clusters.

以下是執行此動作的方法:Here's how you do this:

  1. 驗證必要條件:確認您已在開始之前備妥所有必要條件。Verify prerequisites-Make sure you have all the prerequisites before you start.
  2. 初始設定:在電腦上設定 BIOS 以支援虛擬化、將 BIOS 開機順序設為從支援開機前執行環境 (PXE) 的網路介面卡 (做為第一個裝置) 開機,以及對每部電腦上的 BMC 設定登入認證及 IP 位址設定。Initial configuration-Set up the BIOS on the machine to support virtualization, setting the BIOS boot order to boot from a Pre-Boot Execution Environment (PXE)-enabled network adapter as the first device, and configuring the logon credentials and IP address settings for the BMC on each computer. 您需要針對電腦名稱建立 DNS 項目和 Active Directory 帳戶,而且建議您預留 DNS 複寫發生的時間。You need to create DNS entries and Active Directory account for the machine names, and we recommend you allow time for DNS replication to occur.
  3. 準備 PXE 伺服器環境:將 PXE 伺服器新增至 VMM 管理中,如<必要條件︰在 VMM 中從裸機建立主機、主機叢集或向外延展檔案伺服器叢集>以及<如何將 PXE 伺服器新增至 VMM>中所述。Prepare the PXE server environment: Add the PXE server to VMM management, as described in Prerequisites: creating hosts, host clusters, or Scale-Out File Server clusters from bare metal in VMM and How to add a PXE server to VMM.
  4. 將資源新增至 VMM 程式庫:新增包括具有適當作業系統的一般化虛擬硬碟的資源 (如<必要條件︰在 VMM 中從裸機建立主機、主機叢集或向外延展檔案伺服器叢集>中所列),以用作基礎映像,以及在安裝期間新增至作業系統的選擇性驅動程式檔案。Add resources to VMM library: Add resources that include a generalized virtual hard disk with an appropriate operating system (as listed in Prerequisites: creating hosts, host clusters, or Scale-Out File Server clusters from bare metal in VMM) to use as the base image, and optional driver files to add to the operating system during installation.
  5. 建立設定檔:在程式庫中,建立一或多個實體電腦設定檔。Create profiles: In the library, create one or more physical computer profiles. 這些設定檔包括組態設定,如作業系統映像的位置,以及硬體和作業系統組態設定。These profiles include configuration settings, such as the location of the operating system image, and hardware and operating system configuration settings.
  6. 建立 Hyper-V 主機或叢集:根據您要設定獨立主機或叢集而定,您將會執行不同的精靈。Create Hyper-V host or cluster: You run different wizards depending on whether you want to set up a standalone host or cluster.

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

注意

VMM 不支援在斷續命名空間中裸機佈建實體機器。VMM doesn't support bare metal provisioning of physical Machines in disjoint namespace. 為因應上述情況,請遵循下列步驟:As a workaround, follow these steps:

  1. 在非斷續命名空間網域中佈建裸機。provision the bare metal in a non-disjoint namespace domain.
  2. 從 VMM 移除佈建的主機。remove the provisioned host from VMM.
  3. 在想要的斷續命名空間網域中加入主機。Join the host to the disjoint namespace domain of interest.
  4. 重新新增主機到 VMM。Add the host back to VMM. 請使用此程序Use this procedure.

請確認符合下列必要條件:Ensure the following prerequisites:

元件Component 必要條件Prerequisite 詳細資料Details
實體電腦Physical computer 支援探索Support for discovery 每台實體電腦必須安裝了啟用頻外管理的基礎板管理控制器 (BMC)。Each physical computer must have a baseboard management controller (BMC) installed that enables out-of-band management. 透過 BMC,您可以不受制於作業系統的方式遠端存取電腦,並控制系統功能 (如開啟或關閉電腦)。Through a BMC, you can access the computer remotely, independent of the operating system, and control system functions such as the ability to turn the computer off or on. BMC 需求:BMC requirements:

BMC 必須使用其中一種受支援的頻外管理通訊協定,並在 BMC 設定中啟用管理通訊協定功能。The BMCs must use one of the supported out-of-band management protocols, and the management protocol must be enabled in the BMC settings.

支援的通訊協定如下:智慧型平台管理介面 (IPMI) 1.5 或 2.0 版、資料中心管理介面 (DCMI) 1.0 版、System Management Architecture for Server Hardware (SMASH) 1.0 版 (透過 WS-Management (WS-Man)),以及 Integrated Lights-Out (iLO) 這類自訂通訊協定The supported protocols are: Intelligent Platform Management Interface (IPMI) versions 1.5 or 2.0; Data Center Management Interface (DCMI) version 1.0; System Management Architecture for Server Hardware (SMASH) version 1.0 over WS-Management (WS-Man); custom protocols such as Integrated Lights-Out (iLO)

BMC 必須使用 BMC 型號適用的最新版韌體。The BMCs should use the latest version of firmware for the BMC model.

BMC 必須使用登入認證進行設定,而且必須使用靜態 IP 位址或 DHCP。The BMCs must be configured with logon credentials and must use either static IP addressing or DHCP. 如果您使用 DHCP,建議您設定 DHCP 以指派固定 IP 位址給每個 BMC,例如藉由使用 DHCP 保留。If you use DHCP, we recommend that you configure DHCP to assign a constant IP address to each BMC, for example by using DHCP reservations.

VMM 管理伺服器必須可以存取設定 BMC 的網路區段。The VMM management server must be able to access the network segment on which the BMCs are configured.
實體電腦Physical computer Hyper-V 角色需求Hyper-V role requirements 電腦必須使用 x64 型處理器,並啟用適當的基本輸出入系統 (BIOS) 設定,才能支援 Hyper-V 角色。Computer that supports the Hyper-V role, must use x64-based processors and have the appropriate basic input/output system (BIOS) settings enabled.
實體電腦Physical computers DNSDNS 如果您的環境具有多部網域名稱系統 (DNS) 伺服器,其中 DNS 複寫可能會花一些時間,我們強烈建議您為指派給實體電腦的電腦名稱建立 DNS 項目,並允許提供時間讓 DNS 複寫發生。If your environment has multiple Domain Name System (DNS) servers, where DNS replication may take some time, we strongly recommend that you create DNS entries for the computer names that are assigned to the physical computers, and allow time for DNS replication to occur. 否則,電腦部署可能會失敗。Otherwise, deployment of the computers may fail.
實體電腦Physical computer BIOS/EFIBIOS/EFI 判斷電腦是使用可延伸韌體介面 (EFI) 或 BIOS。Determine whether the computers use Extensible Firmware Interface (EFI) or BIOS. 如果您擁有各種類型的電腦,就必須為各種類型建立個別的設定檔。If you have computers of each type, you must create a separate profile for each type.
實體電腦Physical computers 作業系統Operating system 您可以將 Windows Server 2016 節點新增至 Windows Server 2012 R2 叢集 (依據之前指定的需求而定);不過,您無法將 Windows Server 2012 R2 節點新增至 Windows Server 2016 叢集。You can add a Windows Server 2016 node to a Windows Server 2012 R2 cluster, subject to the requirements specified previously; however, you cannot add a Windows Server 2012 R2 node to a Windows Server 2016 cluster.
PXE 伺服器PXE server 部署需求Deployment requirements 您必須擁有一部透過 Windows 部署服務設定的 PXE 伺服器。You must have a PXE server configured with Windows Deployment Services.

如果您的環境中目前有透過 Windows 部署服務設定的 PXE 伺服器,您即可將該伺服器新增至 VMM。If you have an existing PXE server in your environment configured with Windows Deployment Services, you can add that server to VMM. 接著,您可以使用它,在 VMM 中進行佈建 (而 VMM 只會辨識產生的伺服器)。Then you can use it for provisioning in VMM (and VMM recognizes only the resulting servers). 所有其他的要求,都會依據 PXE 伺服器的設定方式,繼續由此伺服器來處理。All other requests continues to be handled by the PXE server according to how it is configured.

如果您沒有現有的 PXE 伺服器,可以在執行支援作業系統 (Windows Server 2012 R2 或更新版本) 的伺服器上部署 Windows 部署服務角色。If you don't have an existing PXE server, you can deploy the Windows Deployment Services role on a server running a supported operating system (Windows Server 2012 R2 or later).

在安裝 Windows 部署服務時,您必須安裝 [部署伺服器] 和 [傳輸伺服器] 選項。When you install Windows Deployment Services you should install both the Deployment server and Transport server options. 請注意,您不需要新增映像。Note that you don't need to add images. 在主機部署期間,VMM 會使用您已建立並存放在程式庫中的虛擬硬碟。During host deployment, VMM uses a virtual hard disk that you've created and stored in the library. 此外,您不需設定 [PXE 回應] 索引標籤上的設定。VMM 具有自己的 PXE 提供者。In addition you don't need to configure settings on the PXE response tab. VMM provides its own PXE provider.

PXE 伺服器必須位於與您要佈建的實體電腦相同的子網路中。The PXE server must be in the same subnet as the physical computers that you want to provision.

當您新增 PXE 伺服器時,必須為 PXE 伺服器上擁有本機系統管理員權限的帳戶指定認證資料。When you add a PXE server, you must specify account credentials for an account that has local administrator permissions on the PXE server. 您可以輸入使用者名稱和密碼,或指定執行身分帳戶。You can enter a user name and password or specify a Run As account. 如果您想要使用執行身分帳戶,可以在開始之前或部署期間建立執行身分帳戶。If you want to use a Run As account, you can create the RunAs account before you begin, or during deployment.
PXE 伺服器PXE server 開機順序Boot order 在每部電腦上,將 BIOS 開機順序設為從支援開機前執行環境 (PXE) 的網路介面卡 (作為第一個裝置) 開機。On each computer, set the BIOS boot order to boot from a Pre-Boot Execution Environment (PXE)-enabled network adapter as the first device.
虛擬硬碟Virtual hard disk 作業系統Operating system 請確認您已一般化 VMM 程式庫共用中的虛擬硬碟。Make sure you have a generalized virtual hard disk in a VMM library share. 它應該執行 Windows Server 2012 R2 或更新版本。It should be running Windows Server 2012 R2 or later.

針對實際執行伺服器,建議您使用固定磁碟 (.vhd 或 .vhdx 檔案格式) 來提高效能,並且協助保護使用者資料。We recommend that for production servers, you use a fixed disk (.vhd or .vhdx file format) to increase performance and to help protect user data. 請注意,根據預設,當您建立實體電腦設定檔時,VMM 會將動態磁碟轉換成固定磁碟。Note that by default, when you create a physical computer profile, VMM converts a dynamic disk to a fixed disk.

如果您打算指派自訂驅動程式,這些驅動程式必須已存在於程式庫中。If you plan to assign customer drivers they must exist in the library.

若要建立虛擬硬碟,您可以建立一部虛擬機器,安裝客體作業系統,然後搭配 /generalize 和 /oobe 選項使用 sysprep。To create the virtual hard disk, you can create a virtual machine, install the guest operating system, and then use sysprep with the /generalize and the /oobe options.

您部署在主機或叢集中的虛擬硬碟,其作業系統必須支援從虛擬硬碟 (VHD) 選項開機。The operating system on the virtual hard disk that you deploy on hosts or clusters must support the boot from virtual hard disk (VHD) option.

如果您使用遠端桌面服務 (RDS) 來管理伺服器,建議您在映像中啟用 RDS 連線。If you use Remote Desktop Services (RDS) to manage servers, we recommend that you enable the RDS connections in the image. 您也可以使用實體電腦設定檔中的回應檔案來啟用 RDS。You can also enable RDS by using an answer file in the physical computer profile.
網路功能Networking 邏輯網路Logical networks 如果您已經在 VMM 中設定邏輯網路或邏輯交換器,即可在實體電腦設定檔中納入這些設定。If you have already configured logical networks or logical switches in VMM, you can include those configurations in a physical computer profile.

若要在實體電腦設定檔中納入邏輯交換器以套用至實體 NIC (針對主機或主機叢集),您必須先採取特定步驟。To include a logical switch that you want to apply to physical NICs in a physical computer profile (for hosts or host clusters), you must first take certain steps. 請確定您已在主機電腦上安裝所需數目的 NIC。Make sure that you have installed the intended number of NICs on the host computer or computers. 此外,在 VMM 中建立實體電腦設定檔之前,請先建立邏輯交換器。In addition, before you create the physical computer profile in VMM, create the logical switch.

若要在實體電腦設定檔中納入靜態 IP 位址 (透過邏輯網路來控制),請設定邏輯網路。To include static IP addressing controlled through a logical network in a physical computer profile configure the logical network. 邏輯網路必須包含至少一個網站和靜態 IP 位址集區。The logical network must include at least one network site and static IP address pool. 由於您要將從裸機建立的主機指派給主機群組或父主機群組,因此這個網站也必須可供上述群組使用。The network site must also be available to the host group or to a parent host group where you want to assign the hosts that you are creating from bare metal.

若要在實體電腦設定檔中納入主機的虛擬 NIC (針對主機或主機叢集),您必須先採取特定步驟。To include a virtual NIC for hosts in a physical computer profile (for hosts or host clusters), you must first take certain steps. 請確定您已在要作為主機的電腦上安裝所需數目的實體 NIC。Make sure that you have installed the intended number of physical NICs on the computer or computers that are to become hosts. 此外,請在 VMM 管理伺服器上,安裝所有必要的虛擬交換器擴充功能和擴充功能提供者,並至少建立一個 VM 網路,然後建立邏輯交換器。In addition, on the VMM management server, install all necessary virtual switch extensions and extension providers, create at least one VM network, and create a logical switch. 在邏輯交換器中,最佳做法是針對虛擬通訊埠納入一或多個通訊埠分類。In the logical switch, as a best practice, include one or more port classifications for the virtual ports.
實體電腦設定檔Physical computer profile 回應檔案Answer file 若要讓實體電腦設定檔包含回應檔案 (Unattend.xml 檔案) 或自訂資源 (例如您要在部署後指令碼命令中參考的應用程式安裝程式) 的參照,請在部署之前建立回應檔案或取得自訂的資源,並將它們新增至 VMM 程式庫共用。If you want a physical computer profile to include references to an answer file (Unattend.xml file) or to custom resources (for example, an application installer that is referenced in post-deployment script commands), create the answer file or obtain the custom resources before deployment, and add them to a VMM library share. 在程式庫共用內,將自訂資源放在一或多個副檔名為 .CR (自訂資源) 的資料夾中。Within a library share, place custom resources in one or more folders with a .CR (custom resource) extension. VMM 會將其辨識為自訂資源。VMM recognizes them as custom resources. 例如,您可能想要建立回應檔案來啟用遠端桌面服務,並將它放在程式庫共用中。For example, you might want to create an answer file to enable Remote Desktop Services and place it on a library share. 然後,當您設定實體電腦設定檔時,即可選取該檔案。Then you can select that file when you configure a physical computer profile.

當您從裸機部署伺服器或叢集時,VMM 預設會自動執行下列動作 (不需任何回應檔案或部署後命令):安裝 Hyper-V 主機的 Hyper-V 角色。By default when you deploy servers or clusters from bare metal, VMM automatically performs the following (no answer file or post-deployment commands needed): Installs the Hyper-V role for Hyper-V hosts. 安裝 Hyper-V 叢集的 Hyper-V 角色、容錯移轉叢集功能和多重路徑 I/O (MPIO)。Installs the Hyper-V role, failover cluster feature, and multipath I/O (MPIO) for Hyper-V clusters.
帳戶Accounts 您需要兩個執行身分帳戶。You need two Run As accounts.

一個執行身分帳戶用來將電腦加入網域。A Run As account for joining computers to the domain. 您可以在 [設定] 工作區中建立執行身分帳戶。You can create a Run As account in the Settings workspace.

另一個執行身分帳戶用來存取每一部電腦上的基礎板管理控制器 (BMC)。A Run As account for access to the baseboard management controller (BMC) on each computer.

將 PXE 伺服器新增至 VMM 光纖Add a PXE server to the VMM fabric

  1. 按一下 [光纖] > [伺服器] > [新增] > [新增資源] > [PXE 伺服器] 。Click Fabric > Servers > Add > Add Resources > PXE Server.
  2. 在 [電腦名稱] 中,指定 PXE 伺服器的名稱。In Computer name specify the PXE server name.
  3. 新增具有 PXE 伺服器本機系統管理員權限之帳戶的認證。Add the credentials for an account that has local administrator permissions on the PXE server. 您可以指定現有的執行身分帳戶 (或者按一下 [建立執行身分帳戶] 新建一個),以手動方式輸入使用者認證,格式為 domain_name\user_name。You can specify an existing Run As account (or click Create Run As Account to create a new one), manually enter user credentials in the format domain_name\user_name. 按一下 [加入] 。Click Add.
  4. 在 [作業] 中,確認作業狀態為 [已完成],然後關閉對話方塊。In Jobs verify that the job status is Completed and close the dialog box. 此作業會設定新的 PXE 伺服器、在 PXE 伺服器上安裝 VMM 代理程式、匯入新的 Windows 預先安裝環境 (Windows PE) 映像,並將 PXE 伺服器的機器帳戶新增至 VMM。The job sets up the new PXE server, installs the VMM agent on the PXE server, imports a new Windows Preinstallation Environment (Windows PE) image, and adds the machine account for the PXE server to VMM.
  5. 在 [光纖] > [伺服器] > [PXE 伺服器] > [首頁] > [顯示] > [光纖資源] > [PXE 伺服器] 中,確認已新增 PXE 伺服器。Verify that the PXE server is added in Fabric > Servers > PXE Servers > Home > Show > Fabric Resources > PXE Servers. 代理程式狀態應為 [回應中] 。The agent status should be Responding.

新增並指派驅動程式檔案Add and assign driver files

如果您打算指派自訂驅動程式,程式庫中必須有驅動程式檔案。If you plan to assign custom drivers, the driver files must exist in the library. 您可以在資源庫中標記驅動程式,讓您稍後可以依標籤篩選它們。You can tag the drivers in the library, so that you can later filter them by tag. 新增檔案之後,當您設定實體電腦設定檔時,就可以指定驅動程式檔案。After files are added, when you configure a physical computer profile, you can specify the driver files. 當 VMM 在實體電腦上安裝作業系統時,即會安裝指定的驅動程式。VMM installs the specified drivers when it installs the operating system on a physical computer.

在實體電腦設定檔中,您可以選擇依標籤篩選驅動程式,或是選擇以實體電腦上相符的隨插即用 (PnP) 識別碼來篩選驅動程式。In the physical computer profile, you can select to filter the drivers by tags, or you can select to filter drivers with matching Plug and Play (PnP) IDs on the physical computer. 若您選擇依標籤篩選驅動程式,VMM 會比對您指派給資源庫中驅動程式的標籤以及您在設定檔中指派的標籤,以決定要套用的驅動程式。If you select to filter the drivers by tags, VMM determines the drivers to apply by matching the tags that you assign to the drivers in the library to the tags that you assign in the profile. 如果您選取使用相符的 PnP 識別碼篩選驅動程式,就不需要指派自訂標籤。If you select to filter drivers with matching PnP IDs, you don't need to assign custom tags.

  1. 找出您要新增至程式庫的驅動程式套件。Locate a driver package that you want to add to the library.
  2. 在位於程式庫伺服器 (其與您要部署實體電腦的群組關聯) 上的程式庫共用中,建立一個儲存伺服器的資料夾,然後將驅動程式套件複製至該資料夾。In the library share that is located on the library server that is associated with the group where you want to deploy the physical computers, create a folder to store the drivers, and then copy the driver package to the folder.
  3. 強烈建議您為每個驅動程式套件建立不同的資料夾,如此您才不會將驅動程式資料夾中的資源混在一起。We strongly recommend that you create a separate folder for each driver package, and that you do not mix resources in the driver folders. 若您將其他資源庫資源 (例如 .iso 映像檔、.vhd 檔案或以 .inf 為副檔名的指令碼) 內含於相同的資料夾中,則 VMM 資源庫伺服器就不會發現這些資源。If you include other library resources such as .iso images, .vhd files or scripts with an .inf file name extension in the same folder, the VMM library server is unable to discover the resources. 此外,當您刪除資源庫中的 .inf 驅動程式套件時,VMM 會刪除驅動程式 .inf 檔案所在的整個資料夾。Also, when you delete an .inf driver package from the library, VMM deletes the entire folder where the driver .inf file resides.
  4. 在 VMM 主控台中,開啟 [資源庫] 工作區。In the VMM console, open the Library workspace. 在 [資源庫] > [資源庫伺服器] 中,展開共用所在的資源庫伺服器、以滑鼠右鍵按一下該共用,然後按一下 [重新整理] 。In the Library > Library Servers, expand the library server where the share is located, right-click the share, and then click Refresh. 於程式庫重新整理後,您先前建立用來儲存驅動程式的資料夾隨即顯示。After the library refreshes, the folder that you created to store the drivers appears.
  5. 現在,請視需要指派標籤。Now assign tags if required. 在 [資源庫] 中,展開您在前一步驟中建立來儲存驅動程式的資料夾,然後按一下包含該驅動程式套件的資料夾。In Library, expand the folder that you created to store the drivers in the previous procedure, and then click the folder that contains the driver package.
  6. 在 [實體資源庫物件] 中,以滑鼠右鍵按一下 .inf 驅動程式檔案,然後按一下 [內容] 。In the Physical Library Objects, right-click the driver .inf file, and then click Properties.
  7. 在 [驅動程式檔案名稱內容] > [自訂標籤] 中,輸入以分號分隔的自訂標籤,或按一下 [選取] 來指派可用的標籤,或者建立並指派新的標籤。In the Driver File Name Properties > Custom tags, enter custom tags separated by a semi-colon, or click Select to assign available tags or to create and assign new ones. 如果您按一下 [選取] 然後按一下 [新標籤] ,即可在您按下 [確定] 後改變標籤名稱。If you click Select, and then click New Tag, you can change the name of the tag after you click OK. 例如,若您新增了一個網路介面卡驅動程式檔案,您可建立一個名為 ServerModel NetworkAdapterModel 的標籤,其中 ServerModel 是伺服器型號,而 NetworkAdapterModel 則是網路介面卡型號。For example, if you added a network adapter driver file, you could create a tag that is named ServerModel NetworkAdapterModel, where ServerModel is the server model and NetworkAdapterModel is the network adapter model.

建立實體電腦設定檔Create a physical computer profile

  1. 按一下 [程式庫] > [首頁] > [建立] > [實體電腦設定檔] 。Click Library > Home > Create > Physical Computer Profile.
  2. 「Physical Computer Profiles Wizard」 (新增實體電腦設定檔精靈) > [設定檔描述] 中,輸入名稱和描述,然後選取 [VM 主機]In the New Physical Computer Profiles Wizard > Profile Description, type in a name and description and select VM host.
  3. 在 [作業系統映像] > [虛擬硬碟檔案] > [瀏覽] 中,按一下已新增到程式庫共用的一般化虛擬硬碟檔案。In OS Image > Virtual hard disk file > Browse, click the generalized virtual hard disk that you added to the library share. 如果是動態磁碟,VMM 預設會在主機部署期間將它轉換成固定磁碟。By default, if the disk is dynamic VMM converts it to a fixed disk during host deployment. 針對實際執行的伺服器,建議您使用固定磁碟來增強效能,並協助保護使用者資料。We recommend that for production servers you use a fixed disk to increase performance and help protect user data.
  4. 在 [硬體設定] > [管理 NIC] 中,選取您要用來與 VMM 進行通訊的網路介面卡,以及是否要使用 DHCP 或靜態位址。In Hardware Configuration > Management NIC select the network adapter used to communicate with VMM and whether to use DHCP or a static address. 如果您想要使用介面卡的一致裝置命名 (CDN),或設定邏輯交換器與通訊埠,請按一下 [實體內容] 。If you want to use Consistent Device Naming (CDN) for the adapter or configure logical switches and ports click Physical Properties. 按一下 [新增] ,以新增介面卡。Click Add to add the adapter.
  5. 在 [磁碟] 中,指定第一個磁碟的分割配置。In Disk, specify the partitioning scheme for the first disk. 如果實體電腦設定檔是 EFI,您可以使用 GPT。You can use GPT if the physical computer profile is EFI. 在 [分割區資訊] 中,選取磁碟區標籤、要使用所有剩餘可用空間或特定的大小,以及是否要將分割區指定為開機磁碟分割。In Partition Information, select the volume label, whether to use all remaining free space or a specific size, and whether to designate the partition as the boot partition. 您也可以新增新的磁碟或分割區。You can also add a new disk or partition. 進行部署時,VMM 會將虛擬硬碟檔案複製到開機分割區,並在同一個磁碟上自動建立一個系統分割區。During deployment VMM copies the virtual hard disk file to the boot partition and automatically create a system partition on the same disk.
  6. 在 [驅動程式篩選器] 中,您可以篩選在部署主機時要套用至作業系統的驅動程式檔案。In Driver filter, filter the driver filters to be applied to the operating system during host deployment. 您可以依隨插即用識別碼或特定標籤進行篩選。You can filter by Plug and Play ID or by specific tags. 如果您選取使用相符標籤來篩選驅動程式,請確定已將驅動程式檔案新增至程式庫,並指派了對應的標籤。If you select to filter drivers with matching tags make sure you've added driver files to the library and assigned corresponding tags.
  7. 在 [作業系統組態] 中,指定 Hyper-V 主機或叢集應加入的網域,並指定本機系統管理認證和識別資訊。In OS Configuration specify the domain that the Hyper-V host or cluster should join, specify local admin credentials and identity information. 新增產品金鑰以進行安裝,並設定時區。Add the product key for installation, and set the time zone. 在 GUIRunOnce 中,指定當使用者第一次登入 Hyper-V 主機時執行的一或多個命令。In GUIRunOnce, specify one or more commands to run when the user logs on to the Hyper-V host for the first time.
  8. 在 [主機設定] 中,指定主機用來存放與虛擬機器 (放置於該主機中) 相關聯之檔案的路徑。In Host Settings specify the path of the host to store the files that are associated with virtual machines placed on the host. 請勿指定磁碟機 C,因為它無法用於放置。Don't specify drive C because it's not available for placement. 如果不指定路徑,VMM 放置就會決定最適合的位置。If you don't specify a path, VMM placement determines the most suitable location.
  9. 驗證 [摘要] 中的設定。In Summary verify the settings. 等待作業顯示為已完成狀態,並驗證 [程式庫] > [設定檔] > [實體電腦設定檔] 中的設定檔。Wait until Jobs shows a status of completed, and then verify the profile in Library > Profiles > Physical Computer Profiles.

PCP 部署後設定PCP post deployment settings

成功建立及部署 PCP 之後,可使用 PCP 部署後指令碼來設定其他設定,例如 RDMA、QoS 及設定。After you successfully create and deploy the PCP, you can configure additional settings such as RDMA, QoS, and SET using the PCP post deployment script.

指令碼範例Sample script

以下為設定 RDMA、SET 與 QoS 的指令碼範例。Here is the sample script to configure RDMA, SET and QoS.

# Install data center bridging
Install-WindowsFeature Data-Center-Bridging

#Enable RDMA, assuming customer chosen switch name for storage as Storage1Switch and Storage2Switch
Enable-NetAdapterRDMA "Storage1Switch"
Enable-NetAdapterRDMA "Storage2Switch"

# set Qos Policy
New-NetQosPolicy "SMB" -NetDirectPortMatchCondition 445 -PriorityValue8021Action 3

# Enable net qos flow control
Enable-NetQosFlowControl  -Priority 3

# Disable net qos flow control other than 3
Disable-NetQosFlowControl  -Priority 0,1,2,4,5,6,7

# Enable net adapter qos on all adapters
Enable-NetAdapterQos  -InterfaceAlias "*"

# set qos traffic class
New-NetQosTrafficClass "SMB"  -Priority 3  -BandwidthPercentage 50  -Algorithm ETS

# Install windows feature
Install-WindowsFeature –Name Hyper-V

Install-WindowsFeature –Name RSAT-Hyper-V-Tools

# set net adapter property "encapsulated overhead"
NetAdapterAdvancedProperty -Name "*" -DisplayName "Encapsulated Overhead" -DisplayValue "160"

#disable ipv6
netsh int ipv6 isatap set state disabled

#Configure SET team mapping between virtual network adapter to physical network adapters. (Note: to get names of adapters, use command Get-NetAdapater. For team mapping use command
$physicalAdapters = Get-NetAdapter -Physical
$virtualStorageAdapter1 = Get-VMNetworkAdapter -ManagementOS | Where-Object {$_.Name -eq "Storage1Switch"}
$virtualStorageAdapter1 = Get-VMNetworkAdapter -ManagementOS | Where-Object {$_.Name -eq "Storage2Switch"}

Set-VMNetworkAdapterTeamMapping -ManagementOS -PhysicalNetAdapterName $physicalAdapters[0].Name -VMNetworkAdapterName $virtualStorageAdapter1.Name
Set-VMNetworkAdapterTeamMapping -ManagementOS -PhysicalNetAdapterName $physicalAdapters[1].Name -VMNetworkAdapterName $virtualStorageAdapter2.Name

#Set firewall rules.
[System.String[]]$Alias=@("vEthernet (WssdStorage2)", "vEthernet WssdStorage1)");
$Profile ='Any'
$Name="File and Printer Sharing"
$rules = Get-NetFirewallRule -DisplayGroup $Name

foreach ($rule in $rules)
     {
         $rule | Get-NetFirewallAddressFilter | Set-NetFirewallAddressFilter -  
         LocalAddress Any -RemoteAddress Any
     }

 Set-NetFirewallRule -DisplayGroup $Name -Enabled True -Profile $Profile – InterfaceAlias $Alias
 $Profile='Any'
 $Name=='FPS-LLMNR-In-UDP'
 Set-NetFirewallRule -Name $Name -Enabled True -Profile $Profile
 [System.String[]]$Alias=@("Storage2Switch", "Storage1Switch", "ManagementSwitch");
 $Profile ='Any'
 $Name="Windows Remote Management"
 Set-NetFirewallRule -DisplayGroup $Name -Enabled True -Profile $Profile –InterfaceAlias $Alias

 #Set assurance settings
 reg add HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard /v EnableVirtualizationBasedSecurity /t REG_DWORD /d 1 /f
 reg add HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard /v RequirePlatformSecurityFeatures /t REG_DWORD /d 2 /f
 reg add HKLM\SYSTEM\CurrentControlSet\Control\LSA /v LsaCfgFlags /t REG_DWORD /d 1 /f
 reg add HKLM\SYSTEM\CurrentControlSet\Control\LSA /v DisableRestrictedAdmin /t REG_DWORD /d 0 /f

從裸機佈建 Hyper-V 主機Provision a Hyper-V host from bare metal

當您從裸機部署 Hyper-V 主機時,VMM 會進行下列作業:When you deploy a Hyper-V host from bare metal, VMM does the following:

  1. 透過頻外管理來探索實體電腦。Discovers the physical computer through out-of-band management.
  2. 透過實體電腦設定檔,在電腦上部署作業系統映像。Deploys an operating system image on the computer through the physical computer profile.
  3. 在電腦上啟用 Hyper-V 角色。Enables the Hyper-V role on the computer.
  4. 讓電腦受 VMM 的管理,使其成為受管理的 Hyper-V 主機。Brings the computer under VMM management as a managed Hyper-V host.

請以下列方式進行佈建︰Provision as follows:

  1. 按一下 [光纖] > [伺服器] > [首頁] > [新增] > [新增資源] > [Hyper-V 主機和叢集] 。Click Fabric > Servers > Home > Add > Add Resources > Hyper-V Hosts and Clusters.
  2. [新增資源精靈] > [資源位置] 中,選取 「Physical computers to be provisioned as virtual machine hosts」 (要佈建為虛擬機器主機的實體電腦)。In the Add Resource Wizard > Resource location, select Physical computers to be provisioned as virtual machine hosts.
  3. 在 [認證和通訊協定] 中,選取具有 BMC 存取權限的執行身分帳戶。In Credentials and Protocol select the Run As account with permissions to access the BMC. 在 [通訊協定] 清單中,按一下 BMC 所使用的頻外管理通訊協定。In the Protocol list, click the out-of-band management protocol that your BMCs use. 如果您想要使用資料中心管理介面 (DCMI),請按一下 [智慧平台管理介面 (IPMI)]。If you want to use Data Center Management Interface (DCMI), click Intelligent Platform Management Interface (IPMI). 雖然沒有列出 DCMI 1.0,但也同樣支援。Although DCMI 1.0 is not listed, it is supported. 請務必選取正確的通訊埠。Make sure the correct port is selected.
  4. 在 [探索範圍] 中,指定包含 BMC 之 IP 位址的 IP 位址範圍。In Discovery Scope, specify the IP address scope that includes the IP addresses of the BMCs. 您可以輸入一個單一 IP 位址、IP 子網路或 IP 位址範圍。You can enter a single IP address, an IP subnet, or an IP address range.
    • 如果您要佈建單一電腦,可以指定單一 IP 位址,或指定開始和結束都是所要使用之 IP 位址的 IP 位址範圍。If you are provisioning a single computer, you can either specify a single IP address, or specify an IP address range that both starts and ends with the intended IP address. 如果您指定單一 IP 位址,當您按一下 [下一步] 時,就會重新啟動電腦。If you specify a single IP address, when you click Next, the computer is restarted.
    • 如果您指定 IP 位址範圍,當您按一下 [下一步] 時,就會顯示電腦的相關資訊,您可以確認已指定所需的電腦。If you specify an IP address range, when you click Next, information about the computer is displayed, and you can confirm that you specified the computer that you meant to.
  5. 如果您在上一頁指定單一 IP 位址,請跳過此步驟。If you specified a single IP address on the previous page, skip this step. 否則,會出現 [目標資源] 頁面。Otherwise, the Target Resources page appears. 檢閱探索到的 BMC 清單 (依 IP 位址識別),並選取您想要佈建為主機的項目。Review the list of discovered BMCs (identified by IP addresses), and select the ones you want to provision as hosts. 如果您未看見預期的所有 BMC,請確認它們位於可存取 VMM 伺服器的網路上,並視需要按一下 [重新整理] 。If you don't see all the BMCs that you expect, confirm that they are on a network accessible to the VMM server, and as needed, click Refresh.
  6. 在 [佈建選項] 中,按一下新 Hyper-V 主機的主機群組。In Provisioning Options, click a host group for new Hyper-V hosts. 選取您想要套用的實體電腦設定檔。Select the physical computer profile you want to apply.
  7. 在 [部署自訂] 中,再次檢閱電腦清單,並提供您想要包含之每一部電腦的相關資訊。In Deployment Customization, review the list of computers again, and provide information for each computer that you want to include.
    • 如果其中有您不想包含的電腦,請選取該 BMC (依 IP 位址識別),然後按一下 [移除] 。If you see a computer that you don't want to include, select the BMC (identified by IP address) and then click Remove.
    • 若要設定電腦,請按一下 BMC IP 位址。To configure computers click the BMC IP address.
    • 指定不含萬用字元的唯一電腦名稱。Specify a unique computer name, without wildcard characters.
    • 選取或清除 「Skip Active Directory for this computer name」 (跳過此電腦名稱的 Active Directory)。Select or clear Skip Active Directory for this computer name. 如果電腦帳戶已經存在,Active Directory 檢查即會阻止部署。The Active Directory check prevents deployment if the computer account already exists. 這有助於避免部署與現有電腦同名的電腦。This helps prevent deploying a computer with the same name as an existing computer. 請注意,如果您跳過 Active Directory 檢查,但 AD DS 中現有的電腦帳戶不是實體電腦設定檔中指定的執行身分帳戶,則部署程序將無法讓電腦加入網域。Note that if you skip the Active Directory check, and there is an existing computer account in AD DS other than the Run As account that was specified in the physical computer profile, the deployment process fails to join the computer to the domain.
  8. 針對您設定的電腦,按一下網路介面卡 (左側)。For the computer you are configuring, click a network adapter (on the left). 您可以修改組態,或填寫詳細資訊 (...)。You can modify the configuration, or fill in more information (...).
  9. 您可以指定管理 NIC (而非 BMC) 的 MAC 位址,以及此網路介面卡的靜態 IP 設定。You can specify the MAC address of the management NIC (not the BMC) and static IP settings for this network adapter. 如果您指定位址,請選取邏輯網路和 IP 子網路 (若適用的話)。If you specify an address select a logical network and an IP subnet if applicable. 如果選取的 IP 子網路包含 IP 位址集區,則可勾選 [取得與所選子網路對應的 IP 位址] 。If the selected IP subnet includes IP address pool, you can check Obtain an IP address corresponding to the selected subnet. 否則,請輸入位於邏輯網路或其子網路內的 IP 位址。Otherwise, type an IP address that's within the logical network or its subnet. 如果您選取 IP 子網路,則需確定其會對應至您部署主機的實體位置和介面卡連線的網路。If you select an IP subnet, make sure that it corresponds to the physical location where you are deploying the host and to the network that the adapter is connected to. 否則,部署可能會失敗。Otherwise, deployment may fail.
  10. 針對每張網路介面卡,進行介面卡設定。Configure the adapter settings for each network adapter. 請注意,如果電腦中的實體網路介面卡數目,與實體電腦設定檔中定義的實體網路介面卡數目不符,您就必須指定介面卡缺漏的任何資訊。Note that if the number of physical network adapters in a computer does not match the number of physical network adapters that are defined in the physical computer profile, you must specify any information that is missing for the adapters. 如果您決定不要現在佈建此電腦 (例如,在需要安裝或解除安裝實體硬體的情況下),可以從清單中選取電腦的 BMC IP 位址,然後按一下 [移除] 。If you decide not to provision this computer right now (for example, if physical hardware needs to be installed or uninstalled), you can select the computer's BMC IP address from the list and then click Remove.
  11. 針對清單中的每個 BMC IP 位址重複進行設定。Repeat the configuration for each BMC IP address in the list. 當您填妥要佈建之所有電腦的資訊之後,請按一下 [下一步] 。When you have filled in information for all the computers you want to provision, click Next.
  12. 確認 [摘要] 中的設定,然後按一下 [完成] 以部署新的 Hyper-V 主機,並讓這些主機接受 VMM 的管理。In Summary, confirm the settings, and then click Finish to deploy the new Hyper-V hosts and bring them under VMM management. 視您的設定而定,[作業] 對話方塊可能會出現。Depending on your settings, the Jobs dialog box might appear. 請確定作業中所有步驟的狀態皆為 [已完成] ,然後關閉對話方塊。Make sure that all steps in the job have a status of Completed, and then close the dialog box.
  13. 若要確認已新增主機,請按一下 [光纖] > [伺服器] > [所有主機] > 主機群組,並確認新 Hyper-V 主機出現在群組中。To confirm that the host was added click Fabric > Servers > All Hosts > host group, and verify that the new Hyper-V host appears in the group.

從裸機佈建 Hyper-V 叢集Provision a Hyper-V cluster from bare metal

當您從裸機佈建 Hyper-V 叢集時,系統會執行下列作業:When you deploy a Hyper-V cluster from bare metal VMM does the following:

  1. 透過頻外管理探索實體電腦。Discovers the physical computers through out-of-band management.
  2. 使用實體電腦設定檔在電腦上部署作業系統映像。Deploys an operating system image on the computers by using the selected physical computer profile.
  3. 安裝容錯移轉叢集功能,以及 Hyper-V 角色和 MPIO 功能。Installs the failover clustering feature, and the Hyper-V role and MPIO feature.
  4. 將佈建的叢集納入 VMM 管理Brings the provisioned cluster under VMM management

請以下列方式進行佈建︰Provision as follows:

  1. 按一下 [光纖] > [伺服器] > [新增] > [新增資源] > [Hyper-V 主機和叢集] 。Click Fabric > Servers > Add > Add Resources > Hyper-V Hosts and Clusters.
  2. 在 [一般設定] 中,指定主機叢集的名稱。In General Configuration, specify a name for the host cluster. 如有必要,請選擇儲存體設定︰Choose a storage configuration if required:
    • 若是共用存放裝置,請按一下 「Storage connected to the cluster using shared SAS, FC, or iSCSI」 (使用共用 SAS、FC 或 iSCSI,將存放裝置連接到叢集)。For shared storage, click Storage connected to the cluster using shared SAS, FC, or iSCSI.
    • 若是儲存空間直接存取,請按一下 「Disk subsystem directly connected to individual nodes in the cluster」 (磁碟子系統直接連接到叢集中的個別節點)。For Storage Spaces Direct, click Disk subsystem directly connected to individual nodes in the cluster.
  3. [資源類型] 中 > 選取 「Physical computers to be provisioned」 (要佈建的實體電腦):In Resource Type > select Physical computers to be provisioned:
    • 指定建立叢集所使用的系統管理員執行身分帳戶。Specify the administrator Run As account to use for creating the cluster.
    • 選取實體電腦設定檔 (提供每個節點的網域名稱和系統管理員執行身分帳戶)。Select the physical computer profile (which provides the domain name and administrator Run As account for each node).
    • 按一下 [BMC 執行身分帳戶] 方塊旁的 [瀏覽] ,然後選取具備 BMC 存取權限的執行身分帳戶。Next to the BMC Run As account box, click Browse, and select a Run As account that has permissions to access the BMC.
    • 在 [頻外管理] 通訊協定清單中,按一下 BMC 所使用的通訊協定。In the Out-of-band management protocol list, click the protocol that your BMCs use. 如果您想要使用資料中心管理介面 (DCMI),請按一下 [智慧平台管理介面 (IPMI)]。If you want to use Data Center Management Interface (DCMI), click Intelligent Platform Management Interface (IPMI). 雖然沒有列出 DCMI 1.0,但也同樣支援。Although DCMI 1.0 is not listed, it is supported. 確認已選取正確的通訊埠。Ensure that the correct port is selected.
    • 如果顯示 [跳過叢集驗證] 選項,且您不需要此叢集的 Microsoft 支援,則可以跳過驗證。If the Skip cluster validation option appears, and you don't need support from Microsoft for this cluster, you can skip validation.
  4. 在 [探索範圍] 中,指定包含 BMC 之 IP 位址的 IP 位址範圍。In Discovery Scope, specify the IP address scope that includes the IP addresses of the BMCs. 您可以輸入一個單一 IP 位址、IP 子網路或 IP 位址範圍。You can enter a single IP address, an IP subnet, or an IP address range. 深層探索功能可提供電腦的詳細資訊 (例如,網路介面卡的 MAC 位址),但會重新啟動電腦,且需要額外的時間。Deep discovery provides detailed information about a computer (for example, MAC addresses of network adapters) but restarts the computer, and requires additional time. 您可以允許或跳過深層探索。You can allow or skip deep discovery.
  5. 如果您在上一頁指定單一 IP 位址,請跳過此步驟。If you specified a single IP address on the previous page, skip this step. 否則,會出現 [目標資源] 頁面。Otherwise, the Target Resources page appears. 檢閱探索到的 BMC 清單 (依 IP 位址識別),並選取您想要包含在叢集中的項目。Review the list of discovered BMCs (identified by IP addresses), and select the ones you want to include in the cluster.
  6. 如果您未看見預期的所有 BMC,請確認它們位於可存取 VMM 伺服器的網路上,並視需要按一下 [重新整理] 。If you don't see all the BMCs that you expect, confirm that they are on a network accessible to the VMM server, and as needed, click Refresh. 允許或跳過深層探索。Allow or skip deep discovery. 深層探索功能可提供電腦的詳細資訊 (例如,網路介面卡的 MAC 位址),但會重新啟動電腦,且需要額外的時間。Deep discovery provides detailed information about a computer (for example, MAC addresses of network adapters) but restarts the computer, and requires additional time. 然後按一下 [下一步] 。Then click Next.
  7. 在 [部署自訂] 中,提供您想要包含之每一部電腦的相關資訊。In Deployment Customization provide information for each computer that you want to include. 如果其中有您不想包含的電腦,請選取該 BMC (依 IP 位址識別),然後按一下 [移除] 。If you see a computer that you don't want to include, select the BMC (identified by IP address) and then click Remove.
    • 若要設定電腦,請按一下 BMC IP 位址。To configure computers click the BMC IP address. 指定不含萬用字元的唯一電腦名稱。Specify a unique computer name, without wildcard characters.
    • 選取或清除 「Skip Active Directory for this computer name」 (跳過此電腦名稱的 Active Directory)。Select or clear Skip Active Directory for this computer name. 如果電腦帳戶已經存在,Active Directory 檢查即會阻止部署。The Active Directory check prevents deployment if the computer account already exists. 請注意,如果您跳過檢查,但 AD 中現有的電腦帳戶不是實體電腦設定檔中指定的執行身分帳戶,則部署程序將無法讓電腦加入網域。Note that if you skip the check and there's an existing computer account in AD other than the Run As account that was specified in the physical computer profile, the deployment process fails to join the computer to the domain.
    • 針對您設定的電腦,按一下網路介面卡。For the computer you are configuring, click a network adapter. 您可以修改組態,或填寫詳細資訊。You can modify the configuration, or fill in more information.
    • 您可以指定管理 NIC (而非 BMC) 的 MAC 位址,以及此網路介面卡的靜態 IP 設定。You can specify the MAC address of the management NIC (not the BMC) and static IP settings for this network adapter. 如果您指定位址,請選取邏輯網路和 IP 子網路 (若適用的話)。If you specify an address select a logical network and an IP subnet if applicable. 如果選取的 IP 子網路包含 IP 位址集區,則可勾選 [取得與所選子網路對應的 IP 位址] 。If the selected IP subnet includes IP address pool, you can check Obtain an IP address corresponding to the selected subnet. 否則,就輸入位於邏輯網路或其子網路內的 IP 位址。Otherwise, type an IP address that is in within the logical network or its subnet. 如果您選取 IP 子網路,則需確定其會對應至您部署主機的實體位置和介面卡連線的網路。If you select an IP subnet, make sure that it corresponds to the physical location where you are deploying the host and to the network that the adapter is connected to. 否則,部署可能會失敗。Otherwise, deployment may fail.
  8. 針對每張網路介面卡,進行網路介面卡設定。Configure the network adapter settings for each network adapter. 請注意,如果電腦中的實體網路介面卡數目,與實體電腦設定檔中定義的實體網路介面卡數目不符,您就必須指定介面卡缺漏的任何資訊。Note that if the number of physical network adapters in a computer does not match the number of physical network adapters that are defined in the physical computer profile, you must specify any information that is missing for the adapters. 如果您決定不要現在佈建此電腦 (例如,在需要安裝或解除安裝實體硬體的情況下),可以從清單中選取電腦的 BMC IP 位址,然後按一下 [移除] 。If you decide not to provision this computer right now (for example, if physical hardware needs to be installed or uninstalled), you can select the computer's BMC IP address from the list and then click Remove.
  9. 針對清單中的每個 BMC IP 位址重複進行設定。Repeat the configuration for each BMC IP address in the list.
  10. 當您填妥要佈建之所有電腦的必要資訊之後,請按一下 [下一步]。When you have filled in needed information for all the computers you want to provision, click Next.
  11. 確認 [摘要] 中的設定,然後按一下 [完成] 以部署新的 Hyper-V 主機,並讓這些主機接受 VMM 的管理。In Summary confirm the settings, and then click Finish to deploy the new Hyper-V hosts and bring them under VMM management. 視您的設定而定,[作業] 對話方塊可能會出現。Depending on your settings, the Jobs dialog box might appear. 請確定作業中所有步驟的狀態皆為 [已完成],然後關閉對話方塊。Make sure that all steps in the job have a status of Completed, and then close the dialog box.
  12. 若要確認已新增主機,請按一下 [光纖] > [伺服器] > [所有主機] ,然後找出並按一下新的主機叢集。To confirm that the host was added click Fabric > Servers > All Hosts > and locate and click the new host cluster. 在 [主機] 窗格的 [主機狀態] 欄位中,確認叢集中的每個節點為 [確定]。In the Hosts pane, in the Host Status column, verify that each node in the cluster is OK.