在Windows 7中,Microsoft引入了一种称为备份和还原(Backup and Restore)的新方法来备份您的计算机。基本上(Basically),它可以让您将所有数据备份到另一个位置,并为您提供创建系统映像(system image)的选项。
如果您选择创建系统映像文件(system image file),您最终会得到一个大的VHD 文件(VHD file)。然后可以使用此文件在以后恢复整个系统。该工具非常受欢迎,以至于他们将其保留在Windows 8和Windows 10中。如果您转到控制面板(Control Panel),您会看到一个名为备份和还原 (Windows 7)( Backup and Restore (Windows 7))的小程序。
使用此方法备份计算机的好处是,除了以后能够完全恢复之外,您可以将此VHD 文件(VHD file)附加到任何Windows 7、8(Windows 7)或 10计算机并(computer and access)像普通硬盘一样访问数据磁盘。
因此,如果您只需要从备份中复制一些文件,将VHD 文件(VHD file)附加到您的 PC 而不是恢复备份会更有意义,这将首先清除您的计算机(machine clean)。
在本文中,我将讨论如何将此VHD 文件(VHD file)附加到计算机并访问(computer and access)数据。我还将讨论如何创建自己的VHD 文件并备份(VHD file and backup)您喜欢的任何数据。最后,您可以阅读我之前关于如何将当前 PC 转换为VHD 文件(VHD file)的帖子。
挂载 VHD 文件
要在Windows中安装(Windows)VHD,您必须通过单击开始并在搜索框中键入(Start and typing)计算机管理(search box)来(Computer Management) 打开计算机管理(Computer Management)。你也可以去控制面板(Control Panel),然后系统和安全(System and Security),然后点击管理工具(Administrative Tools),然后点击计算机管理(Computer Management)。如果您在图标视图中,只需单击 管理工具(Tools)。
现在单击 左侧菜单中的(hand menu and wait)磁盘管理(Disk Management),然后等待驱动器和分区列表出现。接下来,右键单击磁盘管理(Disk Management)并选择附加 VHD(Attach VHD)。
在对话框中(dialog box),继续并单击浏览, (Browse, )导航到要挂载的VHD 文件的位置,然后单击确定。(VHD file)请注意,除非您选中只读( Read-only)框,否则您可以从虚拟硬盘驱动器中添加、修改或删除文件/文件夹。这非常有用,因为您可以附加VHD 文件(VHD file),添加更多要备份的数据,然后简单地分离它。
完成安装后,您将看到它显示为另一个浅蓝色的基本磁盘。(Basic disk)Windows应该自动给它一个驱动器号,但如果没有,您可以右键单击底部显示“健康(主分区)(Healthy (Primary Partition)) ”的部分,然后选择“更改驱动器号和路径”(Change Drive Letter and Paths)。
附加VHD(VHD)后,转到资源管理器(Explorer),您将能够浏览磁盘、来回复制数据等。
要分离VHD,请右键单击具有磁盘名称(disk name)(在我的情况下为Disk 2 )、卷类型(volume type)(Basic)、大小等的灰色区域。您将在底部看到Detach VHD选项。(Detach VHD)
创建 VHD 文件
正如我已经提到的,您可以使用Microsoft的免费工具将您当前的(Microsoft)Windows 机器(Windows machine)转换为VHD 文件,或者您可以在(VHD file)Windows中创建一个空文件。再次(Again),转到计算机管理(Computer Management),单击磁盘管理( Disk Management),然后右键单击磁盘管理( Disk Management)。
不要选择Attach VHD,而是单击Create VHD。这将打开一个窗口,您可以在其中指定VHD 文件(VHD file)的大小、格式和位置。
我建议选择VHDX 文件格式(file format),因为它不易损坏并且可以支持更大的磁盘大小。如果您选择 VHD文件格式(file format),它会推荐固定大小(Fixed size)。如果你使用VHDX,它会推荐动态扩展(Dynamically expanding)。我会将这些设置保留为推荐的选项。确保输入虚拟磁盘大小的值。如果您喜欢使用下拉菜单,可以将其更改为GB 或 TB 。(GB or TB)
现在在Disk Management中,您将看到另一个磁盘(在我的例子中是Disk 2),上面写着Not Initialized和Unallocated。在新虚拟磁盘的灰色部分(grey section)中,右键单击并选择Initialize Disk。
接下来,您必须选择是要使用MBR还是GPT。有关每种分区格式(partition format)的完整说明,请查看HTG 的这篇文章(this post by HTG)。为了与早于Vista的(Vista)Windows版本兼容,请选择MBR。对于更新的功能和更大的硬盘,请使用GPT。
现在右键单击显示未分配(Unallocated)的白色区域并选择新建简单卷(New Simple Volume)。这将调出新卷向导(volume wizard)。首先(First),您必须选择新卷的大小。它不必是未分配空间的完整大小。如果您的VHD较大,您可以创建多个分区。
单击下一步(Click Next)并选择要分配给分区的驱动器号。(drive letter)
最后,选择您希望如何格式化驱动器。默认情况下,它设置为NTFS,但如果您愿意,也可以选择FAT32。如果您使用虚拟硬盘从计算机备份文件,我建议您坚持使用NTFS 。
单击下一步并完成(Click Next and Finish),您就完成了。现在驱动器应该在磁盘管理(Disk Management)中显示为健康。
现在您可以简单地将数据正常复制到驱动器,然后在完成后分离VHD。这不是备份计算机的唯一方法,也不一定是最好的方法,但它运行良好,并且不需要任何第三方工具。如果您有任何问题,请随时发表评论。享受!
How to Create and Mount a Virtual Hard Disk in Windows
In Wіndоws 7, Microsoft intrоduced a new way to backup your computer called Backup and Restore. Basically, it let you baсkup all your data to аnother lоcation and gavе you the option to create a system image also.
If you chose to create the system image file, you would end up with a large VHD file. This file could then be used to restore your entire system at a later point. This tool was so popular that they kept it in Windows 8 and Windows 10. If you go to the Control Panel, you’ll see one applet there called Backup and Restore (Windows 7).
The nice thing about backing up your computer using this method, other than being able to restore it fully later on, is that you can attach this VHD file to any Windows 7, 8, or 10 computer and access the data just like a normal hard disk.
So if you just need to copy some files over from your backup, it’s makes much more sense to just attach the VHD file to your PC rather than restoring the backup, which will wipe your machine clean first.
In this article, I’m going to talk about how you can attach this VHD file to your computer and access the data. I’m also going to talk about how you can create your own VHD file and backup whatever data you like. Lastly, you can read my previous post on how to convert your current PC into a VHD file.
Mount VHD File
To mount a VHD in Windows, you have to open Computer Management by clicking on Start and typing in Computer Management in the search box. You can also go to Control Panel, then System and Security, then click on Administrative Tools and then click on Computer Management. If you’re in icon view, just click on Administrative Tools.
Now click on Disk Management in the left hand menu and wait for the list of drives and partitions to show up. Next, right-click on Disk Management and choose Attach VHD.
In the dialog box, go ahead and click Browse, navigate to the location of the VHD file that you want to mount and then click OK. Note that unless you check the Read-only box, you can add, modify or delete files/folders from the virtual hard drive. This is really useful because you can attach your VHD file, add some more data that you want backed up and then simply detach it.
Once it has finished mounting, you will see it display as another Basic disk that is colored a light blue. Windows should automatically give it a drive letter, but if not, you can right-click on the part at the bottom where it says Healthy (Primary Partition) and choose Change Drive Letter and Paths.
Once your VHD is attached, go to Explorer and you’ll be able to browse the disk, copy data back and forth, etc.
To detach the VHD, right-click on the grey area that has the disk name (Disk 2 in my case), volume type (Basic), size, etc. You’ll see the option Detach VHD at the bottom.
Create VHD File
As I already mentioned, you can convert your current Windows machine into a VHD file using a free tool from Microsoft or you can create an empty one from within Windows. Again, go to Computer Management, click on Disk Management and then right-click on Disk Management.
Instead of choosing Attach VHD, click on Create VHD. This will bring up a window where you can specify the size of the VHD file, the format and the location.
I recommend choosing the VHDX file format since it is less prone to corruption and can support larger disk sizes. If you choose VHD file format, it will recommend Fixed size. If you go with VHDX, it will recommend Dynamically expanding. I would leave those settings with the recommended options. Make sure to type in a value for the size of your virtual disk. You can change it to GB or TB if you like using the drop down.
Now in Disk Management, you will see another disk (Disk 2 in my case) that says Not Initialized and Unallocated. In the grey section for the new virtual disk, right-click and choose Initialize Disk.
Next, you’ll have to pick whether you want to use MBR or GPT. For a full explanation of each partition format, check out this post by HTG. For compatibility with versions of Windows older than Vista, choose MBR. For newer features and bigger hard disks, use GPT.
Now right-click in the white area that says Unallocated and choose New Simple Volume. This will bring up the new volume wizard. First, you have to choose the size of the new volume. It doesn’t have to be the full size of the unallocated space. You can create multiple partitions if your VHD is larger.
Click Next and choose a drive letter to assign to the partition.
Lastly, choose how you want to format the drive. By default, it is set to NTFS, but you can also choose FAT32 if you like. I recommend sticking with NTFS if you are using the virtual hard drive to backup files from your computer.
Click Next and Finish and you’re done. Now the drive should show up as healthy in Disk Management.
Now you can simply copy data to the drive normally and then detach the VHD when you are done. It’s not the only way or necessarily the best way to backup your computer, but it works well and it doesn’t require any third-party tools. If you have any questions, feel free to comment. Enjoy!