next up previous contents
Next: Virt-install 安裝啟用 VMX Up: Nested KVM Previous: 設定 Nested KVM   Contents

虛擬機 CPU 增加 VMX

  1. 關閉測試虛擬機 crtusb。
    [root@dyw219 ~]# virsh destroy crtusb
    Domain crtusb destroyed
    
  2. 編輯測試虛擬機 crtusb,增加 CPU 參數。
    [root@dyw219 ~]# virsh edit crtusb
    Domain crtusb XML configuration not changed.
    
    ........
      <cpu mode='custom' match='exact'>
        <model fallback='allow'>Penryn</model>
        <vendor>Intel</vendor>
        <feature policy='require' name='tm2'/>
        <feature policy='require' name='est'/>
        <feature policy='require' name='monitor'/>
        <feature policy='require' name='osxsave'/>
        <feature policy='require' name='ss'/>
        <feature policy='require' name='vme'/>
        <feature policy='require' name='dtes64'/>
        <feature policy='require' name='ht'/>
        <feature policy='require' name='ds'/>
        <feature policy='require' name='pbe'/>
        <feature policy='require' name='xsave'/>
        <feature policy='require' name='tm'/>
        <feature policy='require' name='pdcm'/>
        <feature policy='require' name='vmx'/>
        <feature policy='require' name='ds_cpl'/>
        <feature policy='require' name='xtpr'/>
        <feature policy='require' name='acpi'/>
      </cpu>
    .................
    
  3. 也可使用 virt-manager 增加 CPU 參數。
    1. Launch virt-manager.
    $ virt-manager
    
    2. Start your virtual machine.
    
    3. Double clicking the virtual machine name will open a window as shown below.
    
    4. Click View > Details.
    
    5. In the Details window, click on Processor.
    
    6. Under Configuration, click on “Copy host CPU configuration“. 
       Once done, the Model field will be populated automatically.
    
    7. Click Apply button at the bottom
    
  4. 啟動測試虛擬機 crtusb。
    [root@dyw219 ~]# virsh start crtusb
    Domain crtusb started
    
  5. 登入 crtusb 虛擬機查看 CPU 參數已包含 vmx,也就是 crtusb 虛擬機系統內也可以安裝管理虛擬機了。
    [root@dyw219 ~]# ssh 10.10.0.100
    Last login: Mon May  1 10:48:01 2017 from 10.10.0.1
    [root@deyu ~]# grep -o vmx /proc/cpuinfo 
    vmx
    vmx
    



2018-04-25