我有qemu-kvm版本的Centos 6:
qemu-kvm.x86_64 2:0.12.1.2-2.448.el6_6.4
在戴尔Precision上使用2x至强5110
当我运行VM qemu-kvm进程占用100%的CPU并在VM上启动Windows需要很长时间。 我不知道为什么。 任何人都可以帮忙
我的虚拟机configuration:
<domain type='qemu'> <name>window7</name> <uuid>0f606bdd-735f-d4fd-ac1d-ec37b4814d30</uuid> <memory unit='KiB'>1433600</memory> <currentMemory unit='KiB'>1433600</currentMemory> <vcpu placement='static'>2</vcpu> <os> <type arch='x86_64' machine='rhel6.6.0'>hvm</type> <boot dev='hd'/> <boot dev='cdrom'/> <bootmenu enable='yes'/> </os> <features> <acpi/> <pae/> </features> <cpu mode='custom' match='exact'> <model fallback='allow'>core2duo</model> <vendor>Intel</vendor> <feature policy='require' name='pbe'/> <feature policy='require' name='tm2'/> <feature policy='require' name='ds'/> <feature policy='require' name='ss'/> <feature policy='require' name='dtes64'/> <feature policy='require' name='ht'/> <feature policy='require' name='dca'/> <feature policy='require' name='lahf_lm'/> <feature policy='require' name='tm'/> <feature policy='require' name='cx16'/> <feature policy='require' name='vmx'/> <feature policy='require' name='ds_cpl'/> <feature policy='require' name='pdcm'/> <feature policy='require' name='xtpr'/> <feature policy='require' name='acpi'/> </cpu> <clock offset='localtime'> <timer name='rtc' tickpolicy='catchup'/> </clock> <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'/> <source file='/home/win7.img'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/pl_windows_7_with_sp1_x86_dvd_u_12032015.iso'/> <target dev='hdc' bus='ide'/> <readonly/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <controller type='ide' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='scsi' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </controller> <interface type='network'> <mac address='52:54:00:bd:a9:51'/> <source network='default'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> </graphics> <video> <model type='vga' 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='0x06' function='0x0'/> </memballoon> </devices> </domain>
这是一个严重的问题:
<domain type='qemu'>
这应该显示为:
<domain type='kvm'>
如果设置为qemu,则qemu将运行该机器,而不需要任何硬件虚拟化支持。 没有这个选项设置,qemu不会被告知启用KVM硬件加速。 这对于仿真非Intel处理器来说很好,但总比使用kvm提供的硬件加速要慢得多。
你正在运行一个老旧的系统。 你的CPU是6年或者9代,甚至是当时最便宜的入门级型号。
即使启用了虚拟化扩展(VT-x),我担心你的系统仍然会有点慢。 这是因为处理器支持的第一代虚拟化指令不会对性能造成太大的影响。 使用硬件function的性能增益主要来自Nehalem CPU架构(4代以后)和VT-x EPT指令。 所以虽然通常为了硬件加速而使用KVM而不是Qemu,但是我不认为你会真正获得很多性能切换到任何其他pipe理程序。
当你运行一个相当古老的系统时,备件和升级部件的价格已经基本达到了最低点。
Xeon 5110的体面升级例如是Xeon 5160(1,6 vs 3 Ghz)。 这是至强5100系列中最快的型号,以2美元的价格出售给eBay。 匹配的内存升级(DDR2 FB-DIMM)这款处理器也很便宜。
根据您的Precision的修订(它可以在第二代490和T5400上运行),您甚至可以运行第一代Quadcores(Xeon 5300系列) – 但5160是任何情况下的安全升级。
你应该知道,即使升级了处理器,系统仍然不是火箭,但是你应该能够几乎没有钱的情况下,比目前的情况看到100%的性能提升。
我正在运行一个类似的装备(使用双Ghz Xeon 5160 + 12 GB DDR2),使用VirtualBox运行Ubuntu 12.04上的免费的modern.ie Windows映像。 这是相当不错的/可用的,但非常“快”。 我不需要那么多,所以对我来说没关系。