创建重复 Virtual PC 映像的更快方法?
我使用 Virtual PC 创建新的环境来测试我的安装程序。 但我肯定做错了什么,因为内置 Vista 或 XP 的 VPC 映像占用了大约 15GB 的磁盘空间(包括其中安装的 VS2005/S2008)。
为了创建新副本进行测试,我复制并粘贴了包含 .vhd、.vmc 和 .vsv 文件的文件夹。 使用新的 VPC 映像进行测试后,我删除了复制的文件夹。 这可行,但每次复制 15GB 需要很长时间。 有没有更快/更有效的方法?
I use Virtual PC to create fresh environments for testing my installer. But I must be doing something wrong because a VPC image with Vista or XP inside is taking around 15GB of disk space (that includes VS2005/S2008 installed in them).
To create a new copy for testing I copy and paste the folder that has the .vhd, .vmc and .vsv files inside. After using the new VPC image for testing I then delete that copied folder. This works but it takes a looong time to copy 15GB each time. Is there some faster/more efficent approach?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
另一种选择:您可以使用 Microsoft 的 ImageX 以 WIM 格式存储 VHD。 如果您有多个经常重复使用的映像,那么这是管理虚拟机的一种令人难以置信的方式。 我有大量以压缩 WIM 格式保存的 Windows XP 和 2003 映像。
您可以通过将 VM 安装在 Windows PE 中然后将其捕获到网络驱动器来捕获 VM。
Another option: you can use Microsoft's ImageX to store VHDs in WIM format. If you have multiple images you are constantly reusing, this is an incredible way to manage VMs. I have a slew of Windows XP and 2003 images I keep in compressed WIM format.
You can capture the VMs by mounting them in Windows PE and then capturing them to a network drive.
另外,你提到了剪切& 粘贴,这不是在 Windows 中复制大量数据的最佳方法。 至少使用xcopy,robocopy甚至更快。
Also, you mentioned cut & paste, this is not the best way to be copying large amounts of data within windows. At least use xcopy, robocopy is even faster.
此外,如果您希望复制映像以在其他真实计算机上使用,则还有另一种选择,您可以将磁盘转换为动态扩展磁盘,这将减少虚拟磁盘的大小,使其更易于复制。 这还允许更快速的备份,这看起来是您的测试默认执行的操作的一部分。 动态磁盘的问题是它们的性能往往比固定大小的磁盘稍慢。
但是,如果您所做的只是使用它在同一台计算机上进行测试,请参阅上面的答案。 差异化才是出路。
Also, another option if you are looking to duplicate the images for use on other real machines, you can convert the disk to a dynamically expanding disk which will reduce the size of the vdisk making it easier to copy. This also allows for a more rapid backup, which looks to be part of what your testing does by default. The problem with dynamic disks is they tend to be slightly slower performance wise than fixed-size disks.
However, if all you are doing is using it for testing on the same machine, see the answers above. Differencing is the way to go.
使用差异/撤消磁盘。 这意味着当您关闭 VPC 时,系统会询问您是否要保存更改,只需回答“否”,您就会回到开始的位置。
Use differencing/undo disks. This means when you shut down your VPC you'll be asked if you want to save changes, simply answer no and you'll be back to where you started.
VirtualPC没有假写/快照模式吗? 这样,它根本不应该写入您的原始磁盘,除非您在会话结束时这么说。
如果没有,您可能会认真考虑 VMWare 或 VirtualBox,因为它们确实具有此功能,并且对于此类事情非常有用。
编辑:看起来 VPC 确实有一个称为差异磁盘的功能。 看看这个:
http://www.andrewconnell.com/blog/articles/UseVirtualPCsDifferencingDisksToYourAdvantage.aspx
Doesn't VirtualPC have a fake-write/snapshot mode? That way it should not write to your original disk at all unless you say so at the end of the session.
If it doesn't, you might seriously want to consider VMWare or VirtualBox as these do have this feature and it's REALLY useful for things like this.
Edit: it looks like VPC does have a feature like this called differencing disks. Have a look at this:
http://www.andrewconnell.com/blog/articles/UseVirtualPCsDifferencingDisksToYourAdvantage.aspx
VPC 有一个所谓的撤消磁盘。 您创建类似于“恢复点”的 sg,并且在 vpc 中您可以回滚到该版本。 非常适合测试设置。
VPC has a so called undo disk. you create sg similar like "restore point" and in vpc you can roll back to that version. ideal for testing setups.
听起来您需要使用不同的虚拟硬盘,而不是每次都创建一个新副本。
说明此处
Sound like you need to use differencing virtual hard disks rather than creating a new copy every time.
Instructions here