Closed sathnaga closed 6 years ago
VM fails to start with > 128 vcpus cores in power9.
Host Env:
# lscpu
Architecture: ppc64le
Byte Order: Little Endian
CPU(s): 160
On-line CPU(s) list: 0-159
Thread(s) per core: 4
Core(s) per socket: 20
Socket(s): 2
NUMA node(s): 2
Model: 2.2 (pvr 004e 1202)
Model name: POWER9, altivec supported
CPU max MHz: 3900.0000
CPU min MHz: 2300.0000
L1d cache: 32K
L1i cache: 32K
L2 cache: 512K
L3 cache: 10240K
NUMA node0 CPU(s): 0-79
NUMA node8 CPU(s): 80-159
uname -a
Linux x.x.x.x 4.16.0-3.dev.gitfd8742e.el7.centos.p.ppc64le #1 SMP Tue May 15 08:07:09 UTC 2018 ppc64le ppc64le ppc64le GNU/Linux
qemu-system-ppc-2.12.0-2.dev.gitd36f3ee.el7.centos.p.ppc64le
libvirt-4.3.0-1.dev.git3096ff1.el7.centos.p.ppc64le
/usr/bin/virt-install --connect=qemu:///system --hvm --accelerate --name 'virt-tests-vm1' --machine pseries --memory=10240 --import --nographics --serial pty --memballoon model=virtio --controller type=scsi,model=virtio-scsi --disk path=/home/sath/avocado-fvt-wrapper/data/avocado-vt/images/hostos-ppc64le.qcow2,bus=scsi,size=10,format=qcow2 --network=bridge=virbr0,model=virtio,mac=52:54:00:49:4a:4b --noautoconsole --vcpu=129,sockets=1,cores=129,threads=1
WARNING No operating system detected, VM performance may suffer. Specify an OS with --os-variant for optimal results.
Starting install...
ERROR internal error: qemu unexpectedly closed the monitor: stnet0,vhost=on,vhostfd=27 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:49:4a:4b,bus=pci.0,addr=0x1 -chardev pty,id=charserial0 -device spapr-vty,chardev=charserial0,id=serial0,reg=0x30000000 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny -msg timestamp=on
2018-05-16T08:06:21.518770Z qemu-system-ppc64: kvm_init_vcpu failed: Invalid argument
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start virt-tests-vm1
otherwise, please restart your installation.
Root Cause looks to be host config CONFIG_NR_CPUS=1024
, changing it CONFIG_NR_CPUS=2048
and recompile, boot host kernel helped solving the issue.
I am able to create VMs upto cores=256 now.
/usr/bin/virt-install --connect=qemu:///system --hvm --accelerate --name 'virt-tests-vm1' --machine pseries --memory=10240 --import --nographics --serial pty --memballoon model=virtio --controller type=scsi,model=virtio-scsi --disk path=/home/sath/avocado-fvt-wrapper/data/avocado-vt/images/hostos-ppc64le.qcow2,bus=scsi,size=10,format=qcow2 --network=bridge=virbr0,model=virtio,mac=52:54:00:49:4a:4b --noautoconsole --vcpu=1024,sockets=1,cores=256,threads=4
Domain virt-tests-vm1 destroyed
Domain virt-tests-vm1 has been undefined
WARNING No operating system detected, VM performance may suffer. Specify an OS with --os-variant for optimal results.
Starting install...
Domain creation completed.
------- Comment From seg@us.ibm.com 2018-05-16 08:46:14 EDT------- Let's change the kernel config for hostos builds.
Done. Just merged to devel branch.
# virsh dumpxml virt-tests-vm1
<domain type='kvm' id='6'>
<name>virt-tests-vm1</name>
<uuid>39c14bc2-7a41-4fa6-a6ec-57fe89d09863</uuid>
<memory unit='KiB'>16777216</memory>
<currentMemory unit='KiB'>16777216</currentMemory>
<vcpu placement='static'>1024</vcpu>
<resource>
<partition>/machine</partition>
</resource>
<os>
<type arch='ppc64le' machine='pseries-2.12'>hvm</type>
<boot dev='hd'/>
</os>
<cpu>
<topology sockets='1' cores='256' threads='4'/>
<numa>
<cell id='0' cpus='0-511' memory='8388608' unit='KiB'/>
<cell id='1' cpus='512-1023' memory='8388608' unit='KiB'/>
</numa>
</cpu>
....
# uname -a
Linux localhost.localdomain 4.16.0-4.dev.gitfd8742e.el7.ppc64le #1 SMP Mon May 21 12:19:50 UTC 2018 ppc64le ppc64le ppc64le GNU/Linux
[root@localhost ~]# lscpu
Architecture: ppc64le
Byte Order: Little Endian
CPU(s): 1024
On-line CPU(s) list: 0-1023
Thread(s) per core: 4
Core(s) per socket: 256
Socket(s): 1
NUMA node(s): 2
Model: 2.2 (pvr 004e 1202)
Model name: POWER9 (architected), altivec supported
Hypervisor vendor: KVM
Virtualization type: para
L1d cache: 32K
L1i cache: 32K
NUMA node0 CPU(s): 0-511
NUMA node1 CPU(s): 512-1023
Fixed in latest devel builds.