大网数据广告活动
磁盘与文件系统

Using Storage Spaces Direct in a virtual machine

· 52CE 我爱测

How to deploy Storage Spaces Direct in a virtual machine guest cluster - for example, in Microsoft Azure.

You can deploy Storage Spaces Direct on a cluster of physical servers or on virtual machine (VM) guest clusters as discussed in this article. This type of deployment delivers virtual shared storage across a set of VMs on top of a private or public cloud. This allows you to use application high availability solutions.

Requirements for guest clusters

The following considerations apply when deploying Storage Spaces Direct in a virtualized environment.

  • Minimum of two nodes and maximum of three nodes

  • Two-node deployments must configure a witness (Cloud Witness or File Share Witness)

  • Three-node deployments can tolerate one node down and the loss of one or more disks on another node. If two nodes shut down, then the virtual disks are offline until one of the nodes returns.

  • Configure the VMs to be deployed across fault domains

    • Azure – Configure the Availability Set

    • Hyper-V – Configure AntiAffinityClassNames on the VMs to separate the VMs across nodes

    • VMware – Configure the VM-VM Anti-Affinity rule by creating a DRS Rule of type "Separate Virtual Machines" to separate the VMs across ESX hosts. Disks presented for use with Storage Spaces Direct should use the Paravirtual SCSI (PVSCSI) adapter. For PVSCSI support with Windows Server, consult https://kb.vmware.com/s/article/1010398.

  • Use low latency / high performance storage such as Azure Premium SSD managed disks or faster

  • Deploy a flat storage design with no caching devices configured

  • Use a minimum of two virtual data disks presented to each VM (VHD / VHDX / VMDK)

    This number is different than bare-metal deployments because the virtual disks can be implemented as files that aren't susceptible to physical failures.

  • Disable the automatic drive replacement capabilities in the Health Service by running the following PowerShell cmdlet:

    Get-storagesubsystem clus* | set-storagehealthsetting -name "System.Storage.PhysicalDisk.AutoReplace.Enabled" -value "False"
    
  • To give greater resiliency to possible VHD / VHDX / VMDK storage latency in guest clusters, increase the Storage Spaces I/O timeout value:

    HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\spaceport\\Parameters\\HwTimeout

    dword: 00007530

    The decimal equivalent of Hexadecimal 7530 is 30000, which is 30 seconds. The default value is 1770 Hexadecimal, or 6000 Decimal, which is 6 seconds.

The following features aren't supported when using Storage Spaces Direct in a virtual machine guest cluster:

  • Host level virtual disk snapshot/restore

    Instead use traditional guest level backup solutions to back up and restore the data on the Storage Spaces Direct volumes.

  • Host level virtual disk size change

    The virtual disks exposed through the VM must retain the same size and characteristics. Adding more capacity to the storage pool can be accomplished by adding more virtual disks to each of the VMs, and then adding them to the pool. We recommend using virtual disks of the same size and characteristics as the current virtual disks.

Azure IaaS VM guest clusters

Azure templates decrease complexity, configure best practices, and speed your Storage Spaces Direct deployments in an Azure Iaas VM. This is the recommended solution for deploying in Azure.

Consider using Azure Shared Disks for guest virtual machines as an alternative, see Azure Shared Disks.

Diagram showing Storage Spaces Direct.

Next steps

To deploy Storage Spaces Direct in a virtual machine guest cluster, see the following articles:

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 11/25/2024
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。