问题描述
我正在尝试在Windows 7上安装虚拟硬盘。 我有一个可以从管理工具安装的vhd,但我不清楚如何使用C ++。 我可以使用现有的vhd文件成功调用OpenVirtualDisk和 AttachVirtualDisk。 之后我想将新卷挂载到目录并使用它。 但是我对那部分没有成功。 我已尝试 SetVolumeMountPoint,CreateSymbolicLink和CreateHardLink但未成功。 I'm trying to mount a Virtual Hard Disk on Windows 7. I have a vhd that I can mount from the Administrative Tools, but I'm not clear on how to do that with C++. I can successfully call OpenVirtualDisk and AttachVirtualDisk with the existing vhd file. After that I want to mount the new volume to a directory and use it. However I have not bee successful with that part. I've tried SetVolumeMountPoint, CreateSymbolicLink and CreateHardLink without success. 获取附加VHD并安装它的任何提示? Any tips for taking the attached VHD and mounting it? 附加它后,它将显示为磁盘和卷(如果它已经初始化并且上面有分区)。您可以使用FindFirstVolume / FindNextVolume查找卷,然后查找SetVolumeMountPoint。 After you attach it, it will show up as a disk and volume (if it has been initialised and have partitions on it). You can use FindFirstVolume/FindNextVolume to look for the volume and then SetVolumeMountPoint. 您的最终选项是使用虚拟磁盘服务查找/附加/设置挂载点。 Your final option would be to use the Virtual Disk Service to find/attach/set mount point. 这篇关于安装vhd的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
推荐答案