虚拟机嵌套kvm/vmware

虚拟机嵌套kvm/vmware

参考文档:
http://www.vpsee.com/2012/09/how-to-run-kvm-nested-vms-on-kvm/
http://www.vpsee.com/?s=kvm+on+kvm
http://www.vpsee.com/2012/02/how-to-run-kvm-nested-vms-on-vmware-esxi/
http://zhumeng8337797.blog.163.com/blog/static/100768914201293195720840/?


kvm嵌套(kvm_intel, kvm_amd)
CentOS6.5 x64默认不支持kvm虚拟机嵌套,CentOS 7内核升级为3.10默认就支持。以kvm_intel为例,amd CPU也是调相同参数。
[root@test ~]# lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID:    CentOS
Description:    CentOS Linux release 7.0.1406 (Core)
Release:    7.0.1406
Codename:    Core
[root@test ~]# uname -a
Linux test 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@test ~]# lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    2
Core(s) per socket:    2
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 60
Model name:            Intel(R) Core(TM) i3-4150 CPU @ 3.50GHz
Stepping:              3
CPU MHz:               3500.410
BogoMIPS:              6995.36
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              3072K
NUMA node0 CPU(s):     0-3
修改kvm_intel内核模块参数nested N ==>Y
https://docs.openstack.org/developer/devstack/guides/devstack-with-nested-kvm.html
[root@test ~]# cat /sys/module/kvm_intel/parameters/nested
N
[root@test ~]# echo 'options kvm-intel nested=1' >>/etc/modprobe.d/kvm_nested.conf
[root@test ~]# modprobe -r kvm-intel
[root@test ~]# modprobe kvm-intel
[root@test ~]# cat /sys/module/kvm_intel/parameters/nested
Y
针对要嵌套的虚拟机,在控制台将物理CPU的属性copy给该虚拟机,按钮“Copy host CPU configuration",以支持虚拟机嵌套。
虚拟机嵌套kvm/vmware



VMware ESXi 5.0
VMware ESXi 5.0 默认情况下不支持嵌套虚拟,需要修改配置文件/etc/vmware/config,添加如下行
vhv.allow = "TRUE"后重启ESXi,并将虚拟机类型调整为VMware ESXi5.x


VMware Fusion8.0
虚拟机嵌套kvm/vmware
Mac Pro通过VMware Fusion跑CentOS 7,再在CentOS 7里跑KVM


VMware Workstation
Step by Step installation of KVM / RHEVH 3.0 inside VMware Workstation 8.0 - zhuzhu - 五事九思 (大连Linux主机维护)

自定义安装虚拟机设置完成后,虚拟修改foo.vmx这个配置文件件,Kernel panic - not syncing: Attempted to kill init!
CPU支持VT及电源管理   apic.xapic.enable = FALSE
SAS硬盘支持 scsi0.virtualDev = "Isisas1068"
修改完成后也要重新启动VMware Workstation

转载于:https://www.cnblogs.com/lixuebin/p/10814456.html

你可能感兴趣的:(虚拟机嵌套kvm/vmware)