- Cheat Sheet and Example is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools






KVM CLI Commands Cheet Sheat and KVM Configuration Examples

KVM : How to change cpu number, memory size of gest os

How to change CPU Numbers of Guest OS

Check CPU Numbers

# virsh list --all
# virsh vcpuinfo kvm_centos7

Chenge CPU

# virsh shutdown kvm_centos7
# virsh edit kvm_centos7             # /etc/libvirt/qemu/kvm_centos7.xml

<vcpu placement='static'>4</vcpu>

# virsh start kvm_centos7

How to Change Core Numbers.

<vcpu placement='static'>4</vcpu>
    <topology sockets='1' cores='4' threads='1'/>

How to change Memory Sizes of Guest OS


# free -m

Chenge Memory

# virsh shutdown kvm_centos7
# virsh edit kvm_centos7               # /etc/libvirt/qemu/kvm_centos7.xml

  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>

# virsh start kvm_centos7

middleware/virtualization/kvm/change_cpu_memory.html.txt ยท Last modified: 2017/05/06 by admin

Page Tools