compact vdiskcompact vdisk

适用于: Windows Server (半年通道) ,Windows Server 2019,Windows Server 2016,Windows Server 2012 R2,Windows Server 2012Applies to: Windows Server (Semi-Annual Channel), Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

减小动态扩展虚拟硬盘 (VHD) 文件的物理大小。Reduces the physical size of a dynamically expanding virtual hard disk (VHD) file. 此参数非常有用,因为在添加文件时动态扩展 Vhd 大小增加,但在删除文件时,其大小不会自动减小。This parameter is useful because dynamically expanding VHDs increase in size as you add files, but they do not automatically reduce in size when you delete files.

语法Syntax

compact vdisk

备注Remarks

  • 若要成功执行此操作,必须选择动态扩展的 VHD。A dynamically expanding VHD must be selected for this operation to succeed. 使用 " 选择 vdisk" 命令 选择 VHD 并将焦点移动到该 VHD。Use the select vdisk command to select a VHD and shift the focus to it.

  • 只能使用分离或附加为只读的压缩动态扩展 Vhd。You can only use compact dynamically expanding VHDs that are detached or attached as read-only.

其他参考Additional References