简体   繁体   中英

How to create a differencing VHD using CreateVirtualDisk in Windows 2008 R2

I'm trying to create a differencing VHD using CreateVirtualDisk API. MSDN examples

http://code.msdn.microsoft.com/windowsdesktop/Virtual-hard-disk-03108ed3

is supported only on Win 8/2012. But, if i try the same on Win 2008 R2, CREATE_VIRTUAL_DISK_VERSION_2 is not available. Tried using CREATE_VIRTUAL_DISK_VERSION_1 with corresponding values (Specifying parent VHD) CreateVirtualDisk fails with error code 87.

I tried creating a new VHD (not a differencing) it is getting created.

How to go about this?

Use CreateVirtualDisk with out passing the any sizes, but pass only the parent VHD path. All the parameters which we have not passed will be taken from parent VHD.

CREATE_VIRTUAL_DISK_VERSION_2 is available online in Win 8/2012

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM