Windows-Server-2012

Windows Server 2012 R2 在 KVM 上安裝時找不到 virtio 驅動程序

  • March 27, 2015

我正在嘗試在 Debian KVM 主機上安裝 Windows Server 2012 R2,但似乎找不到驅動程序。

來賓連接了兩個驅動器:安裝磁碟和最新的 Windows virtio 驅動程序 ISO(來自此處)。我使用相同的設置成功安裝了其他作業系統(包括 Windows Server 2008 和 Windows 8.1)。

我要安裝的驅動器是一個 qcow2 精簡配置文件。安裝時,Windows 無法辨識並顯示“選擇要安裝的驅動程序”框。我選擇AMD64目錄中的文件夾,WIN8它顯示了四個可安裝的驅動程序,其中兩個與儲存有關:Red Hat VirtIO SCSI controllerRed Hat VirtIO pass-through controller.

但是當我嘗試安裝其中任何一個時,它給了我一個No new devices drivers were found並且它不會讓我繼續。我嘗試使用不同的磁碟匯流排(SCSI、IDE、SATA 甚至 USB),但沒有任何效果 -No new devices drivers were found一路走來。

這是怎麼回事?

這是域 XML:

virsh # dumpxml win2k12
<domain type='kvm'>
 <name>win2k12</name>
 <uuid>f33b0f87-567c-4494-ab5b-80856447ddba</uuid>
 <memory unit='KiB'>1048576</memory>
 <currentMemory unit='KiB'>1048576</currentMemory>
 <vcpu placement='static'>1</vcpu>
 <os>
   <type arch='x86_64' machine='pc-i440fx-2.1'>hvm</type>
 </os>
 <features>
   <acpi/>
   <apic/>
   <pae/>
 </features>
 <cpu mode='custom' match='exact'>
   <model fallback='allow'>Westmere</model>
 </cpu>
 <clock offset='localtime'>
   <timer name='rtc' tickpolicy='catchup'/>
   <timer name='pit' tickpolicy='delay'/>
   <timer name='hpet' present='no'/>
 </clock>
 <on_poweroff>destroy</on_poweroff>
 <on_reboot>restart</on_reboot>
 <on_crash>restart</on_crash>
 <pm>
   <suspend-to-mem enabled='no'/>
   <suspend-to-disk enabled='no'/>
 </pm>
 <devices>
   <emulator>/usr/bin/kvm</emulator>
   <disk type='file' device='disk'>
     <driver name='qemu' type='qcow2'/>
     <source file='/home/thomas/kvm/storage_pool/windows2012-test-3.qcow2'/>
     <target dev='sda' bus='usb'/>
     <boot order='1'/>
   </disk>
   <disk type='file' device='cdrom'>
     <driver name='qemu' type='raw'/>
     <source file='/home/thomas/tmp/en_windows_server_2012_r2_x64_dvd_2707946.iso'/>
     <target dev='hdb' bus='ide'/>
     <readonly/>
     <boot order='3'/>
     <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/thomas/tmp/virtio-win-0.1-100.iso'/>
     <target dev='hdc' bus='ide'/>
     <readonly/>
     <address type='drive' controller='0' bus='1' 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='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'>
     <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
   </controller>
   <controller type='scsi' index='1' model='virtio-scsi'>
     <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
   </controller>
   <controller type='sata' index='0'>
     <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
   </controller>
   <interface type='network'>
     <mac address='52:54:00:06:5a:31'/>
     <source network='default'/>
     <model type='rtl8139'/>
     <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>
   <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'/>
   <input type='mouse' bus='ps2'/>
   <input type='keyboard' bus='ps2'/>
   <graphics type='spice' autoport='yes'/>
   <sound model='ich6'>
     <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
   </sound>
   <video>
     <model type='qxl' ram='65536' vram='65536' heads='1'/>
     <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
   </video>
   <redirdev bus='usb' type='spicevmc'>
   </redirdev>
   <redirdev bus='usb' type='spicevmc'>
   </redirdev>
   <redirdev bus='usb' type='spicevmc'>
   </redirdev>
   <redirdev bus='usb' type='spicevmc'>
   </redirdev>
   <memballoon model='virtio'>
     <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
   </memballoon>
 </devices>
</domain>

問題在於使用來自 DreamSpark/OnTheHub 的磁碟映像。我下載了一個新圖像,它開箱即用。

舊圖像名稱是en_windows_server_2012_r2_x64_dvd_2707946.iso.

我“訂購”了 DreamSpark 的新免費 Windows Server 2012。我相信使用安全下載管理器重新下載會再次下載舊圖像,但我還沒有測試過。

至於設置,我建議您使用下面 dyasny 的答案中提供的設置。

<disk type='file' device='disk'>
 <driver name='qemu' type='qcow2'/>
 <source file='/home/thomas/kvm/storage_pool/windows2012-test-3.qcow2'/>
 <target dev='vda' bus='virtio'/>
</disk>

這就是它應該的樣子。順便說一句,你的網卡也是 RTL 而不是 virtio,tsk tsk tsk。

引用自:https://serverfault.com/questions/678164