virtualization--nested kvm
2015-06-17 23:58
330 查看
源网址:http://www.server-world.info/en/note?os=CentOS_6&p=kvm&f=13
Configure nested KVM. It's possible to install KVM and create virtual machines as nested KVM on KVM host.
KVM嵌套配置,可以在安装KVM后,在KVM主机中创建虚拟机实现KVM嵌套。
1、The Kernel of CentOS 6 is 2.6.32 and it does not support Nested KVM, so it's necessarry to update to supported Kernel for Nested KVM first.\
CentOS6是一个2.6.32版本的内核。它不支持KVM嵌套,因此在进行嵌套配置前,先硬升级内核到支持KVM嵌套版本。
[root@dlp ~]#yum -y install centos-release-xen
[root@dlp ~]#sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/CentOS-Xen.repo
[root@dlp ~]#yum --enablerepo=Xen4CentOS -y update kernel
[root@dlp ~]#vi /boot/grub/grub.conf
# add at the end of the line of kernel like follows
在kernel行最后添加如下内容:
kernel /vmlinuz-3.4.61-9.el6.centos.alt.x86_64 ro root=/dev/mapper/VolGroup-lv_root
rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16
crashkernel=auto console=ttyS0,115200n8 rd_LVM_LV=VolGroup/lv_root
KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
kvm-intel.nested=1
[root@dlp ~]#reboot
# confirm status ( it's OK if it is "Y" )
[root@dlp ~]#cat /sys/module/kvm_intel/parameters/nested
Y
2、Make sure the CPU model on your computer.
检查你的计算机CPU型号
[root@dlp ~]#virsh capabilities | egrep "/model|/vendor"
<model>SandyBridge</model>
# CPU Model
<vendor>Intel</vendor>
# CPU Vendor
<model>none</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.
如果你希望按如下方式嵌套就编辑虚拟机的配置文件,正确配置KVM嵌套后,你可以在虚拟机中嵌套创建一个虚拟机。
[root@dlp ~]#virsh edit www
# edit a virtual machine "www"
# add following lines
<cpu mode='custom' match='exact'>
# CPU model
<model fallback='allow'>SandyBridge</model>
# CPU vendor
<vendor>Intel</vendor>
<feature policy='require' name='vmx'/>
</cpu>
Configure nested KVM. It's possible to install KVM and create virtual machines as nested KVM on KVM host.
KVM嵌套配置,可以在安装KVM后,在KVM主机中创建虚拟机实现KVM嵌套。
1、The Kernel of CentOS 6 is 2.6.32 and it does not support Nested KVM, so it's necessarry to update to supported Kernel for Nested KVM first.\
CentOS6是一个2.6.32版本的内核。它不支持KVM嵌套,因此在进行嵌套配置前,先硬升级内核到支持KVM嵌套版本。
[root@dlp ~]#yum -y install centos-release-xen
[root@dlp ~]#sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/CentOS-Xen.repo
[root@dlp ~]#yum --enablerepo=Xen4CentOS -y update kernel
[root@dlp ~]#vi /boot/grub/grub.conf
# add at the end of the line of kernel like follows
在kernel行最后添加如下内容:
kernel /vmlinuz-3.4.61-9.el6.centos.alt.x86_64 ro root=/dev/mapper/VolGroup-lv_root
rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16
crashkernel=auto console=ttyS0,115200n8 rd_LVM_LV=VolGroup/lv_root
KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
kvm-intel.nested=1
[root@dlp ~]#reboot
# confirm status ( it's OK if it is "Y" )
[root@dlp ~]#cat /sys/module/kvm_intel/parameters/nested
Y
2、Make sure the CPU model on your computer.
检查你的计算机CPU型号
[root@dlp ~]#virsh capabilities | egrep "/model|/vendor"
<model>SandyBridge</model>
# CPU Model
<vendor>Intel</vendor>
# CPU Vendor
<model>none</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.
如果你希望按如下方式嵌套就编辑虚拟机的配置文件,正确配置KVM嵌套后,你可以在虚拟机中嵌套创建一个虚拟机。
[root@dlp ~]#virsh edit www
# edit a virtual machine "www"
# add following lines
<cpu mode='custom' match='exact'>
# CPU model
<model fallback='allow'>SandyBridge</model>
# CPU vendor
<vendor>Intel</vendor>
<feature policy='require' name='vmx'/>
</cpu>
相关文章推荐
- Linux下三大免费桌面虚拟机评测
- convert(一)—— 部署managed
- convirt(二)—— 创建第一台虚机
- css实现多嵌套列表项
- 搭建CloudStack
- 迁移 VMware 虚拟机到 KVM
- 一、免费KVM_Input Director帮你用一套键盘鼠标操作多台电脑
- 二、免费KVM_Input Director帮你用一套键盘鼠标操作多台电脑
- Centos 5.8 安装KVM虚拟机学习笔记
- kvm的网络配置 NAT方式
- KVM网络配置 Bridge方式
- VPS虚拟化架构介绍与参考
- rhel6.1 kvm安装virtio驱动
- KVM虚拟机的安装和使用方法
- 独立服务器使用IPMI安装系统图文教程
- 实体机关闭后再启动,kvm中虚拟机无法启动的问题
- 在 CentOS 上安装和配置 KVM
- KVM分布式共享存储解决方案-sheepdog
- 一些关于KVM的实践原创文章
- KVM 虚拟机在 IBM System x 上应用_图文详解桥接网络配置