SET_VIRTUAL_DISK_INFO 結構 (virtdisk.h)
包含虛擬硬碟 (VHD) 呼叫 SetVirtualDiskInformation 函式以設定 VHD 屬性時要使用的資訊。
語法
typedef struct _SET_VIRTUAL_DISK_INFO {
SET_VIRTUAL_DISK_INFO_VERSION Version;
union {
PCWSTR ParentFilePath;
GUID UniqueIdentifier;
struct {
ULONG ChildDepth;
PCWSTR ParentFilePath;
} ParentPathWithDepthInfo;
ULONG VhdPhysicalSectorSize;
GUID VirtualDiskId;
BOOL ChangeTrackingEnabled;
struct {
GUID LinkageId;
PCWSTR ParentFilePath;
} ParentLocator;
};
} SET_VIRTUAL_DISK_INFO, *PSET_VIRTUAL_DISK_INFO;
成員
Version
SET_VIRTUAL_DISK_INFO_VERSION列舉,指定要傳遞至 VHD 函式或從 VHD 函式傳遞SET_VIRTUAL_DISK_INFO結構的版本。 這會決定資訊集的類型。
ParentFilePath
父備份儲存區的路徑。 將 Version 成員設定為 SET_VIRTUAL_DISK_INFO_PARENT_PATH (1) 。
UniqueIdentifier
VHD 的唯一標識碼。 將 Version 成員設定為 SET_VIRTUAL_DISK_INFO_IDENTIFIER (2) 。
ParentPathWithDepthInfo
設定父檔案路徑和子深度。 將 Version 成員設定為 SET_VIRTUAL_DISK_INFO_PARENT_PATH_WITH_DEPTH (3) 。
Windows 7 和 Windows Server 2008 R2: Windows 8 和 Windows Server 2012 之前,不支援此功能。
ParentPathWithDepthInfo.ChildDepth
從分葉指定子系的深度。 分葉本身位於深度 1。
ParentPathWithDepthInfo.ParentFilePath
從分葉指定父系的深度。 分葉本身位於深度 1。
VhdPhysicalSectorSize
設定 VHD 所報告的實體扇區大小。 將 Version 成員設定為 SET_VIRTUAL_DISK_INFO_PHYSICAL_SECTOR_SIZE (4) 。Windows 7 和 Windows Server 2008 R2: 在 Windows 8 和 Windows Server 2012 之前,不支援此功能。
VirtualDiskId
當使用者第一次建立虛擬磁碟以嘗試唯一識別該虛擬磁碟時所建立的標識碼。 將 Version 成員設定為 SET_VIRTUAL_DISK_INFO_VIRTUAL_DISK_ID (5) 。
Windows 8 和 Windows Server 2012:在 Windows 8.1 和 Windows Server 2012 R2 之前,不支援此功能。
ChangeTrackingEnabled
開啟或關閉 VHD 的復原變更追蹤 (RCT) 。 TRUE 會開啟 RCT。 FALSE 會關閉 RCT。 將 Version 成員設定為 SET_VIRTUAL_DISK_INFO_CHANGE_TRACKING_STATE (6) 。
Windows 8.1 和 Windows Server 2012 R2:Windows 10 和 Windows Server 2016 之前,不支援此成員。
ParentLocator
設定差異 VHD 存放區的父鏈接資訊。 父鏈接資訊是用來找出並正確識別虛擬磁碟鏈結中下一個父系的元數據。 將 Version 成員設定為 SET_VIRTUAL_DISK_INFO_PARENT_LOCATOR (7) 。
Windows 8.1 和 Windows Server 2012 R2:Windows 10 和 Windows Server 2016 之前,不支援此成員。
ParentLocator.LinkageId
父鏈接資訊的唯一標識碼。
ParentLocator.ParentFilePath
父 VHD 檔案的路徑。
規格需求
需求 | 值 |
---|---|
最低支援的用戶端 | Windows 7 |
最低支援的伺服器 | Windows Server 2008 R2 |
標頭 | virtdisk.h |