大网数据广告活动
Hyper-V与虚拟化

Cmdlets for configuring persistent memory devices for Hyper-V VMs

· 52CE 我爱测

How to configure persistent memory devices for Hyper-V VMs

This article provides system administrators and IT Pros with information about configuring Hyper-V VMs with persistent memory (also known as storage class memory or NVDIMM). JEDEC-compliant NVDIMM-N persistent memory devices are supported in Windows Server 2016 and Windows 10 and provide byte-level access to very low latency nonvolatile devices. VM persistent memory devices are supported in Windows Server 2019.

Create a persistent memory device for a VM

Use the New-VHD cmdlet to create a persistent memory device for a VM. The device must be created on an existing NTFS DAX volume. The new filename extension (.vhdpmem) is used to specify that the device is a persistent memory device. Only the fixed VHD file format is supported.

Example: New-VHD D:\VMPMEMDevice1.vhdpmem -Fixed -SizeBytes 4GB

Create a VM with a persistent memory controller

Use the New-VM cmdlet to create a Generation 2 VM with specified memory size and path to a VHDX image. Then, use Add-VMPmemController to add a persistent memory controller to a VM.

Example:

New-VM -Name "ProductionVM1" -MemoryStartupBytes 1GB -VHDPath c:\vhd\BaseImage.vhdx

Add-VMPmemController -VMName "ProductionVM1"

Attach a persistent memory device to a VM

Use Add-VMHardDiskDrive to attach a persistent memory device to a VM

Example: Add-VMHardDiskDrive -VMName "ProductionVM1" -ControllerType PMEM -ControllerLocation 1 -Path D:\VMPMEMDevice1.vhdpmem

Persistent memory devices within a Hyper-V VM appear as a persistent memory device to be consumed and managed by the guest operating system. Guest operating systems can use the device as a block or DAX volume. When persistent memory devices within a VM are used as a DAX volume, they benefit from low latency byte-level address-ability of the host device (no I/O virtualization on the code path).

Note: Persistent memory is only supported for Hyper-V Gen2 VMs. Live Migration and Storage Migration are not supported for VMs with persistent memory. Production checkpoints of VMs do not include persistent memory state.

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 01/21/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

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

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