zoukankan      html  css  js  c++  java
  • 让我心酸的Hyperv虚拟机安装

    前言

    想在自己的windows7系统上搭建hyper-v来创建虚拟机,因为公司有许多现成的VHD文件,直接加载就可以,看同事们都是那么做的。但是后来发现windows7下找不到任何关于hyper-v的程序,在网上找到了这篇文章:

    INSTALLING HYPER-V MANAGER ON WINDOWS 7 按照文中提示我下载了那个补丁并安装,安装过程持续一个多小时,我看完两集big bang才见到这个补丁安装好,在程序中添加hyper-v功能,这样我就能在管理工具中找到“hyper-v管理器”。但是,这只是一个hyper-v管理器而已,是用来连接到其他服务器的,不能在windows7 localhost上安装hyper-v。所以我想在自己的windows7下使用hyper-v创建虚拟机并管理的愿望就失败了。

    接下来我想,既然我的windows7不能装,那么我就用vmware装个windows server 2008的虚拟机,然后widows server 2008下安装hyper-v。最后经历千辛万苦,终于装好了windows server 2008,并且添加了“hyper-v”这个角色。需要注意的是如果要添加在vmware虚拟中添加hyper-v这个功能,必须在processor的选项勾选“Virtualize Intel VT-x/EPT or AMD-V/RVI”,参考How to install Hyper-v inside VMware Workstation 8.0。也可以使用一个securable.exe的工具来检测机器是否支持虚拟化。

    到目前为止,所以都是往好的方向发展的。然后我在hyper-v下创建虚拟机,最后一步我使用现成的VHD文件,而不是创建一个。创建虚拟机完成,但是当我试图启动虚拟的时候,会报如下错误:

    在网上找了资料,发现有人跟我碰到同样的错误,参考:Creating a Virtual Machine with Server 2008 Hyper-V Tools 。最后作者给出的解释是:

    “The reason is actually quite simple and obvious if you think about it – Hyper-V depends on the hardware virtualization support of the underlying Intel or AMD processor. Only one process can control that hardware virtualization in the current iterations of CPUs, therefore a hyper-v child VM can’t possibly have access to the hardware virtualiztion – the hyper-v parent already “owns” it.”

    上面的解释就是,我们在使用vmware创建虚拟机的时候已经使用了cpu的VT,而我们还想再vmware下再次去创建hyper-v的虚拟机,而这个虚拟机也是需要VT的,但是一个cpu只能使用一次VT,所以hyper-v得不到VT,那么就不能连接创建好的hyper-v虚拟机了。这个讨论在 Installing Hyper-V inside VMware Workstation 7 这个帖子上说的很详细。

    主要的摘录:

    摘录1

    VMware workstation, Microsoft Virtual PC and Virtual Server are all type 2 hypervisors, which means they are applications that run inside an ordinary OS. VMware ESX, Xen and Microsoft Hyper-V are type 1 hypervisors, meaning that they are essentially operating systems modified to run other operating systems. Type 1 hypervisors must be installed directly on physical hardware. They cannot be installed inside another virtualization engine.

    摘录2

    To run Hyper-V, you must install it on bare metal, a physical machine. There is no workaround.

    对摘录1的回复

    This isn't 100% correct.  You can run ESX 3.02 on VMware workstation and boot up Virtual Machines.  

    对上面回复的回复

    ESX 3.02 didn't require VT, that's why you could run it, but any modern hypervisor uses VT. (or AMD's equivalent)  VM's don't see VT so you can't run a modern hypervisor in a VM.

    在windows server 2008上安装hyper

    一台电脑如果要装hyper-v虚拟机,必须得CPU支持,所以在安装虚拟机之前,我们需要检测自己的电脑是否支持虚拟化。具体方法参考 快速检测你的系统是否支持Hyper-V

    假如你的cpu可以支持hyper-v,那么接下来就开始安装。但是得注意一点,hyper-v只支持windows server 2008及以后的服务器版本呢,windows7是不带hyper-v功能的,但是win7上可以安装hyper-v管理器,管理器是让我们连接到服务器端的hyper-v虚拟机,但是本身不能创建虚拟机,具体如何在windows7上安装hyper-v管理器可以参考文章:

    INSTALLING HYPER-V MANAGER ON WINDOWS 7

    windows 7在工作组模式下管理 Hyper-V

    Hyper-V Remote Management Configuration Utility

    Installing Hyper-V on Windows 7这个贴子上也讨论了,不能在windows7上安装hyper-v。

     
  • 相关阅读:
    HDU2732 Leapin' Lizards 网络流 最大流 SAP
    POJ1459 Power Network 网络流 最大流
    HDU3718 Similarity KM
    HDU3488 Tour KM
    HDU2853 Assignment KM
    HDU1507 Uncle Tom's Inherited Land* 二分图匹配 匈牙利算法 黑白染色
    POJ1469 COURSES 二分图匹配 匈牙利算法
    HDU4185 Oil Skimming 二分图匹配 匈牙利算法
    POJ3041 Asteroids 二分图匹配 匈牙利算法
    BZOJ2553 [BeiJing2011]禁忌 AC自动机 矩阵
  • 原文地址:https://www.cnblogs.com/xwdreamer/p/2628040.html
Copyright © 2011-2022 走看看