VM与VPC共存(续)
生活随笔
收集整理的這篇文章主要介紹了
VM与VPC共存(续)
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
VM和VPC是大家熟知的虛擬機(jī)軟件了。有人喜歡VM,有人喜歡VPC,蘿卜白菜,各有所愛。 VM優(yōu)點(diǎn):支持USB設(shè)備;虛擬網(wǎng)卡眾多,可以模擬多子網(wǎng)環(huán)境;顯卡驅(qū)動(dòng)要比VPC好,VPC只支持1280*800分辨率以下,我的1366*768無法全屏;VM自帶錄像功能,可以做視頻教學(xué);VM自帶snapshot功能,誤操作時(shí)還可以回滾。 VM缺點(diǎn):跑Windows系統(tǒng)確實(shí)不如VPC占資源小,速度快。 VPC優(yōu)點(diǎn):跑Windows系統(tǒng)確占資源小,速度快,這恐怕是唯一的亮點(diǎn)了。 VPC缺點(diǎn):顯卡驅(qū)動(dòng)在1366*768的分辨率下無法完整的全屏,尤其是對(duì)linux的圖形化支持更是花屏嚴(yán)重;網(wǎng)卡僅僅包含宿主機(jī)的物理網(wǎng)卡和虛擬網(wǎng)卡,有時(shí)候做多子網(wǎng)環(huán)境還得利用loopback網(wǎng)卡,藍(lán)牙網(wǎng)絡(luò),無線網(wǎng)卡等。 所以我一般都是VM和VPC結(jié)合使用,做cluster實(shí)驗(yàn)時(shí)偶爾還用到VS2005。在較早的機(jī)器上做實(shí)驗(yàn)時(shí),因?yàn)闄C(jī)器硬件不支持虛擬化,所以不存在VM和VPC沖突的問題,當(dāng)我新買了一臺(tái)I5的本本后,發(fā)現(xiàn)VM總是和VPC沖突,并且如果同時(shí)打開多個(gè)VPC機(jī)器,還可能導(dǎo)致物理機(jī)藍(lán)屏。 <?xml?version="1.0"?encoding="UTF-16"?> ? <!--?Microsoft?Virtual?Machine?Options?and?Settings?--> ? <preferences> ? ????<version?type="string">2.0</version> ? ????<alerts> ? ????????<notifications> ? ????????????<no_boot_disk?type="boolean">true</no_boot_disk> ? ????????</notifications> ? ????</alerts> ? ????<hardware> ? ????????<memory> ? ????????????<ram_size?type="integer">512</ram_size> ? ????????</memory> ? ????????<pci_bus> ? ????????????<ethernet_adapter> ? ????????????????<controller_count?type="integer">1</controller_count> ? ????????????????<ethernet_controller?id="0"> ? ????????????????????<virtual_network> ? ????????????????????????<id?type="bytes">0EB745BD4AB811E081C895FBFEB63705</id> ? ????????????????????????<name?type="string">Intel(R)?WiFi?Link?1000?BGN</name> ? ????????????????????</virtual_network> ? ????????????????????<ethernet_card_address?type="bytes">0003FF40EB61</ethernet_card_address> ? ????????????????</ethernet_controller> ? ????????????</ethernet_adapter> ? ????????????<video_adapter> ? ????????????????<vram_size?type="integer">8</vram_size> ? ????????????</video_adapter> ? ????????????<ide_adapter> ? ????????????????<ide_controller?id="1"> ? ????????????????????<location?id="0"> ? ????????????????????????<drive_type?type="integer">2</drive_type> ? ????????????????????????<pathname> ? ????????????????????????????<absolute?type="string"?/> ? ????????????????????????????<relative?type="string"?/> ? ????????????????????????</pathname> ? ????????????????????</location> ? ????????????????</ide_controller> ? ????????????????<ide_controller?id="0"> ? ????????????????????<location?id="0"> ? ????????????????????????<drive_type?type="integer">1</drive_type> ? ????????????????????????<pathname> ? ????????????????????????????<absolute?type="string">G:\VPC2007\Lab-CHS\WINXP-PRO-SP3\WINXP-PRO-CHS-SP3.vhd</absolute> ? ????????????????????????????<relative?type="string">.\WINXP-PRO-CHS-SP3.vhd</relative> ? ????????????????????????</pathname> ? ????????????????????????<undo_pathname> ? ????????????????????????????<absolute?type="string">G:\VPC2007\Lab-CHS\WINXP-PRO-SP3\VirtualPCUndo_WINXP-PRO-CHS-SP3_0_0_0_10013408212011.vud</absolute> ? ????????????????????????????<relative?type="string">.\VirtualPCUndo_WINXP-PRO-CHS-SP3_0_0_0_10013408212011.vud</relative> ? ????????????????????????</undo_pathname> ? ????????????????????</location> ? ????????????????</ide_controller> ? ????????????</ide_adapter> ? ????????</pci_bus> ? ????????<standard> ? ????????????<name?type="string">Virtual?PC?2007</name> ? ????????????<version?type="string">0001.0000.0000</version> ? ????????</standard> ? ????????<super_io> ? ????????????<floppy?id="0"> ? ????????????????<pathname> ? ????????????????????<absolute?type="string"?/> ? ????????????????????<relative?type="string"?/> ? ????????????????</pathname> ? ????????????</floppy> ? ????????????<floppy> ? ????????????????<auto_detect?type="boolean">true</auto_detect> ? ????????????</floppy> ? ????????????<parallel_port> ? ????????????????<port_shared?type="boolean">false</port_shared> ? ????????????????<port_type?type="integer">0</port_type> ? ????????????</parallel_port> ? ????????????<serial_port> ? ????????????????<connect_immediately?type="boolean">false</connect_immediately> ? ????????????</serial_port> ? ????????</super_io> ? ????????<bios> ? ????????????<base_board> ? ????????????????<serial_number?type="string">5284-0211-5760-6543-5348-2456-30</serial_number> ? ????????????</base_board> ? ????????????<bios_guid?type="string">{D30B7F05-B995-44E6-A333-64507F56B2AB}</bios_guid> ? ????????????<bios_serial_number?type="string">5284-0211-5760-6543-5348-2456-30</bios_serial_number> ? ????????????<chassis> ? ????????????????<asset_tag?type="string">5284-0211-5760-6543-5348-2456-30</asset_tag> ? ????????????????<serial_number?type="string">5284-0211-5760-6543-5348-2456-30</serial_number> ? ????????????</chassis> ? ????????????<cmos?type="bytes">00004000F020378002FFFF2F00FF3F1000003FFF3F1000003F31004C0707070707E9FFFF208580FF01000000200C01800CFC00000000000000000000000000901A32E252580050E999E62401002784004A2080240000000000085AACFE1032547698BAE400000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000</cmos> ? ????????????<time_bytes?type="bytes">11003900170000210811</time_bytes> ? ????????</bios> ? ????</hardware> ? ????<integration> ? ????????<microsoft> ? ????????????<mouse> ? ????????????????<allow?type="boolean">true</allow> ? ????????????</mouse> ? ????????????<video> ? ????????????????<user_selected> ? ????????????????????<depth?type="integer">16</depth> ? ????????????????????<height?type="integer">480</height> ? ????????????????????<width?type="integer">640</width> ? ????????????????</user_selected> ? ????????????</video> ? ????????</microsoft> ? ????</integration> ? ????<properties> ? ????????<creator> ? ????????????<build?type="string">6.0.156.0</build> ? ????????????<name?type="string">Microsoft?Virtual?PC?2007</name> ? ????????</creator> ? ????????<modifier> ? ????????????<build?type="string">6.0.192.0</build> ? ????????????<name?type="string">Microsoft?Virtual?PC?2007</name> ? ????????</modifier> ? ????</properties> ? ????<settings> ? ????????<shutdown> ? ????????????<prompt?type="boolean">true</prompt> ? ????????????<quit> ? ????????????????<action?type="integer">4</action> ? ????????????????<was_running?type="boolean">true</was_running> ? ????????????</quit> ? ????????????<save> ? ????????????????<enable?type="boolean">true</enable> ? ????????????</save> ? ????????????<shutdown> ? ????????????????<enable?type="boolean">true</enable> ? ????????????</shutdown> ? ????????????<turn_off> ? ????????????????<enable?type="boolean">true</enable> ? ????????????</turn_off> ? ????????????<last_shutdown> ? ????????????????<choice?type="integer">3</choice> ? ????????????????<commit?type="boolean">false</commit> ? ????????????</last_shutdown> ? ????????</shutdown> ? ????????<sound> ? ????????????<sound_adapter> ? ????????????????<enable?type="boolean">true</enable> ? ????????????</sound_adapter> ? ????????</sound> ? ????????<startup> ? ????????????<automatic> ? ????????????????<type?type="integer">2</type> ? ????????????</automatic> ? ????????</startup> ? ????????<undo_drives> ? ????????????<enabled?type="boolean">true</enabled> ? ????????????<purposely_kept?type="boolean">false</purposely_kept> ? ????????????<use_default?type="boolean">true</use_default> ? ????????</undo_drives> ? ????????<video> ? ????????????<disable_resize?type="boolean">false</disable_resize> ? ????????????<full_screen?type="boolean">false</full_screen> ? ????????????<mode> ? ????????????????<full_screen> ? ????????????????????<startup?type="boolean">false</startup> ? ????????????????</full_screen> ? ????????????</mode> ? ????????????<resolutions> ? ????????????????<standard_only?type="boolean">false</standard_only> ? ????????????</resolutions> ? ????????????<height?type="integer">600</height> ? ????????????<left_position?type="integer">151</left_position> ? ????????????<max_height?type="integer">600</max_height> ? ????????????<max_width?type="integer">800</max_width> ? ????????????<top_position?type="integer">62</top_position> ? ????????????<width?type="integer">800</width> ? ????????</video> ? ????????<guest_os?type="integer">3</guest_os> ? ????</settings> ? ????<virtual_machines> ? ????????<hw_assist> ? ????????????<enable_hw_assist?type="boolean">true</enable_hw_assist> ? ????????</hw_assist> ? ????????<allow_packet_filtering?type="boolean">false</allow_packet_filtering> ? ????????<allow_promiscuous_mode?type="boolean">false</allow_promiscuous_mode> ? ????</virtual_machines> ? </preferences>?
?
?
在網(wǎng)上搜索過相關(guān)的問題,大部分的矛頭都指向VPC中的一個(gè)選項(xiàng):但是我將虛擬化功能Disable之后打開VPC還是會(huì)讓正在運(yùn)行的VM出現(xiàn)中斷。
??????? 后來,無意中用UltraEdit(記事本也可)打開vmc文件時(shí),仔細(xì)看了下里面的代碼,代碼并不復(fù)雜。
171.? <enable_hw_assist type="boolean">true</enable_hw_assist>
大家看上面170-172行代碼,原來這臺(tái)虛擬機(jī)一啟動(dòng)就默認(rèn)打開虛擬化開關(guān),即使關(guān)閉了控制臺(tái)的虛擬化開關(guān)也是沒用的。將此項(xiàng)設(shè)置為false后,VPC再也沒有和VM沖突了。 <enable_hw_assist type="boolean">false</enable_hw_assist> 根本原因是宿主機(jī)(物理機(jī))不像WIN2008安裝有hypervisor去調(diào)控虛擬化的硬件資源,所以如果虛擬機(jī)打開虛擬化開關(guān)會(huì)造成硬件資源爭(zhēng)奪的情況,嚴(yán)重時(shí)造成物理機(jī)藍(lán)屏。至此VM與VPC沖突問題從根本上得到解決。
轉(zhuǎn)載于:https://blog.51cto.com/yangye/645652
總結(jié)
以上是生活随笔為你收集整理的VM与VPC共存(续)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: const、static、const s
- 下一篇: asp.net远程调用WebServic