在 Hyper V 2019 中将 VHD 集或 VHDX 附加为共享磁盘“虚拟硬盘所在的存储不支持虚拟硬盘共享”

在 Hyper V 2019 中将 VHD 集或 VHDX 附加为共享磁盘“虚拟硬盘所在的存储不支持虚拟硬盘共享”

WS 服务器 2019 Hyper V

在存储 VHD 的同一位置创建了 VHD 集 (.VHDS) 以供 VM 使用。

当尝试附加文件(在 GUI 中或通过 PowerShell)时,出现此错误:

PS C:\Users\Administrator> Add-VMHardDiskDrive -ComputerName "VM-S01-HV" -VMName "VM-S04-FS1_V0" -ControllerNumber 0 -ControllerLocation 1 -Path G:\A_VHDS\001_VM-USERFILESHARE\VM-USERFILESHARE.vhds -ShareVirtualDisk
Add-VMHardDiskDrive : Failed to add device 'Virtual Hard Disk'.
The storage where the virtual hard disk is located does not support virtual hard disk sharing.
Cannot get information for attachment 'G:\A_VHDS\001_VM-USERFILESHARE\VM-USERFILESHARE.vhds'.
The storage where the virtual hard disk is located does not support virtual hard disk sharing.
'VM-S04-FS1_V0' failed to add device 'Virtual Hard Disk'. (Virtual machine ID -REDACTED-)
The storage where the virtual hard disk is located does not support virtual hard disk sharing.
'VM-S04-FS1_V0': Cannot get information for attachment 'G:\A_VHDS\001_VM-USERFILESHARE\VM-USERFILESHARE.vhds'.
(Virtual machine ID -REDACTED-)
The storage where the virtual hard disk is located does not support virtual hard disk sharing.
At line:1 char:1
+ Add-VMHardDiskDrive -ComputerName "VM-S01-HV" -VMName "VM-S04-FS1_V ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Add-VMHardDiskDrive], VirtualizationException
    + FullyQualifiedErrorId : OperationFailed,Microsoft.HyperV.PowerShell.Commands.AddVMHardDiskDrive

我尝试将 Hyper V 磁盘更改为动态磁盘,并使用不同的文件系统(当前为 ReFS),但没有任何变化。还尝试使用“icacls (...) /grant (VM)”修复权限,这解决了 VHD 的类似问题,但没有什么效果。

计划是使用该共享磁盘作为文件服务器群集的存储,但最终我可能只是简单地使用 Hyper V 服务器本身的文件共享。

可能是我的硬件不允许这样做?

相关内容