[CentOS] numa support question on centos 6.5

Mon Jun 2 11:40:36 UTC 2014
Jarod. w <work.iec23801 at gmail.com>

Hi, All

    The vm can't start when using numa based on centos 6.5(kernel:
kernel-2.6.32-431.17.1.el6.x86_64,
qemu-kvm: qemu-kvm-0.12.1.2-2.415.el6_5.8.x86_64). My numa setting in vm
xml is the following:
--------------------
  <numatune>
    <memory mode='strict' nodeset='1'/>
  </numatune>
--------------------

When 'nodeset' sets '0', the vm can start; However, when setting it to 1,
it can't start and report
the following error:
----------------------------
error: Failed to start domain testbsd
error: internal error Process exited while reading console log output: char
device redirected to /dev/pts/1
kvm_create_vcpu: Cannot allocate memory
Failed to create vCPU. Check the -smp parameter.
----------------------------

Any suggestions?

Thanks in advance...

Best Regards

Jarod

The running 'virsh capabilities' command, the input is below:
------------------------------------
<capabilities>

  <host>
    <uuid>00000000-0000-0000-0000-002590c4dc46</uuid>
    <cpu>
      <arch>x86_64</arch>
      <model>SandyBridge</model>
      <vendor>Intel</vendor>
      <topology sockets='1' cores='10' threads='2'/>
      <feature name='erms'/>
      <feature name='smep'/>
      <feature name='fsgsbase'/>
      <feature name='pdpe1gb'/>
      <feature name='rdrand'/>
      <feature name='f16c'/>
      <feature name='osxsave'/>
      <feature name='dca'/>
      <feature name='pcid'/>
      <feature name='pdcm'/>
      <feature name='xtpr'/>
      <feature name='tm2'/>
      <feature name='est'/>
      <feature name='smx'/>
      <feature name='vmx'/>
      <feature name='ds_cpl'/>
      <feature name='monitor'/>
      <feature name='dtes64'/>
      <feature name='pbe'/>
      <feature name='tm'/>
      <feature name='ht'/>
      <feature name='ss'/>
      <feature name='acpi'/>
      <feature name='ds'/>
      <feature name='vme'/>
    </cpu>
    <power_management>
      <suspend_mem/>
      <suspend_disk/>
    </power_management>
    <migration_features>
      <live/>
      <uri_transports>
        <uri_transport>tcp</uri_transport>
      </uri_transports>
    </migration_features>
    <topology>
      <cells num='2'>
        <cell id='0'>
          <cpus num='20'>
            <cpu id='0' socket_id='0' core_id='0' siblings='0,20'/>
            <cpu id='1' socket_id='0' core_id='1' siblings='1,21'/>
            <cpu id='2' socket_id='0' core_id='2' siblings='2,22'/>
            <cpu id='3' socket_id='0' core_id='3' siblings='3,23'/>
            <cpu id='4' socket_id='0' core_id='4' siblings='4,24'/>
            <cpu id='5' socket_id='0' core_id='8' siblings='5,25'/>
            <cpu id='6' socket_id='0' core_id='9' siblings='6,26'/>
            <cpu id='7' socket_id='0' core_id='10' siblings='7,27'/>
            <cpu id='8' socket_id='0' core_id='11' siblings='8,28'/>
            <cpu id='9' socket_id='0' core_id='12' siblings='9,29'/>
            <cpu id='20' socket_id='0' core_id='0' siblings='0,20'/>
            <cpu id='21' socket_id='0' core_id='1' siblings='1,21'/>
            <cpu id='22' socket_id='0' core_id='2' siblings='2,22'/>
            <cpu id='23' socket_id='0' core_id='3' siblings='3,23'/>
            <cpu id='24' socket_id='0' core_id='4' siblings='4,24'/>
            <cpu id='25' socket_id='0' core_id='8' siblings='5,25'/>
            <cpu id='26' socket_id='0' core_id='9' siblings='6,26'/>
            <cpu id='27' socket_id='0' core_id='10' siblings='7,27'/>
            <cpu id='28' socket_id='0' core_id='11' siblings='8,28'/>
            <cpu id='29' socket_id='0' core_id='12' siblings='9,29'/>
          </cpus>
        </cell>
        <cell id='1'>
          <cpus num='20'>
            <cpu id='10' socket_id='1' core_id='0' siblings='10,30'/>
            <cpu id='11' socket_id='1' core_id='1' siblings='11,31'/>
            <cpu id='12' socket_id='1' core_id='2' siblings='12,32'/>
            <cpu id='13' socket_id='1' core_id='3' siblings='13,33'/>
            <cpu id='14' socket_id='1' core_id='4' siblings='14,34'/>
            <cpu id='15' socket_id='1' core_id='8' siblings='15,35'/>
            <cpu id='16' socket_id='1' core_id='9' siblings='16,36'/>
            <cpu id='17' socket_id='1' core_id='10' siblings='17,37'/>
            <cpu id='18' socket_id='1' core_id='11' siblings='18,38'/>
            <cpu id='19' socket_id='1' core_id='12' siblings='19,39'/>
            <cpu id='30' socket_id='1' core_id='0' siblings='10,30'/>
            <cpu id='31' socket_id='1' core_id='1' siblings='11,31'/>
            <cpu id='32' socket_id='1' core_id='2' siblings='12,32'/>
            <cpu id='33' socket_id='1' core_id='3' siblings='13,33'/>
            <cpu id='34' socket_id='1' core_id='4' siblings='14,34'/>
            <cpu id='35' socket_id='1' core_id='8' siblings='15,35'/>
            <cpu id='36' socket_id='1' core_id='9' siblings='16,36'/>
            <cpu id='37' socket_id='1' core_id='10' siblings='17,37'/>
            <cpu id='38' socket_id='1' core_id='11' siblings='18,38'/>
            <cpu id='39' socket_id='1' core_id='12' siblings='19,39'/>
          </cpus>
        </cell>
      </cells>
    </topology>
    <secmodel>
      <model>none</model>
      <doi>0</doi>
    </secmodel>
    <secmodel>
      <model>dac</model>
      <doi>0</doi>
    </secmodel>
  </host>

  <guest>
    <os_type>hvm</os_type>
    <arch name='i686'>
      <wordsize>32</wordsize>
      <emulator>/usr/libexec/qemu-kvm</emulator>
      <machine>rhel6.5.0</machine>
      <machine canonical='rhel6.5.0'>pc</machine>
      <machine>rhel6.4.0</machine>
      <machine>rhel6.3.0</machine>
      <machine>rhel6.2.0</machine>
      <machine>rhel6.1.0</machine>
      <machine>rhel6.0.0</machine>
      <machine>rhel5.5.0</machine>
      <machine>rhel5.4.4</machine>
      <machine>rhel5.4.0</machine>
      <domain type='qemu'>
      </domain>
      <domain type='kvm'>
        <emulator>/usr/libexec/qemu-kvm</emulator>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <deviceboot/>
      <acpi default='on' toggle='yes'/>
      <apic default='on' toggle='no'/>
      <pae/>
      <nonpae/>
    </features>
  </guest>

  <guest>
    <os_type>hvm</os_type>
    <arch name='x86_64'>
      <wordsize>64</wordsize>
      <emulator>/usr/libexec/qemu-kvm</emulator>
      <machine>rhel6.5.0</machine>
      <machine canonical='rhel6.5.0'>pc</machine>
      <machine>rhel6.4.0</machine>
      <machine>rhel6.3.0</machine>
      <machine>rhel6.2.0</machine>
      <machine>rhel6.1.0</machine>
      <machine>rhel6.0.0</machine>
      <machine>rhel5.5.0</machine>
      <machine>rhel5.4.4</machine>
      <machine>rhel5.4.0</machine>
      <domain type='qemu'>
      </domain>
      <domain type='kvm'>
        <emulator>/usr/libexec/qemu-kvm</emulator>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <deviceboot/>
      <acpi default='on' toggle='yes'/>
      <apic default='on' toggle='no'/>
    </features>
  </guest>

</capabilities>
------------------------------------

The full vm xml is below:
--------------------------------------------
<domain type='kvm'>
  <name>test</name>
  <uuid>7f68743b-d725-4c7d-dc7e-9aa6712584b3</uuid>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <numatune>
    <memory mode='strict' nodeset='1'/>
  </numatune>
  <os>
    <type arch='x86_64' machine='rhel6.5.0'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/home/Rel_8_5_0_17.raw'/>
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
function='0x2'/>
    </controller>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
function='0x1'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:72:15:88'/>
      <source bridge='br0'/>
      <model type='ne2k_pci'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='cirrus' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02'
function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
function='0x0'/>
    </memballoon>
  </devices>
</domain>
--------------------------------------------