> 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/windows-disks-showing-offline-after-restarting.md).

# 重启后 Windows 磁盘显示为脱机

如何使用 Set-StorageSetting PowerShell 命令修复导入 VergeOS 的 Windows 虚拟机在重启后显示为脱机的辅助虚拟磁盘。

将 VM 导入 VergeOS 平台后，某些（虚拟）磁盘在来宾 VM 重启后可能不会联机。

从 Windows 2008 开始，Microsoft 为额外的（非 OS）磁盘驱动器的默认状态添加了一项设置。有时在重启时，Windows 可能会检测到硬件更改；如果 VM 是从其他虚拟化平台导入的，这种情况更可能发生。当 Windows 检测到硬件更改时，可能不会自动使辅助虚拟磁盘联机。要将其更改为推荐设置，请运行以下 Windows PowerShell：

```ps1con
Set-StorageSetting -NewDiskPolicy OnlineAll
```

此外，也可以使用 diskpart 从命令行执行，或通过磁盘管理来完成。

***

{% hint style="info" %}
**文档信息**

* 最后更新：2024-08-10
* vergeOS 版本：4.11
  {% 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/windows-disks-showing-offline-after-restarting.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.
