私のゲームハードウェアはIOMMUをサポートしているので、マシンをLinuxに移行することにしました。
セットアップ:
クリーンなVoid LinuxをインストールしてIOMMUをセットアップし、IVRSテーブルを修正しました。その後、nVidia GTX970をvfio-pci
カーネルモジュールにバインドしました。次にlibvirtd
デーモンとその依存関係。ここでは、virtlogd
デーモンとdbus
デーモンを手動で追加する必要がありました。次に、virt-managerをインストールし、新しいVM =回答からの推奨事項に基づいています。
更新(BSODを克服)
同じ結果でビルド前のArchOVMFイメージを試した後、すべてのオプションを変更し始めました。 uは念のために知っています。
私が最初に試したのは、CPUのHost-passthrough
/Copy Host CPU configuration
からHypervisor Default
に切り替えることでした。これで、インストーラーは問題なく起動します。したがって、IRQLエラーはCPUパストラフによって引き起こされます!
問題:CPUを単に渡すのではなくエミュレートすると、パフォーマンスに影響があります。したがって、目標はHost-passthrough
/Copy Host CPU configuration
を機能させることです...
元の問題:
現在テスト済みのWin10.isoから起動しようとすると、IRQL_NOT_LESS_OR_EQUAL
のBSODが表示されます。
では、どうすればBSODを修正できますか?
エラーはメモリ割り当てに関連しているようですが、それを機能させるために何を変更すればよいかわかりません。
NVidiaからのエラー43を除いて、私はすでにVMを稼働させていました(そのエラーを回避することが可能です)が、ベースシステムが破損していることに気づきました。クリーンな再インストールを行うことにしました。これは、最初のVMが起動するまで完全に機能しました。
これが現在のXMLです。 Win10.isoが起動しないという問題があるため、vfio-drivers.isoとBootdriveがありません。
<domain type='kvm'>
<name>win10</name>
<uuid>6f957f60-c90c-4d33-8821-01348fa531a9</uuid>
<memory unit='KiB'>6291456</memory>
<currentMemory unit='KiB'>6291456</currentMemory>
<vcpu placement='static'>8</vcpu>
<os>
<type Arch='x86_64' machine='pc-q35-2.12'>hvm</type>
<loader readonly='yes' type='pflash'>/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
<nvram>/var/lib/libvirt/qemu/nvram/win10_VARS.fd</nvram>
</os>
<features>
<acpi/>
<apic/>
<hyperv>
<relaxed state='on'/>
<vapic state='on'/>
<spinlocks state='on' retries='8191'/>
</hyperv>
<vmport state='off'/>
</features>
<cpu mode='Host-passthrough' check='none'/>
<clock offset='localtime'>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='delay'/>
<timer name='hpet' present='no'/>
<timer name='hypervclock' present='yes'/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<pm>
<suspend-to-mem enabled='no'/>
<suspend-to-disk enabled='no'/>
</pm>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/home/pitch/Downloads/Win10_1803_EnglishInternational_x64.iso'/>
<target dev='sdb' bus='sata'/>
<readonly/>
<boot order='1'/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
<controller type='usb' index='0' model='ich9-ehci1'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x7'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci1'>
<master startport='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x0' multifunction='on'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci2'>
<master startport='2'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x1'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci3'>
<master startport='4'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x2'/>
</controller>
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pcie-root'/>
<controller type='pci' index='1' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='1' port='0x10'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
</controller>
<controller type='pci' index='2' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='2' port='0x11'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
</controller>
<controller type='pci' index='3' model='pcie-to-pci-bridge'>
<model name='pcie-pci-bridge'/>
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</controller>
<controller type='pci' index='4' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='4' port='0x12'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
</controller>
<controller type='pci' index='5' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='5' port='0x13'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
</controller>
<controller type='pci' index='6' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='6' port='0x14'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
</controller>
<controller type='virtio-serial' index='0'>
<address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</controller>
<interface type='network'>
<mac address='52:54:00:36:19:70'/>
<source network='default'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
</interface>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<sound model='ich6'>
<address type='pci' domain='0x0000' bus='0x03' slot='0x01' function='0x0'/>
</sound>
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x046d'/>
<product id='0xc069'/>
</source>
<address type='usb' bus='0' port='1'/>
</hostdev>
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x046d'/>
<product id='0xc316'/>
</source>
<address type='usb' bus='0' port='2'/>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</source>
<address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
</hostdev>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
</memballoon>
</devices>
</domain>
古いXML
これは私の元のlibvirtXMLでした:
<domain type='kvm'>
<name>win10</name>
<uuid>502f32c7-01fc-4690-98b7-85c1c82e392b</uuid>
<memory unit='KiB'>4194304</memory>
<currentMemory unit='KiB'>4194304</currentMemory>
<vcpu placement='static'>4</vcpu>
<os>
<type Arch='x86_64' machine='pc-i440fx-2.12'>hvm</type>
<loader readonly='yes' type='pflash'>/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
<nvram>/var/lib/libvirt/qemu/nvram/win10_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<hyperv>
<relaxed state='on'/>
<vapic state='on'/>
<spinlocks state='on' retries='8191'/>
</hyperv>
<vmport state='off'/>
</features>
<cpu mode='Host-passthrough' check='none'/>
<clock offset='localtime'>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='delay'/>
<timer name='hpet' present='no'/>
<timer name='hypervclock' present='yes'/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<pm>
<suspend-to-mem enabled='no'/>
<suspend-to-disk enabled='no'/>
</pm>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/win10.qcow2'/>
<target dev='sdb' bus='sata'/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/home/pitch/Downloads/Win10_1803_EnglishInternational_x64.iso'/>
<target dev='hda' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='floppy'>
<driver name='qemu' type='raw'/>
<source file='/home/pitch/Downloads/virtio-win-0.1.149.iso'/>
<target dev='fda' bus='fdc'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<controller type='usb' index='0' model='ich9-ehci1'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci1'>
<master startport='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci2'>
<master startport='2'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci3'>
<master startport='4'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<controller type='fdc' index='0'/>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<controller type='virtio-serial' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</controller>
<controller type='scsi' index='0' model='virtio-scsi'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
</controller>
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</controller>
<interface type='network'>
<mac address='52:54:00:04:2a:7a'/>
<source network='default'/>
<model type='rtl8139'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<target type='isa-serial' port='0'>
<model name='isa-serial'/>
</target>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<channel type='spicevmc'>
<target type='virtio' name='com.redhat.spice.0'/>
<address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
<input type='tablet' bus='usb'>
<address type='usb' bus='0' port='1'/>
</input>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='spice' autoport='yes'>
<listen type='address'/>
<image compression='off'/>
</graphics>
<sound model='ich6'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</sound>
<video>
<model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<redirdev bus='usb' type='spicevmc'>
<address type='usb' bus='0' port='2'/>
</redirdev>
<redirdev bus='usb' type='spicevmc'>
<address type='usb' bus='0' port='3'/>
</redirdev>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
</memballoon>
</devices>
</domain>
テストするために、VM構成を削除してみました。XMLダンプは次のとおりです。
<domain type='kvm'>
<name>win10</name>
<uuid>502f32c7-01fc-4690-98b7-85c1c82e392b</uuid>
<memory unit='KiB'>6291456</memory>
<currentMemory unit='KiB'>5242880</currentMemory>
<vcpu placement='static'>8</vcpu>
<os>
<type Arch='x86_64' machine='pc-i440fx-2.12'>hvm</type>
<loader readonly='yes' type='pflash'>/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
<nvram>/var/lib/libvirt/qemu/nvram/win10_VARS.fd</nvram>
<bootmenu enable='no'/>
</os>
<features>
<acpi/>
<apic/>
<hyperv>
<relaxed state='on'/>
<vapic state='on'/>
<spinlocks state='on' retries='8191'/>
</hyperv>
<vmport state='off'/>
</features>
<cpu mode='Host-passthrough' check='partial'/>
<clock offset='localtime'>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='delay'/>
<timer name='hpet' present='no'/>
<timer name='hypervclock' present='yes'/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<pm>
<suspend-to-mem enabled='no'/>
<suspend-to-disk enabled='no'/>
</pm>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/home/pitch/Downloads/Win10_1803_EnglishInternational_x64.iso'/>
<target dev='sda' bus='scsi'/>
<readonly/>
<boot order='1'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<controller type='usb' index='0' model='ich9-ehci1'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci1'>
<master startport='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci2'>
<master startport='2'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci3'>
<master startport='4'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<controller type='scsi' index='0' model='virtio-scsi'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
</controller>
<controller type='virtio-serial' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</controller>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</source>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</hostdev>
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x046d'/>
<product id='0xc069'/>
</source>
<address type='usb' bus='0' port='1'/>
</hostdev>
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x046d'/>
<product id='0xc316'/>
</source>
<address type='usb' bus='0' port='2'/>
</hostdev>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
</memballoon>
</devices>
</domain>
Windowsを再インストールできたようですが、最初の起動がブルースクリーンになりました。この更新された回答はそれに対処します。
Windowsは、仮想化またはベアメタルのハードウェアの変更に関しては脆弱です。
インストール後にlibvirtドメインXMLで何かを変更した場合、_IRQL_NOT_LESS_OR_EQUAL
_ブルースクリーンが簡単に発生する可能性があります。
何を変更したかを覚えていない場合、ブルースクリーンの原因を特定するのは特に困難です。たとえば、Windowsをscsi
(_virtio-scsi
_)ディスクバスにインストールしてから、ディスクバスをvirtio
(_virtio-blk
_)に変更した場合、ゲストがクラッシュする前に、詳細なしでこれを取得します。
これを解決する最も簡単な方法は、libvirtドメインXMLを事前に希望どおりに構成してから、そのハードウェアにWindowsを再インストールすることです。
より難しい方法は、WindowsインストールISOを起動し、DISM
を使用してvirtio-winドライバーを追加し、そのうちの1つがBSODを修正することを期待することです。 このスーパーユーザーの回答 からの指示を適応させる必要があります。これは厄介なプロセスであり、成功を保証するものではありません。
(そして、インストール後にブートディスクバスを変更する場合、Windows 10では不可能であるように見えます 私が見つけたように 。)
したがって、トラブルシューティングの頭痛の種を避けて、もう一度Windowsを再インストールしてください。
これが、libvirtドメインのXMLをWindows用にカスタマイズした方法です。
scsi
を使用し、TRIMサポートのために_discard='unmap'
_に_<driver>
_を使用します。sata
バスを使用して、Windowsインストーラーを起動できるようにします。sata
を使用するため、Windowsインストーラーはそれを読み取ることができます。machine
(_q35
_)の代わりに_<type>
_の下の_<os>
_のpc
属性として_i440fx
_を使用します PCIeパススルーのより良いサポート i440FXのみPCIをサポートします。 _q35
_には別の_<controller>
_要素のセットが必要であることに注意してください。現在のゲストを削除(定義解除)し、新しいゲストを作成し、[インストール前に構成をカスタマイズする]をオンにして、チップセットを_virt-manager
_から_i440FX
_に変更する場合は、これを_Q35
_で設定できます。 。virtio
です。Windowsインストーラーで、ディスクのパーティション分割手順を完了する前に、virtio-winISOから互換性のあるすべてのドライバーをインストールします。
再インストール後、ブルースクリーンが表示されなくなることを願っています。
この回答は、Windowsを再インストールしようとしていることを前提としています。
指定したlibvirtXMLファイルによると、ISOファイル(cdrom
)から起動していません。仮想マシンイメージから直接起動しているようです。仮想マシンイメージには、異なるハードウェアにインストールされたWindowsが含まれている可能性があるため、仮想化されたハードウェアと互換性がありません。
追加することでcdrom
から起動できます
_ <boot dev='cdrom'/>
_
真上
_ <boot dev='hd'/>
_
次に、仮想マシンを通常どおり起動します。 Windowsブートディスクは、インストーラーを開始するために任意のキーを押すための時間制限のあるプロンプトを表示する場合があることに注意してください。
または、次のようにvirt-managerを介してcdrom
からの起動を有効にすることもできます。
<cpu mode='Host-passthrough' check='none'/>
CPUタイプを「Host-passthrough/Host-model」から事前定義された「OpteronG4」テンプレートに設定することで、この問題を解決しました。Threadripper-Processorがあります。 Windowsはあまり多くの可能性を処理できません。
うまくいけば、これがお役に立てば幸いです。
2019年3月25日編集
ソリューションの詳細:上記と同じ問題が発生しました。Virt-ManagerのCPUタイプ(XMLファイルを編集しない)を「OpteronG4」に設定することで「解決」できました。
とにかく、まだ他の問題と戦っていて、GPUパススルーは正しく機能しませんでした。 VMを起動できましたが、GPUがVMにリストされておらず、ドライバーなどをインストールできませんでした。
私はこのチュートリアルを見つけました: https://heiko-sieger.info/running-windows-10-on-linux-using-kvm-with-vga-passthrough/ 私のハメ撮りからほとんどすべてのトピックをカバーしていますGPUパススルー。特に「トラブルシューティング」セクションで。強くお勧めします。
GPUパススルーで一般的に問題があったX399Taichiマザーボード+ Threadripper CPUを使用しているという事実のために、CPU-ホストパススルーで問題が発生したなど、いくつかの問題が発生しました。別のマシン(異なるハードウェア)でこれを正常に実行しました。
私にとっては、BIOSアップデートでうまくいきました。その後、すべてが魅力のように機能しました。
私の経験から:
-ハードウェアの準備ができている必要があります+関連するBIOSアップデートを探します。
-SVM/xVTd、IOMMU、ACSなどのマザーボード上の設定をアクティブ化する必要があります。
-基盤となるOSにFedoraサーバーを使用しています。これは、最新のソフトウェアリポジトリを備えたOSです。
-「最初の」GPUとして2番目のGPUを使用します。 (すべてのCPU /マザーボードがOnBoardGPUを提供しているわけではありません)
-このチュートリアルを強くお勧めします: https://heiko-sieger.info/running-windows-10-on-linux-using-kvm-with-vga-passthrough/
興味があれば、「GPUパススルー:Fedoraの使い方」をやります。
お役に立てれば。さらに質問がある場合は、遠慮なく。