Resolve the problem that there are only two windows7 virtual machine cpu installed in kvm
Problem description: a virtual machine created using the following command
Virt-install-ram=2048-vcpus=8-os-type windows-os-variant=winvista\
-cdrom / ISOs/Windows_7_CHS_sp1_x86.iso-- network bridge=br1\
-disk path=/dev/vg/Office-QA-VS-102-85-- accelerate\
-vnc-- vncport=5910-- noautoconsole-- name=Office-QA-VS-102-85
After the creation is completed, it is found that there are only two cpu in the windows7, and the configuration of 8 does not take effect at all.
Reason:
1. Windows 7 only supports a maximum of two CPU socket, and there can be multiple core in each socket.
2. Kvm simulates one socket for each CPU by default, and the topology of the virtual machine CPU must be modified to use more than one CPU.
Solution:
Modify the virtual machine configuration file xml under / etc/libvirtd/qemu to add one socket and multiple core
Add the following
Idea to modify the number of vcpu in 8
Restart the virtual machine after the modification is completed