> For the complete documentation index, see [llms.txt](https://docs.verge.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verge.io/knowledge-base/zh/virtual-machines/using-shared-disks-windows-clustering.md). Agents can also search and read this documentation through its [MCP server](https://docs.verge.io/~gitbook/mcp).

# 在 Windows 群集中特使用共享磁盘

为 Windows Server 故障转移群集配置 VergeOS 共享磁盘：创建磁盘，将其附加到每个群集节点虚拟机，进行验证，并设置反亲和性。

## 概述

{% hint style="info" %}
**要点**

* VergeOS 支持通过 **SCSI‑3 持久保留**，因此多个 VM 可以安全地挂载同一个虚拟磁盘。
* 本文仅涵盖 VergeOS 配置：创建共享磁盘，将其附加到每个群集节点 VM，进行验证，并设置反亲和性。
* Windows 端的所有配置（群集验证、仲裁、CSV）请参阅 Microsoft 的 WSFC 文档。
  {% endhint %}

Windows Server 故障转移群集（WSFC）要求所有群集节点都能访问共享存储。VergeOS 共享磁盘满足这一要求：一个虚拟磁盘可同时连接到多个 VM，而 SCSI-3 持久保留可让来宾群集协调访问。

## 前提条件

* VergeOS 26.2 或更高版本。
* 拥有创建和修改 VM 权限的用户。
* 计划中的所有群集节点都可访问的网络、Active Directory 域服务和 DNS。
* 每个群集节点所需的 Windows Server 安装介质和许可证。

## 共享磁盘的工作原理

共享磁盘只存在一份。在第一个群集节点上将其创建为普通 **磁盘** 。在其他每个节点上，添加一个启用了 **共享磁盘** 选项并选择现有磁盘的驱动器——这会附加同一个磁盘，并不会创建新的存储。

{% hint style="warning" %}
在 **共享磁盘** 您在每个额外节点上创建驱动器时启用。该选项不能在之后通过编辑驱动器来打开。
{% endhint %}

## 步骤

### 1. 创建群集节点 VM

1. 为每个群集节点 VM 创建其自己的操作系统磁盘。
2. 添加一个用于客户端访问的 NIC，如果您的设计需要，还可以添加一个用于群集心跳的单独 NIC。
3. 在每个 VM 上安装 Windows Server。
4. 将每个 VM 加入域。

在启动群集节点 VM 之前，请确保域控制器已开机并可访问。

有关驱动器和 NIC 字段的详细信息，请参阅 [虚拟机驱动器](https://docs.verge.io/run-the-platform/zh/xu-ni-ji/vm-drives.md).

### 2. 将共享磁盘添加到第一个群集节点

在第一个群集节点 VM 上，创建群集共享的磁盘——例如仲裁磁盘、数据磁盘和 CSV 磁盘。

对于每个磁盘：

1. 在 VM 仪表板中，点击 **新驱动器**.
2. 输入一个清晰的 **名称**，例如 `Cluster-Quorum`, `Cluster-Data01`，或 `Cluster-CSV01`。该名称用于在您将磁盘附加到其他节点时标识它。
3. 将 **介质** 设置为 **磁盘**.
4. 将 **接口** 设置为 **Virtio-SCSI** 或 **Virtio-SCSI（专用控制器）**。这些接口支持 WSFC 所需的 SCSI-3 持久保留。
5. 将 **磁盘大小**.
6. 点击 **提交**.

### 3. 将共享磁盘附加到每个额外的群集节点

在每个额外的群集节点 VM 上，附加每个共享磁盘：

1. 在 VM 仪表板中，点击 **新驱动器**.
2. 输入一个描述性的 **名称**.
3. 展开 **高级** 部分并启用 **共享磁盘**。 **接口** 选项会减少为 **Virtio-SCSI** 和 **Virtio-SCSI（专用控制器）**.
4. 在 **介质文件**中，选择在第一个节点上创建的磁盘。该列表会按 VM 分组显示现有磁盘，并显示为驱动器名称和说明。
5. 点击 **提交**.

对群集所需的每个共享磁盘重复此操作。

### 4. 验证共享磁盘配置

1. 导航到 **虚拟机 > VM 驱动器**.
2. 在 **共享** 列下的筛选行中，选择 **是**.
3. 验证每个共享磁盘在每个群集节点 VM 上各出现一次。
4. 验证 **介质文件** 列在每个节点的该磁盘条目上都显示相同的文件名（例如 `disk_28_16.raw`）。相同的文件名可确认所有节点都附加了同一个虚拟磁盘。

### 5. 为群集节点配置反亲和性

让群集节点 VM 运行在不同的 VergeOS 节点上，这样一次物理故障只会使一个群集节点宕机。

1. 在每个群集节点 VM 上，点击 **编辑**.
2. 将 **HA 组** 设置为每个群集节点 VM 上相同的值，例如 `wsfc-nodes`。不要将该值以 `+` 开头——前导 `+` 会请求同节点亲和性，也就是相反的行为。
3. 点击 **提交**.

VergeOS 现在会在可能的情况下将 VM 放置在不同的节点上。详情请参阅 [影响 VM 节点选择的设置](https://docs.verge.io/knowledge-base/zh/automation-api/determine-node-where-vm-runs.md).

### 6. 启动群集节点

1. 启动每个群集节点 VM。
2. 验证每个 VM 都在不同的 VergeOS 节点上启动。
3. 在每个节点上的 Windows 磁盘管理中，验证所有共享磁盘都可见。

### 7. 继续进行 WSFC 安装

VergeOS 配置已完成。请按照 Microsoft 的 WSFC 文档验证群集、配置仲裁、在适用时启用 CSV，并安装群集角色。 **群集验证向导** 会在您完成群集最终配置之前确认共享磁盘行为。

## 其他资源

* [虚拟机驱动器](https://docs.verge.io/run-the-platform/zh/xu-ni-ji/vm-drives.md) ——所有驱动器配置字段，包括共享磁盘。
* [影响 VM 节点选择的设置](https://docs.verge.io/knowledge-base/zh/automation-api/determine-node-where-vm-runs.md) ——HA 组、首选节点和群集放置。
* [26.2 发行说明](https://docs.verge.io/release-notes/zh/2026/26-2-release-notes.md) ——引入共享磁盘的版本。

{% hint style="info" %}
**需要帮助？**

如果您对该流程有疑问或遇到问题，请联系 VergeOS 支持团队。
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.verge.io/knowledge-base/zh/virtual-machines/using-shared-disks-windows-clustering.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
