nested hardware-assisted virtualization

2023-05-16

一.nested kvm

Configure nested KVM. It's possible to install KVM and create virtual machines as nested KVM on KVM host.

1.CentOS7

(1)Enable the setting for Nested KVM.

[root@dlp ~]# 
vi /etc/modprobe.d/kvm-nested.conf
# create new

options kvm_intel nested=1
[root@dlp ~]# 
modprobe -r kvm_intel 
# unload

[root@dlp ~]# 
modprobe kvm_intel 
# reload again

[root@dlp ~]# 
cat /sys/module/kvm_intel/parameters/nested 

Y
# just enabled

(2)Edit the configuration of a virtual machine you'd like to set nested like follows.It's OK to configure nested KVM and you can create virtual machines on the virtual machine nested.
[root@dlp ~]# 
virsh edit centos7
# edit a virtual machine "centos7"
# change like folows for "cpu mode" section

<cpu mode='
host-passthrough
'>

2.Ubuntu14.04LTS

(1)Make sure the current settings for Nested KVM and change it if needed.
# show the current setting ( if the result is "Y", it's OK )

root@dlp:~# 
cat /sys/module/kvm_intel/parameters/nested 

Y
# if the result is "N", change like follows and reboot the system )

[root@dlp ~]# 
echo 'options kvm_intel nested=1' >> /etc/modprobe.d/qemu-system-x86.conf
(2)Make sure the CPU model on your computer.
[root@dlp ~]# 
virsh capabilities | egrep "/model|/vendor" 

<model>Westmere</model>
# CPU model

<vendor>Intel</vendor>
# CPU vendor

<model>apparmor</model>
<model>dac</model>
(3) Edit the configuration of a virtual machine you'd like to nest like follows. It's OK to configure nested KVM and you can create virtual machines on the virtual machine nested.
[root@dlp ~]# 
virsh edit www
# edit a virtual machine "www"
# add following lines

<cpu mode='custom' match='exact'>
  
# CPU model

  <model fallback='allow'>Westmere</model>
  
# CPU vendor

  <vendor>Intel</vendor>
  <feature policy='require' name='vmx'/>
</cpu>

二.Vmware Virtualized HV

Most hypervisors require hardware-assisted virtualization (HV). VMware products require hardware-assisted virtualization for 64-bit guests on Intel hardware. When running as a guest hypervisor, VMware products also require hardware-assisted virtualization for 64-bit guests on AMD hardware.  The hardware-assisted virtualization features of the physical CPU are not typically available in a VM, because most hypervisors (from VMware or others) do not virtualize HV. However, Workstation 8, Player 4, Fusion 4, and ESXi 5.0 (or later) offer virtualized HV, so that you can run guest hypervisors which require hardware-assisted virtualization.

 

With virtualized HV enabled for the outer guest, you should be able to run any guest hypervisor that requires hardware-assisted virtualization. In particular, this means that you will be able to run 64-bit nested guests under VMware guest hypervisors. 

ESXi 6.0

Virtualized HV is fully supported for virtual hardware version 9 or later VMs on hosts that support  Intel VT-x and EPT or AMD-V and RVI. To enable virtualized HV, use the web client and navigate to the processor settings screen. Check the  box next to  "Expose hardware-assisted virtualization to the guest operating system."  This setting is not available under the traditional C# client.

Workstation 11 / Player 7 / Fusion 7

Virtualized HV is fully supported for virtual hardware version 9 or later VMs on hosts that support Intel VT-x and EPT or AMD-V and RVI. To enable virtualized HV, select VM->Settings and navigate to the processor settings screen. Check the box next to  "Virtualize Intel VT-x/EPT or AMD-V/RVI."

Workstation 10 / Player 6 / Fusion 6

Virtualized HV is fully supported for virtual hardware version 9 or 10 VMs on hosts that support Intel VT-x and EPT or AMD-V and RVI. To enable virtualized HV, select VM->Settings and navigate to the processor settings screen. Check the box next to  "Virtualize Intel VT-x/EPT or AMD-V/RVI."

ESXi 5.5

Virtualized HV is fully supported for virtual hardware version 9 or 10 VMs on hosts that support  Intel VT-x and EPT or AMD-V and RVI. To enable virtualized HV, use the web client and navigate to the processor settings screen. Check the  box next to  "Expose hardware-assisted virtualization to the guest operating system."  This setting is not available under the traditional C# client.

Workstation 9 / Player 5 / Fusion 5

Virtualized HV is fully supported for virtual hardware version 9 VMs on hosts that support Intel VT-x and EPT or AMD-V and RVI. To enable virtualized HV, select VM->Settings and navigate to the processor settings screen. Check the box next to  "Virtualize Intel VT-x/EPT or AMD-V/RVI."

ESXi 5.1

Virtualized HV is fully supported for virtual hardware version 9 VMs on hosts that support  Intel VT-x and EPT or AMD-V and RVI. To enable virtualized HV, use the web client and navigate to the processor settings screen. Check the  box next to  "Expose hardware-assisted virtualization to the guest operating system."  This setting is not available under the traditional C# client.

Workstation 8 / Player 4

Virtualized HV is available for virtual hardware version 8 VMs on hosts that support Intel VT-x and EPT or AMD-V and RVI. To enable virtualized HV, select VM->Settings and navigate to the processor settings screen. Check the box next to "Virtualize Intel VT-x/EPT or AMD-V/RVI."  You will see a warning that virtualized HV will make this VM incompatible with other VMware products. In particular, if this VM is moved to an ESXi 5.0 host, virtualized HV will not be available without additional tweaking.

Fusion 4

Virtualized HV is available for virtual hardware version 8 VMs on hosts that support Intel VT-x and EPT or AMD-V and RVI, but it cannot be selected through the user interface. To enable virtualized HV, edit the outer guest's configuration file by hand and add the following line:

vhv.enable = TRUE

ESXi 5.0

On ESXi 5.0, virtualized HV is prohibited by default. This feature is used internally within VMware for testing purposes, but it is not recommended for production systems. It is available on hosts that support Intel VT-x or AMD-V, but it is not recommended for systems without second level address translation (EPT or RVI), because of its poor performance without SLAT. Unfortunately, this feature does not work on AMD "Bulldozer" CPUs running ESXi 5.0.

 

To allow the use of this feature, the ESXi administrator must add the following configuration option to the /etc/vmware/config file on the physical host:

vhv.allow = TRUE

Once allowed by the ESXi administrator, virtualized HV will be enabled by default for all hardware version 8 VMs with guest OS type "ESX Server 4" and "ESX Server 5." To enable virtualized HV for other guests, add the following lines to the outer guest's configuration file:

cpuid.1.ecx="----:----:----:----:----:----:--h-:----"
cpuid.80000001.ecx.amd="----:----:----:----:----:----:----:-h--"
cpuid.8000000a.eax.amd="hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh"
cpuid.8000000a.ebx.amd="hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh"
cpuid.8000000a.edx.amd="hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh"

references:http://www.server-world.info/en/note?os=CentOS_7&p=kvm&f=7
  http://www.server-world.info/en/note?os=Ubuntu_14.04&p=kvm&f=8
  https://communities.vmware.com/docs/DOC-8970

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

nested hardware-assisted virtualization 的相关文章

  • PHP - 从 MySQL 数据创建嵌套数组

    我有一些数据存储在表中 如下所示 id parent id name 1 0 Entry 1 2 0 Entry 2 3 0 Entry 3 4 1 Child of entry 1 我想将它变成一个嵌套数组 如下所示 array arra
  • 切换列表字典中的键和值

    大家好 Stackoverflow 我有一个嵌套字典 其中列表作为值 我想创建一个字典 其中所有列表条目都将其相应的键作为值 举例时间 what I have dict1 A 1 2 3 B 4 5 6 C 7 8 9 what I wan
  • Hadoop MapReduce 提供嵌套目录作为作业输入

    我正在从事一项处理嵌套目录结构的工作 其中包含多个级别的文件 one three four baz txt bleh txt foo txt two bar txt gaa txt 当我添加one 作为输入路径 不会处理任何文件 因为没有文
  • 列表理解创建嵌套列表

    我想创建每月天数列表每年列表的嵌套列表 31 29 31 30 31 28 31 30 with mm 1 2 3 4 yy 2012 2013 但我的代码 result append calendar monthrange y m 1 f
  • 如何从嵌套列中提取 json 到数据帧

    我正在从 TD Ameritrade API 中提取股票数据 并且希望将其存储在 DataFrame 中 从 API 中 我得到一个嵌套的 JSON 对象 当我将其放入数据框中时 我得到 4 列 索引 蜡烛 空 符号 然而 蜡烛内部是一个字
  • 展平数据框

    我有这个嵌套数据框 test lt structure list id c 13 27 seq structure list 1 c 1997 1997 1997 2007 2 c 2007 2007 2007 2007 2007 2007
  • Verilog 中的 If 语句和分配连线

    我试图弄清楚基于组合逻辑分配电线的基础知识 I have wire val wire x wire a wire b always begin if val 00 I want to assign x a if val 01 I want
  • AutoMapper:将子集合 1 映射到子集合 2 时丢失未映射的属性值

    使用 AutoMapper 映射嵌套集合时 我希望任何未映射的属性都保留其原始值 相反 它们被设置为 null Example 我有这四门课 注意Test2Child有Name财产 同时Test1Child才不是 public class
  • 带有子元素的 Solr 文档?

    是否可以以某种方式创建包含子元素的 solr 文档 例如 我将如何表示这样的事情
  • 内容页是否可以使用其母版页的母版父级的 ContentPlaceHolderID(嵌套母版页)

    我有一个 3 级嵌套母版页和一个内容页 parent1 是顶级父级 parent2 是parent3 的父级 parent3 是内容页的父级 我收到错误 Cannot find ContentPlaceHolder xxx 其中 xxx 是
  • Pyparsing - 匹配最外面的一组嵌套括号

    我正在尝试使用 pyparsing 构建一个解析器 该解析器将匹配任意嵌套的括号内的所有文本 如果我们考虑这样的字符串 A B C D E F G Random Middle text H I J 我想要的是解析器以返回两个匹配的方式进行匹
  • 在 Python 中使用多个列表的 For 循环[重复]

    这个问题在这里已经有答案了 我正在寻找解决我的问题的方法 目前我有两个元素列表 column width 3 3 6 8 4 4 4 4 fade 100 200 300 我想要实现的是创建 for 循环 它将给出以下输出 column 3
  • 嵌套字典理解python

    我无法理解 Python 3 中的嵌套字典推导式 我从下面的示例中得到的结果输出了正确的结构 没有错误 但只包含内部键 值对之一 我还没有找到像这样的嵌套字典理解的例子 谷歌搜索 嵌套字典理解 python 显示遗留示例 非嵌套理解或使用不
  • 在 Python 中解压嵌套的 C 结构

    我正在尝试解压一个 C 结构 该结构以二进制形式传递给我的 Python 程序 并包含另一个嵌套结构 C 标头的相关部分如下所示 typedef struct uint8 t seq uint8 t type uint16 t flags
  • Python 中的嵌套函数如何工作?

    def maker n def action x return x n return action f maker 2 print f print f 3 print f 4 g maker 3 print g 3 print f 3 st
  • 在“无头模式”下运行虚拟操作系统意味着什么?

    我已经听到很多关于新版本的 VMWare Fusion 如何以 无头模式 运行虚拟操作系统的信息 谷歌搜索清楚地表明其他虚拟化产品也具有类似的功能 但是 我无法找到这实际上意味着什么的很好的描述 当你这样做时会发生什么 无头模式意味着虚拟机
  • 如何在 jinja2 中缩进嵌套的 if/for 语句

    我有一个很长的 Jinja2 模板 其中有很多嵌套if for声明 很难读 我想缩进 位 使其更清晰 但是 如果我这样做 这些块的内容也会进一步缩进 我怎样才能缩进just the bits 我正在使用安塞布尔 重现步骤 template
  • 硬件线程与软线程?

    我读过 在多核处理器中 每个核心包含 2 个硬件线程 例如在双核处理器中 有 4 个硬件线程正在运行 现在 如果我在 Java 中创建 2 个线程 这些线程是否会映射到 2 个硬件线程 或者这 2 个 Java 线程由特定核心的单个硬件线程
  • 检测注册表虚拟化

    我有一组 C v2 应用程序 并且在 Win7 以及较小程度上的 Vista 中的注册表虚拟化方面遇到了困难 我有一个共享注册表配置区域 我的应用程序需要在 HKLM Software Company 中访问该区域 在 Vista 之前 所
  • 嵌套控件结构 - 使用 XAML 还是 C#?

    我想创建一个由相当多的元素组成的结构 它的基本布局如下

随机推荐