安装vhd [英] Mounting a vhd

查看:103
本文介绍了安装vhd的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在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?

 

推荐答案

SetVolumeMountPoint应该是最佳选择。

SetVolumeMountPoint should be the way to go.

附加它后,它将显示为磁盘和卷(如果它已经初始化并且上面有分区)。您可以使用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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆