最近开发 XP 程序, 我的机器运行 Windows 7 64Bit 和要部署的机器差别很大。所以安装了一个XP Mode 虚拟机。为测试兼容性,需要同时安装 Visual C++ 6.0、Visual Studio 2005,由于这两个都是Visual C++同时安装有冲突,所以想同时安装在两个不同的XPMode虚拟机上。但是微软的原始安装程序只支持一个XP虚拟机。网上查了一下资料,安装两个XPMode拷贝非常简单。
http://www.sevenforums.com/virtualization/19604-how-copy-virtual-xp-machine.html
按上述操作,很方便。
1. 复制相关文件拷贝,一般只需要 vhd vmc vmcx 三种类型即可。
2. 修改 vmc 配置文件,主要是修改 虚拟磁盘影射文件地址(新的虚拟磁盘文件)和虚拟网卡mac地址,防止冲突。
3. 修改 vmcx 入口文件。这样可以在 “ Windows Virtual PC ” 文件夹中显示
注意:所有这些都需要关闭XPMode虚拟机的前提才能实现。
非常好用的功能,一点不怕部署测试机器冲了目标机,省却了重新安装系统的麻烦,再折腾也不怕!
备注:虚拟机精确调整分辨率很不方便,可以在下面修改
C:\Users\yourname\AppData\Local\Microsoft\Windows Virtual PC\虚拟机\Windows XP Mode yourname.vmc
查找下面红色部分
<ui_options>
<onclose_showmessage type="boolean">true</onclose_showmessage>
<onclose_defaultaction type="string">save</onclose_defaultaction>
<cred_id type="string">VirtualXP-99884</cred_id>
<dynamicdrives_redirection type="boolean">true</dynamicdrives_redirection>
<share_drives type="string">*</share_drives>
<audio_redirect type="boolean">false</audio_redirect>
<vxp_setup_complete type="boolean">true</vxp_setup_complete>
<guest_rail_enabled type="boolean">true</guest_rail_enabled>
<window_xpos type="integer">9</window_xpos>
<window_ypos type="integer">32</window_ypos>
<full_screen type="boolean">false</full_screen>
<resolution_height type="integer">750</resolution_height>
<resolution_width type="integer">1416</resolution_width>