Changes between Version 5 and Version 6 of TipAndDoc/VM/NestedVMM


Ignore:
Timestamp:
Apr 17, 2012 5:58:46 PM (12 years ago)
Author:
mitty
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TipAndDoc/VM/NestedVMM

    v5 v6  
    11[[PageOutline]] 
    22 
    3  = VM on VM = 
    4  == VMware == 
    5  * きちんと設定されていないと次のように表示される[[br]][[Image(vmsvonvmws.png, 33%)]] 
     3 = VMware = 
     4 * VMware製品には、H/W仮想化支援が無くても動作するものがあるため、適切に設定すればNested VMは簡単に実現可能 
     5  * きちんと設定されていないと次のように表示される[[br]][[Image(vmsvonvmws.png, 33%)]] 
    66 
    77 * [http://communities.vmware.com/docs/DOC-8970 VMware Communities: Running Nested VMs] 
     
    7373  > }}} 
    7474 
     75 == H/W 仮想化支援 == 
    7576 * 実用的な実行速度で動かすためのハードウェア条件 
    7677   * Intel VT-x 
     
    9293monitor.virtual_exec = "hardware" 
    9394}}} 
     95 
    9496 === VMware Workstation on Intel VT === 
    9597 * Ubuntu 10.04 lucid on VMware Workstation 7.1.3 with Windows 7 x64 Host 
     
    134136 
    135137 * [http://www.grc.com/securable.htm GRC | SecurAble: Determine Processor Security Features |  ][[br]][[Image(WindowsXPonVM.png, 33%)]] 
     138 
     139 = KVM = 
     140 * KVMはH/W仮想化支援が必須 
     141 
     142 == KVM on KVM == 
     143 * Intel EPT / AMD RVI 対応のCPUが必須 
     144 
     145 * [http://aikotobaha.blogspot.jp/2012/02/kvm-on-kvmnested-kvm.html OSSはアルミニウムの翼で飛ぶ: KVM on KVM(nested KVM)] 
     146 * [http://baalzephon.dyndns.org/tech/index.php?Linux%2FKVM Linux/KVM - PukiWiki Plus!] 
     147 * [http://d.hatena.ne.jp/pochio_pochiyama/20110228/p1 Ubuntu 10.10 で KVM on KVM (nested svm) - それなりに適当にやってます] 
     148 
     149 === Debian 6.0 with kernel backports === 
     150 * 3.x系(3.1以降?)のkernelで無いと、Intel CPUには対応出来ないらしい 
     151 * virt-managerが古いせいか、ゲストの設定ファイル(xml)を直接編集した後、ゲストが起動しなくなった 
     152 
     153 * mitty@walken:~$ lsb_release -a 
     154{{{ 
     155No LSB modules are available. 
     156Distributor ID: Debian 
     157Description:    Debian GNU/Linux 6.0.4 (squeeze) 
     158Release:        6.0.4 
     159Codename:       squeeze 
     160}}} 
     161 * mitty@walken:~$ uname -a 
     162{{{ 
     163Linux walken 3.2.0-0.bpo.2-amd64 #1 SMP Sun Mar 25 10:33:35 UTC 2012 x86_64 GNU/Linux 
     164}}} 
     165 
     166 * mitty@walken:~$ vmware -v 
     167{{{ 
     168VMware Workstation 8.0.2 build-591240 
     169}}} 
     170  * VMwareとのゲスト同時稼働も問題ない模様 
     171 
     172 * mitty@walken:~$ kvm --version 
     173{{{ 
     174QEMU PC emulator version 0.12.5 (qemu-kvm-0.12.5), Copyright (c) 2003-2008 Fabrice Bellard 
     175}}} 
     176 
     177 * mitty@walken:~$ virt-manager --version 
     178{{{ 
     1790.8.4 
     180}}} 
     181 
     182 * mitty@walken:~$ cat /proc/cpuinfo 
     183{{{ 
     184processor       : 0 
     185vendor_id       : GenuineIntel 
     186cpu family      : 6 
     187model           : 30 
     188model name      : Intel(R) Core(TM) i5 CPU         750  @ 2.67GHz 
     189stepping        : 5 
     190microcode       : 0x3 
     191cpu MHz         : 1197.000 
     192cache size      : 8192 KB 
     193physical id     : 0 
     194siblings        : 4 
     195core id         : 0 
     196cpu cores       : 4 
     197apicid          : 0 
     198initial apicid  : 0 
     199fpu             : yes 
     200fpu_exception   : yes 
     201cpuid level     : 11 
     202wp              : yes 
     203flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida dts tpr_shadow vnmi flexpriority ept vpid 
     204bogomips        : 5319.48 
     205clflush size    : 64 
     206cache_alignment : 64 
     207address sizes   : 36 bits physical, 48 bits virtual 
     208power management: 
     209 
     210(snip) 
     211}}} 
     212 
     213 === nested=1 === 
     214 * mitty@walken:~$ modinfo kvm_intel |grep nested 
     215{{{ 
     216parm:           nested:bool 
     217}}} 
     218 * mitty@walken:~$ cat /sys/module/kvm_intel/parameters/nested 
     219{{{ 
     220N 
     221}}} 
     222 
     223 * mitty@walken:~$ sudo vim /etc/modprobe.d/kvm-nested.conf 
     224{{{ 
     225options kvm_intel nested=1 
     226}}} 
     227 
     228 * mitty@walken:~$ sudo modprobe -r kvm_intel 
     229 * mitty@walken:~$ sudo modprobe kvm_intel 
     230 * mitty@walken:~$ cat /sys/module/kvm_intel/parameters/nested 
     231{{{ 
     232Y 
     233}}} 
     234 
     235 * mitty@walken:~$ sudo vim /etc/libvirt/qemu/test.xml 
     236{{{#!diff 
     237--- test.xml    2012-04-17 12:36:32.464246092 +0900 
     238+++ /etc/libvirt/qemu/test.xml  2012-04-17 14:11:45.439356087 +0900 
     239@@ -14,6 +14,17 @@ 
     240     <apic/> 
     241     <pae/> 
     242   </features> 
     243+  <cpu match='exact'> 
     244+    <model>Nehalem</model> 
     245+    <vendor>Intel</vendor> 
     246+    <feature policy='require' name='rdtscp'/> 
     247+    <feature policy='require' name='ss'/> 
     248+    <feature policy='require' name='hypervisor'/> 
     249+    <feature policy='require' name='vme'/> 
     250+    <feature policy='require' name='ds'/> 
     251+    <feature policy='require' name='vmx'/> 
     252+    <feature policy='require' name='acpi'/> 
     253+  </cpu> 
     254   <clock offset='utc'/> 
     255   <on_poweroff>destroy</on_poweroff> 
     256   <on_reboot>restart</on_reboot> 
     257}}} 
     258  * Fedora16のLiveCDでvirt-managerを起動し、下記サイトを参考にGUI上から設定を行った場合に、xmlに書き込まれる差分をそのまま適用してみた 
     259  * うまく起動しない