가상머신에서도 VT-D를 활성화 시키기 위한 중첩가상화.. 

모듈에서 netsted 활성화 시키기

 

# vi /etc/modprobe.d/kvm-nested.conf
options kvm_intel nested=1
options kvm_intel enable_shadow_vmcs=1
options kvm_intel enable_apicv=1
options kvm_intel ept=1

 

이후에 모듈을 다시 활성화 시킨 후 활성화 되었는지 확인

# modprobe -r kvm_intel 
# modprobe kvm_intel

 

# cat /sys/module/kvm_intel/parameters/nested
Y

해당 domain의 xml 파일 수정 또는 virt-manager를 통해 vm에 가상화 지원하게 변경

 

1. cpu mode를 'host-passthrough' 또는 'host-model'로 변경

[root@localhost ~]# virsh edit test

<domain type='kvm'>
  <name>test</name>
  <uuid>458241a2-cd87-46a8-bd48-92722459d92d</uuid>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
<중략>

 

 

  <cpu mode='host-passthrough'>        // 또는   <cpu mode='host-model'>

<중략>

 

2. cpu 항목에 vmx 또는 svm 항목을 추가 시킴

[root@localhost ~]# virsh edit test

<domain type='kvm'>
  <name>test</name>
  <uuid>458241a2-cd87-46a8-bd48-92722459d92d</uuid>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
<중략>

  <cpu mode='custom' match='exact'>

    <feature policy='require' name='vmx'/>       // 추가

<중략>

 

 

 

참고 항목 : http://libvirt.org/format.html

 

vm을 가동후 가상머신을 지원하는지 확인, 가상화를 지원하는 경우 결과물이 core갯수만큼 출력, 지원안 할 경우 아무것도 나오지 않음

# cat /proc/cpuinfo | egrep '(vmx|svm)' 

[root@localhost /]# cat /proc/cpuinfo | egrep '(vmx|svm)'
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc rep_good unfair_spinlock pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm xsaveopt fsgsbase bmi1 avx2 smep bmi2 erms invpcid
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc rep_good unfair_spinlock pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm xsaveopt fsgsbase bmi1 avx2 smep bmi2 erms invpcid
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc rep_good unfair_spinlock pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm xsaveopt fsgsbase bmi1 avx2 smep bmi2 erms invpcid
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc rep_good unfair_spinlock pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm xsaveopt fsgsbase bmi1 avx2 smep bmi2 erms invpcid
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc rep_good unfair_spinlock pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm xsaveopt fsgsbase bmi1 avx2 smep bmi2 erms invpcid
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc rep_good unfair_spinlock pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm xsaveopt fsgsbase bmi1 avx2 smep bmi2 erms invpcid

 

'virtualization' 카테고리의 다른 글

esxi 6 드라이버 업그레이드  (0) 2016.11.30
spice 설정 자료  (0) 2016.02.01
PCI passthrough on KVM  (0) 2015.08.07
kvm 설치 centos  (0) 2015.04.03
CentOS 6, KVM에 guest OS bridge 네트워크 설정법  (0) 2015.04.03

+ Recent posts