
私はUbuntu 12.04 64ビットとKVMを使用しています。 CPUはCore i5 3.3GHzで、8GB DDR3 RAMがあります。 KVMでWindows 7を実行していますが、非常に遅いです。私の同僚は、同じPC構成でDebianを使用し、Windows 7を非常に迅速に実行できます!私の問題は何ですか?
[guyfawkes@guyfawkes-pc ~/work]$ sudo cat /etc/libvirt/qemu/windows.xml
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
virsh edit windows
or other application using the libvirt API.
-->
<domain type='kvm'>
<name>windows</name>
<uuid>5c685175-baea-0ca6-591f-8269d923ffb8</uuid>
<memory>2097152</memory>
<currentMemory>2097152</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64' machine='pc-1.0'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='localtime'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/windows.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<interface type='network'>
<mac address='52:54:00:94:63:91'/>
<source network='default'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='tablet' bus='usb'/>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
<sound model='ich6'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</sound>
<video>
<model type='vga' vram='262144' 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='0x05' function='0x0'/>
</memballoon>
</devices>
</domain>
UPD:KVMをインストールする前にIntel-VTを有効にしました。 VirtIOドライバを正常にインストールし、いくつかのパフォーマンスを提供しますが、たとえばWindowsでFirefoxを開くと、マウスの動きも遅く、GUIも遅くなります。
答え1
私の仮想ハードディスクのパフォーマンスも非常に遅いです。
新しいハードドライブの次の設定ですべての問題を解決しました。
- 保存形式:生
- キャッシュモード:なし(デフォルトではありません!)
- I/Oモード: 基本
答え2
まず、IDEバスをエミュレートするように仮想マシンを設定しましたが、非常に遅くなります。 SATAバスに変更してみてください。
より良い方法はインストールすることです。バーティオドライバーWindows 7では、virtioバスに変更してください。
注:Windowsはそのハードウェアの変更について苦情を表示する可能性があり、IDEからSATAまたはVirtioに変更した後に起動ディスクを見つけるのが難しい場合があります。
同様に、NICタイプをvirtioに変更すると、ネットワークのパフォーマンスが向上します。
Ubuntuで実行されているKVMとカーネルのバージョンは何ですか? Debianの同等のバージョンは何ですか?
確認するもう1つの方法は、同僚があなたのように仮想マシンにディスクイメージを使用しますか、それとも生のディスクパーティション、LVMボリュームなどを使用しますか?ディスクイメージは、パーティションやLVMに比べて非常に遅いです。
答え3
KVM用IDE HDDにWindowsをインストールし、KVMに切り替えたい人仮想IO。
便利な方法は、このプロセスに従うことです。
仮想マシンを終了します。
セカンダリ(非ブート)virtIOディスクを作成します。
既存のIDEディスクから仮想マシンを起動するには、Windowsが新しいセカンダリvirtIOディスクを読み取ることができるドライバが必要です。これは作業しやすくなります。
必要なvirtioドライバをインストールしたら、仮想マシンを再びシャットダウンします。新しいセカンダリ virtIO ディスクを削除せずに、既存の IDE ディスクを virtIO ディスクに再構成します。
仮想マシンを再起動します。既存のIDEディスクのイメージに関連付けられているvirtIOディスクから、起動したばかりです。
後でセカンダリ virtIO ディスクを削除する必要があります。
答え4
Windowsでは、VirtIOドライバをインストールする必要があります。あなたはできますFedora内蔵ドライバーダウンロードまたはソースから直接ビルドしてください。KVMドキュメント参考用。