將儲存體新增至 Hyper-V 主機與叢集Add storage to Hyper-V hosts and clusters

重要

已不再支援此版本的 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 主機和叢集的佈建儲存體。Read this article to allocate provisioned storage to Hyper-V hosts and clusters in the System Center - Virtual Machine Manager (VMM) fabric.

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

已佈建的儲存體必須在 VMM 網狀架構中可供探索且已分類,您才能將其配置給主機和叢集:Before you can allocate provisioned storage to hosts and cluster, it should be discovered and classified in the VMM fabric:

  1. 探索及分類儲存體:Discover and classify storage:
  2. 將區塊存放裝置配置給主機群組Allocate block storage to host groups. 您可以配置整個存放集區或特定邏輯單元 (LUN)。You can allocate an entire storage pool, or a specific logical unit (LUN).
  3. 確定您已完成下列步驟,再將儲存體配置給主機:Make sure you've completed these steps before you allocate storage to hosts:
    • MPIO:如果您使用光纖通道或 iSCSI 存放裝置,則必須在每部主機上啟用多重路徑 I/O (MPIO) 功能。MPIO: If you're using fiber channel or iSCSI storage, the Multipath I/O (MPIO) feature must be enabled on each host.
      • 如果在新增主機前已啟用了 MPIO,VMM 會使用 Microsoft DSM 自動為支援的存放裝置陣列啟用它。If MPIO is already enabled before you add the host, VMM will automatically enable it for supported storage arrays using Microsoft DSM. 如有廠商特定 DSM,就會使用這些 DSM。If you have vendor specific DSMs these will be used.
      • 如果您將主機加入 VMM 並在稍後啟用 MPIO,則必須手動進行設定,以新增找到的裝置硬體識別碼。If you add a host to VMM and enable MPIO later, you need to configure it manually to add the discover device hardware IDs.
    • HBA 和分區:如果您使用光纖通道存放裝置陣列網路 (SAN),則每部主機皆必須安裝主機匯流排介面卡 (HBA),並正確地設定分區。HBA and zoning: If you're using Fiber Channel storage array network (SAN), each host must have a host bus adapter (HBA) installed, and zoning must be correctly configured.
    • iSCSI:如果您使用 iSCSI SAN,請確定已新增 iSCSI 入口網站,且 iSCSI 啟動器已登入陣列。iSCSI: If you are using an iSCSI SAN, make sure that iSCSI portals have been added, and that the iSCSI initiator is logged into the array.

      請確定每部主機上的 Microsoft iSCSI 啟動器服務已啟動且設為 [自動] Make sure that the Microsoft iSCSI Initiator Service on each host is started and set to Automatic
    • 儲存群組:向您的儲存體系統管理員說明 VMM 如何管理儲存體。Storage group: Explain to your storage administrator how VMM manages storage.
      • 在 VMM 中,儲存群組會將主機啟動器、目標連接埠和邏輯單元繫結在一起。In VMM a storage group binds together host initiators, target ports, and logical units.
      • 儲存群組包含一或多個主機啟動器識別碼 (IQN 或 WWN) (WWN)。A storage group contains one or more host initiator IDs (IQN or WWN) (WWN).
      • 儲存群組也包含一或多個目標通訊埠,以及一或多個邏輯單元。A storage group also contains one or more target ports and one or more logical units. 邏輯單元會透過目標通訊埠提供主機啟動器使用。Logical units are exposed to the host initiators through the target ports.
      • 根據預設,當 VMM 進行邏輯單元指派的管理時,VMM 會為每部主機建立一個儲存群組,不論是獨立主機或主機叢集節點。By default, when VMM manages the assignment of logical units, VMM creates one storage group per host, either a standalone host or a host cluster node.
      • 某些存放裝置陣列會偏好在整個叢集中使用一個存放裝置群組,其中所有叢集節點的主機啟動器包含在單一的存放裝置群組中。For some storage arrays, it is preferable to use one storage group for the entire cluster, where host initiators for all cluster nodes are contained in a single storage group. 若要這樣做,您必須使用 Set-SCStorageArray Cmdlet 將 CreateStorageGroupsPerCluster 內容設為 $true。To do this, you need to set the CreateStorageGroupsPerCluster property to $true by using the Set-SCStorageArray cmdlet.

配置儲存體Allocating storage

  • 您可以直接將檔案儲存體配置給主機和叢集。You can allocate file storage directly to hosts and clusters.
  • 您可以將 LUN 新增至主機和叢集:You can add LUNs to hosts and clusters:
  • 如果您已在主機群組上佈建 LUN,您可以將其指派給主機和叢集。If you already provisioned LUNs on a host group, you can assign these to hosts and clusters.
  • 如果您已在主機群組上佈建存放集區,您可以在程序期間建立 LUN,以將儲存體加入叢集。If you provisioned a storage pool on a host group, you can create LUNs during the procedure to add storage to a cluster.
  • 若要使用不在 VMM 管理下的共用儲存體,所有主機或節點必須可使用存放磁碟,然後您才可進行新增。If you want to use shared storage that isn't managed by VMM, the storage disks must be available to all hosts or nodes before you can add them. 您必須佈建一或多個 LUN 給您要叢集化的所有主機,然後在其中一個節點上掛接並格式化存放磁碟。You need to provision one or more LUNs to all hosts you want to cluster, and then mount and format the storage disks on one of the nodes. 請注意,VMM 不支援且不會封鎖使用非對稱式存放裝置,其中工作負載可以使用叢集節點子集間共用的磁碟。Note that VMM doesn't support or block the use of asymmetric storage, where a workload can use disks that are shared between a subset of the cluster nodes. 每個叢集節點必須是叢集磁碟的可能擁有者。Each cluster node must be a possible owner of the cluster disk.
  • 將 iSCSI 存放裝置加入主機之後,您必須為儲存體建立新的工作階段。After adding iSCSI storage to a host, you need to create a new session to the storage.

將檔案儲存體配置給獨立主機Allocate file storage to a standalone host

您可以在要建立 VM 以使用檔案共用作為存放裝置的任何主機上,指派檔案共用。You can assign file shares on any host on which you want to create VMs that will use the file share as storage.

  1. 按一下 [網狀架構] > [伺服器] > [所有主機] ,然後選取您要設定的主機或叢集節點。Click Fabric > Servers > All Hosts, and select the host or cluster node you want to configure.
  2. 按一下 [主機] > [內容] > [主機存取] 。Click Host > Properties > Host Access. 指定執行身分帳戶。Specify a Run As account. 預設會列出用來將主機新增至 VMM 的執行身分帳戶。By default the Run As account that was used to add the host to VMM is listed. 在 [執行身分] 帳戶方塊中進行帳戶設定。In the Run As account box, configure the account settings. 您無法使用針對 VMM 服務帳戶所使用的帳戶。You can't use the account that you use for the VMM service. 請注意:Note that:
    • 如果您使用網域帳戶作為 VMM 服務帳戶,請將網域帳戶新增至檔案伺服器上的本機系統管理員群組。If you used a domain account for the VMM service account, add the domain account to the local Administrators group on the file server.
    • 如果您使用本機系統帳戶作為 VMM 服務帳戶,請將 VMM 管理伺服器的電腦帳戶新增至檔案伺服器上的本機系統管理員群組。If you used the local system account for the VMM service account, add the computer account for the VMM management server to the local Administrators group on the file server. 例如,針對名為 VMMServer01 的 VMM 管理伺服器,新增電腦帳戶 VMMServer01$。For example, for a VMM management server that is named VMMServer01, add the computer account VMMServer01$.
    • 所有存取 SMB 3.0 檔案共用的主機或主機叢集都必須使用執行身分帳戶新增至 VMM。Any host or host cluster that accesses the SMB 3.0 file share must have been added to VMM using a Run As account. VMM 會自動使用此執行身分帳戶來存取 SMB 3.0 檔案共用。VMM automatically uses this Run As account to access the SMB 3.0 file share.
    • 如果您在新增主機或主機叢集時指定明確的使用者認證,您可以從 VMM 中移除主機或叢集,然後使用執行身分帳戶再次將它新增。If you specified explicit user credentials when you added a host or host cluster, you can remove the host or cluster from VMM, and then add it again by using a Run As account.
  3. 按一下 [主機名稱內容] > [存放裝置] > [新增檔案共用] 。Click Host Name Properties > Storage > Add File Share.
  4. 在 [檔案共用路徑] 中,選取所需的 SMB 3.0 檔案共用,然後按一下 [確定] 。In File share path, select the required SMB 3.0 file share, and then click OK.
  5. 若要確認主機具有存取權,請開啟 [作業] 工作區以檢視作業狀態。To confirm that the host has access, open the Jobs workspace to view the job status. 或者,再次開啟主機內容,然後按一下 [存放裝置] 索引標籤。在 [檔案共用] 下方,按一下 SMB 3.0 檔案共用。Or, open the host properties again, and then click the Storage tab. Under File Shares, click the SMB 3.0 file share. 確認 [存取共用檔案] 旁邊出現綠色的核取記號。Verify that a green check mark appears next to Access to file share.
  6. 針對您要存取 SMB 3.0 檔案共用的任何獨立主機,或針對叢集中的所有節點,重複此程序Repeat this procedure for any standalone host that you want to access the SMB 3.0 file share, or for all nodes in a cluster

將邏輯單元指派給獨立主機Assign a logical unit to a standalone host

指派現有的單元,或建立新的單元並將它指派。Either assign an existing unit, or create a new one and assign it.

  1. 在 [光纖] > [伺服器] > [所有主機] 中,以滑鼠右鍵按一下您想要設定的主機 > [內容] 。In Fabric > Servers > All Hosts, right-click the host that you want to configure > Properties.

  2. 如果您想要建立新的邏輯單元:If you want to create a new logical unit:

    • 在工具列上,按一下 [磁碟] 旁的 [新增] 。On the toolbar, next to Disk, click Add. 按一下 [邏輯單元] 旁的 [建立邏輯單元] 。Next to Logical unit click Create Logical Unit.
    • 在 [建立邏輯單元] > [存放集區] 中選擇從中建立邏輯單元的集區。In Create Logical Unit > Storage pool choose the pool from which the create the logical unit. 指定名稱 (只能使用英數字元)、描述和單位大小。Specify a name (alphanumeric only), a description and the unit size. 按一下 [確定] 以完成。Click OK to finish.
  3. 若要將現有的邏輯單元指派給主機,請在工具列上,按一下 [磁碟] 旁的 [新增] ,然後選取您要指派的邏輯單元。To assign an existing logical unit to the host, on the toolbar, next to Disk, click Add, and select the logical unit you want to assign.

  4. 在 [邏輯單元] 清單中,確認是否選取剛剛建立的邏輯單位。In the Logical unit list, verify that the logical unit that you just created is selected.

  5. 如果您想要格式化磁碟,請在 [格式化新磁碟] 中選取 [使用下列設定將此磁碟區格式化為 NTFS 磁碟區] ,然後指定設定。In Format new disk, if you want to format the disk, select Format this volume as NTFS volume with the following settings, and specify the settings. 請注意,如果您選取 「Force format even if a file system is found」 (即使找到檔案系統也強制格式化),就會覆寫磁碟區上現有的全部資料。Note that if you select Force format even if a file system is found all existing data on the volume will be overwritten. 如果邏輯單元已有現成的資料,而且您未使用 [強制格式化] 選項,指派邏輯單元的 VMM 工作會完成,但顯示警告。If the logical unit has existing data, and you do not use the Force Format option, the VMM job to assign the logical unit will complete with a warning. VMM 將邏輯單元指派給主機。VMM assigns the logical unit to the host. 您可以稍後再格式化磁碟。You can format the disk later.

  6. 在 [掛接點] 中,選取掛接選項。In Mount Point, select the mount options. 然後按一下 [確定] 將邏輯單元指派給主機。Then click OK to assign the logical unit to the host.

  7. VMM 會向主機登錄儲存體邏輯單元,並裝載儲存體磁碟。VMM registers the storage logical unit to the host and mounts the storage disk.

    • 若要檢視相關聯的作業資訊,請開啟 [作業] 工作區。To view the associated job information, open the Jobs workspace.
    • 若要確認已指派邏輯單元,請檢視主機名稱 > [內容] 對話方塊的 [儲存體] 索引標籤資訊。To verify that the logical unit was assigned, view the information on the Storage tab in the Host Name > Properties dialog box. 新指派的邏輯單元會出現在 [磁碟] 下。The newly assigned logical unit appears under Disk. 按一下新磁碟以檢視磁碟的詳細資料。Click the new disk to view the disk details.
    • 如果 [陣列] 欄位填入了磁碟的詳細資料,這就表示存放裝置陣列位在 VMM 管理中。If the Array field is populated in the disk details, this indicates that the storage array is under VMM management.
  8. 若要設定額外的磁碟設定,請開啟主機的 [磁碟管理]。To configure additional disk settings open Disk Management on the host. 若要開啟 [磁碟管理],請按一下 [啟動] ,在搜尋方塊中輸入 diskmgmt.msc,然後按 ENTER 鍵。To open Disk Management, click Start, type diskmgmt.msc in the search box, and then press ENTER. 新的磁碟就會出現在磁碟清單中,成為基本的磁碟。The new disk appears in the list of disks as a basic disk. 如果您之前選擇了格式化磁碟,磁碟現已完成格式化且在線上。If you chose to format the disk, the disk is already formatted and online. 您可以滑鼠右鍵按一下磁碟來查看可用的選項,例如 [格式化] 和 [變更磁碟機代號及路徑] 。You can right-click the disk to see the available options, such as Format and Change Drive Letter and Paths.

設定 Hyper-V 叢集的儲存體Configure storage for a Hyper-V cluster

  1. 按一下 [網狀架構] > [伺服器] > [所有主機] 。Click Fabric Servers > All Hosts. 以滑鼠右鍵按一下您想要設定的叢集 > [內容] 。Right-click the cluster you want to configure > Properties. 按一下 「Host Cluster Name」 > (主機叢集名稱) [內容] 的索引標籤︰In Host Cluster Name > Properties click a tab:

    • 可用的儲存體︰如要加入可用的儲存體,請將可用的儲存體轉換為共用儲存體 (CSV),或移除可用的儲存體。Available Storage: for adding available storage, converting available storage to shared storage (CSV), or removing available storage.
    • 共用磁碟區︰用以新增叢集共用磁碟區 (CSV)、將 CSV 轉換成可用的存放裝置,或移除 CSV。Shared Volumes: for adding cluster shared volumes (CSVs), converting CSVs to available storage, or removing CSVs. 叢集至少必須執行 Windows Server 2012 才能支援 CSV。The cluster must run at least Windows Server 2012 to support CSVs.
  2. 設定主機叢集的儲存體。Configure storage for the host cluster. 請注意:Note that:

    • 如果您針對 CSV 新增可用的儲存體,請只使用英數字元的 LUN。If you add available storage for CSVs, use only alphanumeric characters for a LUN. 請注意,您無法變更已初始化磁碟的磁碟分割樣式。Note that you can't change the partition style of a disk that has already been initialized.
    • 如果您要將可用的儲存體轉換成 CSV,請確定將關聯的 .vhd 或 .vhdx 檔案放在要轉換之儲存體的叢集上沒有任何 VM。If you're converting available storage to CSVs, make sure there are no VMs on the cluster that have their associated .vhd or .vhdx files located on the storage that you want to convert.

      一次轉換一個磁碟區。Convert volumes one at a time. 轉換之後,確認邏輯單元顯示於 [共用磁碟區] 索引標籤上。After conversion, confirm that the logical unit appears on the Shared Volumes tab.

      注意:如果您將共用儲存體轉換為可用儲存體,而虛擬機器正在使用儲存體,可能會造成嚴重的資料遺失。Caution: If you convert shared to available storage, and the storage is being used by virtual machines, serious data loss can result.
    • 只有在叢集中沒有正在針對其 VHD 使用儲存體的 VM 時,才能移除儲存體。You can only remove storage if there are no VMs in the cluster currently using the storage for their vhds.
  3. 當您準備好認可變更時,按一下 [確定] 。When you're ready to commit the changes, click OK.

建立 iSCSI 工作階段Create an iSCSI session

  1. 在目標主機的 [服務] 嵌入式管理單元中,確定 Microsoft iSCSI 啟動器服務已啟動且設為 [自動]。On the target host, in the Services snap-in, make sure that the Microsoft iSCSI Initiator Service is started and set to Automatic.
  2. 在 [網狀架構] > [伺服器] > [所有主機] 主機 中,以滑鼠右鍵按一下您要設定的主機 > [內容] 。In Fabric > Servers > All Hosts Hosts, right-click the host that you want to configure > Properties.
  3. 在 [iSCSI 陣列] 下,查看是否已列出存放裝置陣列。Under iSCSI Arrays, see if the storage array is already listed. 如未列出,請在工具列上,按一下 [iSCSI 陣列] 旁的 [新增] 。If it is not, on the toolbar, next to iSCSI Array, click Add.
  4. 在 [建立新的 iSCSI 工作階段] > [陣列] ,按一下您想要使用的存放裝置陣列。In the Create New iSCSI Session > Array , click the storage array you want to use.
  5. 按一下 [建立] 建立新的工作階段。Click Create to create a new session. 按一下 「Use advanced settings」 (使用進階設定),如果您想要修改自訂的設定,包括您想要使用的目標接聽程式、名稱或主機 NIC。Click Use advanced settings if you want to modify customized settings, including target listener, name, or the host NIC that you want to use.
  6. 您加入的陣列就會出現在 [iSCSI 陣列] 下。The array that you added appears under iSCSI Arrays. 按一下陣列,檢視詳細資料。Click the array to view more details.

後續步驟Next steps

設定 Hyper-V 主機和叢集網路Set up networking for Hyper-V hosts and clusters.