在同一台機器使用Hyper-v和VMWare

來源:互聯網
上載者:User

Booting  Hyper-V and VMWare on the Same
Headless Machine
General 
Written by Darwin Sanoy   
Thursday, May  6, 2010  3:34am
  

Share
on email
Share  on favoritesShare
on printShare
on twitterShare 
on twitthisShare
on diggShare 
on technoratiShare
on linkedinShare
on igoogleShare 
on googlebuzzShare
on googleShare
on stumbleupon

More
Sharing Services

This week I built a virtualization server on the cheap.  I wanted to be  able to test with both Hyper-V and VMware workstation on the same  configuration.  However, once you add the Hyper-V server role, the parent  partition becomes virtualized as well. 
VMWare Workstation detects this  situation and simply shows an abort message.

I found
this excellent article that tells of how to create a boot  option to turn off Hyper-V.    If you do not disable Hyper-V then  VMWare Workstation gives the error “VMware Workstation and Hyper-V are not  compatible.  You must remove the Hyper-V role from
your system to run  VMware Workstation.” when you attempt to start a virtual machine.  Here are  the steps from the above link outlined: 

  1. At the command prompt, type the following:    
    bcdedit /copy  {default} /d "No Hypervisor"
  2. The above command should say: The entry was successfully copied to {guid}.  Copy that guid to the clipboard including the curly braces.
  3. Now, type the following command:    
    bcdedit /set {guid_hvoff}  hypervisorlaunchtype off
    In the above command, replace {guid_hvoff}  with what you copied in step 2. The above command just sets a property in the  boot entry that will not load the hypervisor on boot.

Now I had just one more problem – the machine I am using will be headless and  in another location.  So how to switch back and forth between the  options?  Here is how to create two shell scripts to swap back and  forth.

  1. In a file called Restart-HyperV-OFF.cmd copy and edit this text:     
    @echo off      
    bcdedit /default {guid_hvoff}       
    echo.       
    echo Press any key to restart or  CTRL-C to cancel      
    pause       
    shutdown /r /t 0 /d  p:0:0
  2. Note that {guid_hvoff} is the same guid that you just copied for the bcdedit  command above.

This shell script can now boot with Hyper-V off.  The only way to know  the guid of the “Hyper-V on” guid is to boot into Hyper-V off and enumerate the  existing guids.

  1. Run Restart-HyperV-OFF.cmd
  2. After the reboot, run the following command:    
    bcdedit  /enum
  3. Find the “Windows Boot Loader” section that has the setting  “hypervisorlaunch  Auto”
  4. Copy the {guid_hvon} from the “identifier” field of the same Windows Boot  Loader section. 
    (Note: If the identifier says “{current}” then you did  not successfully boot into the non-hypervisor boot configuration.)
  5. In a file called Restart-HyperV-ON.cmd copy and edit this text:     
    @echo off      
    bcdedit /default {guid_hvon}       
    echo.       
    echo Press any key to restart or CTRL-C  to cancel      
    pause       
    shutdown /r /t 0 /d p:0:0
  6. Note that you must replace {guid_hvon} with the guid you copied in the  earlier step.

Looks like I will be using VMWare workstation over Hyper-V due to these  factors:

  1. VM Portability (Hyper-V VMs cannot be shared back and forth with Virtual PC  reliably).
  2. VMWare Teams (management of Groups of VMs).
  3. VM Clones.
  4. Ability to do USB pass through to VMs.

And Using VMWare Workstation over ESXi due to:

  1. Storage of VMs on NTFS (I like the freedom to move drives in and out of the  server without moving data and reformatting).
  2. It could not use the integrated NIC on the motherboard - chewing up a  precious PCI slot on a board that only has two.

Attachments:
HyperVBootControl.zip [Scripts for remotely toggling hyper-v startup] 0.6  Kb

PLEASE DO NOT REPOST CONTENT WITHOUT PERMISSION.  Training and Tools to Make Apps Run on Win7 and Virtualization => http://CSI-Windows.com

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.