KVM host
| 
# uname -ri 
3.2.0-29-generic x86_64 
# tail -1 /etc/lsb-release 
DISTRIB_DESCRIPTION="Ubuntu 12.04.1 LTS" 
# kvm --version 
QEMU emulator version 1.0 (qemu-kvm-1.0), Copyright (c) 2003-2008 Fabrice Bellard 
# libvirtd --version 
libvirtd (libvirt) 0.9.8 | 
Guest
| 
# tail -1 /etc/lsb-release 
DISTRIB_DESCRIPTION="Ubuntu 12.04.1 LTS" 
# uname -ri 
3.2.0-29-virtual x86_64 | 
current # of vCPUs : 1
maximum # of vCPUs : 2
current status
| 
virsh # vcpucount ubuntu12-04-vm1 
maximum      config         2 
maximum      live           2 
current      config         1 
current      live           1 
virsh # qemu-monitor-command ubuntu12-04-vm1 --hmp 'info cpus' 
* CPU #0: pc=0xffffffff8103bf6b (halted) thread_id=16145 | 
add one vCPU
| 
virsh # setvcpus ubuntu12-04-vm1 --count 2 –live | 
check vCPU info
| 
virsh # vcpucount ubuntu12-04-vm1 
maximum      config         2 
maximum      live           2 
current      config         1 
current      live           2 | 
| 
virsh # qemu-monitor-command ubuntu12-04-vm1 --hmp 'info cpus' 
* CPU #0: pc=0xffffffff8103bf6b (halted) thread_id=16145 | 
nnn , the vCPU I hot plugged does not appear on the VM.
on the VM
| 
root@ubuntu12-04-vm1:~# ls /sys/devices/system/cpu/ 
cpu0     cpuidle     offline  possible  probe 
cpufreq  kernel_max  online   present   release | 
check VM’s log on the KVM host
| 
# cat /var/log/libvirt/qemu/ubuntu12-04-vm1.log 
cpu hotplug not supported | 
cpu hotplug not supported..
Seen from “man kvm” , it describes that maxcpus specifies the maximum number of hotpluggable CPUs.
man kvm
| 
      -smp 
       n[,cores=cores][,threads=threads][,sockets=sockets][,maxcpus=maxcpus] 
           Simulate an SMP system with n CPUs. On the PC target, up to 255 
           CPUs are supported. On Sparc32 target, Linux limits the number of 
           usable CPUs to 4.  For the PC target, the number of cores per 
           socket, the number of threads per cores and the total number of 
           sockets can be specified. Missing values will be computed. If any 
           on the three values is given, the total number of CPUs n can be 
           omitted. maxcpus specifies the maximum number of hotpluggable CPUs. | 
Here is the command line parameter.
| 
# cat /proc/16142/cmdline 
/usr/bin/kvm-S-Mpc-1.0-enable-kvm-m512-smp1,maxcpus=2,sockets=2,cores=1,threads=1-nameubuntu12-04-vm1-uuidf439b59e-2c1d-02b2-0cb9-fa71d5b189ed-nodefconfig-nodefaults-chardevsocket,id=charmonitor,path=/var/lib/libvirt/qemu/ubuntu12-04-vm1.monitor,server,nowait-monchardev=charmonitor,id=monitor,mode=control-rtcbase=utc-no-shutdown-drivefile=/var/disk1/images/ubuntu12-04-vm1.qcow2,if=none,id=drive-ide0-0-0,format=qcow2-deviceide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1-netdevtap,fd=23,id=hostnet0-devicevirtio-net-pci,netdev=hostnet0,id=net0,mac=xx:xx:xx:97:2d:78,bus=pci.0,addr=0x3-chardevpty,id=charserial0-deviceisa-serial,chardev=charserial0,id=serial0-usb-vnc127.0.0.1:3-vgacirrus-devicevirtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 | 
I need to look into this..
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.