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

Booting  Hyper-V and VMWare on the Same Headless Machine Print E-mail
General 
Written by Darwin Sanoy   
Thursday, May  6, 2010  3:34am
  
Share on email Share  on favorites Share on print Share on twitter Share  on twitthis Share on digg Share  on technorati Share on linkedin Share on igoogle Share  on googlebuzz Share on google Share 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.

Like this  script?  Subscribe to our newsletter (without loosing your place in this  article).
captcha  
(Please  ensure that the confirmation email clears your spam filter so that you will see  future mailings.)    

  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:
Download this file (HyperVBootControl.zip)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

你可能感兴趣的:(在同一台机器使用Hyper-v和VMWare)