在 KVM 下安裝 Windows Server 2008 的 OEM 品牌媒體
問題
我有一台附帶 Windows Server 2008 OEM 副本的 HP 伺服器。我已經在硬體上安裝了 CentOS 5.4,並嘗試將 Windows Server 2008 安裝為 KVM 來賓。當我嘗試安裝 Windows Server 2008 時,它抱怨我嘗試在不受支持的硬體上安裝。這個問題是因為硬體 SMBIOS 資訊沒有被傳遞給 KVM 來賓。
背景
在我繼續之前,我想聲明我正在嘗試做的事情是在許可證範圍內。HP 為 VMWare 提供了受支持的解決方案,但沒有針對 KVM 的官方解決方案。經過大量研究,我將使用的平台是 CentOS 和 KVM,所以請不要推薦其他平台。
我向 KVM 開發人員郵件列表發送了電子郵件,並被告知這是可能的,並得到以下建議:
“您可以轉儲主機 BIOS 的 SLIC 表,並使用 -acpitable 參數將其提供給來賓 BIOS。”
我用dmidecode得到了需要傳的參數,但是不知道傳到哪裡。
更新
看起來 CentOS 5.4 使用 virt-install 而不是 qemu。Qemu 在包管理器中,我可以在解除安裝 qemu-img 後安裝它(它們衝突並且 qemu 包含 qemu-img 中的包)。所以現在我知道如何傳遞 acpitable 參數,但是我無法將 dmidecode 的內容映射到 -acpitable 中。
您可能還必須將 MS 簽名的驅動程序與 KVM 來賓一起使用。 http://www.linux-kvm.com/content/tip-how-setup-windows-guest-paravirtual-network-drivers http://www.linux-kvm.org/page/WindowsGuestDrivers/Download_Drivers
我肯定知道 RHEV 提供的驅動程序已簽名,但對 CentOS 不太確定
很抱歉探勘了舊話題,但我發現這是可能的:
品牌媒體的問題在於 KVM 的 BIOS VM 附帶不同的 ACPI 表。另一方面,安裝程序對其進行驗證。在撰寫本文時,我正在使用 Debian 8 和 virtlib 1.2.9 和 qemu-system-x86 1.7.0 (qemu-kvm)。
因此,您只需在 VM 上匹配 ACPI (
dmidecode -t 0
和dmidecode -t 1
) 表即可完成它。聯想的那些表看起來像:
# dmidecode 2.12 SMBIOS 2.8 present. Handle 0x0000, DMI type 0, 24 bytes BIOS Information Vendor: LENOVO Version: FBKTB4AUS Release Date: 07/01/2015 Address: 0xF0000 Runtime Size: 64 kB ROM Size: 6656 kB Characteristics: PCI is supported BIOS is upgradeable BIOS shadowing is allowed Boot from CD is supported Selectable boot is supported BIOS ROM is socketed EDD is supported 5.25"/1.2 MB floppy services are supported (int 13h) 3.5"/720 kB floppy services are supported (int 13h) 3.5"/2.88 MB floppy services are supported (int 13h) Print screen service is supported (int 5h) 8042 keyboard services are supported (int 9h) Serial services are supported (int 14h) Printer services are supported (int 17h) ACPI is supported USB legacy is supported BIOS boot specification is supported Targeted content distribution is supported UEFI is supported BIOS Revision: 1.180 Firmware Revision: 1.13 # dmidecode 2.12 SMBIOS 2.8 present. Handle 0x0001, DMI type 1, 27 bytes System Information Manufacturer: LENOVO Product Name: 30AH001GPB Version: ThinkStation P300 Serial Number: S4M88119 UUID: CECF333D-6603-E511-97D5-6C0B843F98BA Wake-up Type: Power Switch SKU Number: LENOVO_MT_30AH Family: To be filled by O.E.M.
對於惠普:
# dmidecode 2.11 SMBIOS 2.7 present. Handle 0x0000, DMI type 0, 24 bytes BIOS Information Vendor: HP Version: W07 Release Date: 05/05/2011 Address: 0xF0000 Runtime Size: 64 kB ROM Size: 8192 kB Characteristics: PCI is supported PNP is supported BIOS is upgradeable BIOS shadowing is allowed ESCD support is available Boot from CD is supported Selectable boot is supported EDD is supported Print screen service is supported (int 5h) 8042 keyboard services are supported (int 9h) Serial services are supported (int 14h) CGA/mono video services are supported (int 10h) ACPI is supported USB legacy is supported BIOS boot specification is supported Function key-initiated network boot is supported Targeted content distribution is supported Firmware Revision: 2.23 # dmidecode 2.11 SMBIOS 2.7 present. Handle 0x0100, DMI type 1, 27 bytes System Information Manufacturer: HP Product Name: ProLiant ML330 G6 Version: Not Specified Serial Number: CZ104601XF UUID: 30303734-3536-5A43-3130-343630315846 Wake-up Type: Power Switch SKU Number: 470065-183 Family: ProLiant
對於 IBM:
# dmidecode 2.12 # SMBIOS entry point at 0x7f6be000 SMBIOS 2.5 present. Handle 0x002F, DMI type 0, 24 bytes BIOS Information Vendor: IBM Corp. Version: -[D6E154AUS-1.13]- Release Date: 09/23/2011 Address: 0xE0000 Runtime Size: 128 kB ROM Size: 4096 kB Characteristics: PCI is supported PNP is supported BIOS is upgradeable BIOS shadowing is allowed Boot from CD is supported Selectable boot is supported EDD is supported 3.5"/2.88 MB floppy services are supported (int 13h) Print screen service is supported (int 5h) 8042 keyboard services are supported (int 9h) Serial services are supported (int 14h) CGA/mono video services are supported (int 10h) ACPI is supported USB legacy is supported LS-120 boot is supported ATAPI Zip drive boot is supported Function key-initiated network boot is supported Targeted content distribution is supported BIOS Revision: 0.0 Firmware Revision: 0.0 # dmidecode 2.12 # SMBIOS entry point at 0x7f6be000 SMBIOS 2.5 present. Handle 0x0030, DMI type 1, 27 bytes System Information Manufacturer: IBM Product Name: System x3650 M3 -[7945J4G]- Version: 00 Serial Number: KD50NCR UUID: 49B2EFEE-5E45-3522-8FE3-C230FF137F25 Wake-up Type: Other SKU Number: XxXxXxX Family: System x
我必須在聯想硬體上安裝聯想的 Windows 2012 Fundation 品牌媒體。
我通過添加到 qemu 參數來實現它:
-smbios type=1,manufacturer=LENOVO,product=30AH001GPB,version=ThinkStation P300,serial=S4M88119,uuid=cecf333d-6603-e511-97d5-6c0b843f98ba,sku=LENOVO_MT_30AH,family=P300 -acpitable file=/var/lib/libvirt/images/slic.bin -acpitable file=/var/lib/libvirt/images/msdm.bin
或者通過添加到 libvirtd 的 VM xml 文件中:
<domain type='kvm' id='18' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> # ^^^ be aware of XML's namespace for the prefixes ^^^ # without it qemu:arg tag won't work ... <qemu:commandline> <qemu:arg value='-smbios'/> <qemu:arg value='type=0,vendor=LENOVO,version=FBKTB4AUS,date=07/01/2015,release=1.180'/> <qemu:arg value='-smbios'/> <qemu:arg value='type=1,manufacturer=LENOVO,product=30AH001GPB,version=ThinkStation P300,serial=S4M88119,uuid=cecf333d-6603-e511-97d5-6c0b843f98ba,sku=LENOVO_MT_30AH,family=P300'/> <qemu:arg value='-acpitable'/> <qemu:arg value='file=/var/lib/libvirt/images/slic.bin'/> <qemu:arg value='-acpitable'/> <qemu:arg value='file=/var/lib/libvirt/images/msdm.bin'/> </qemu:commandline> </domain>
還有更優雅的方法,但不幸的是我的 libvirt 不想將 ACPI 表傳遞給 VM:
<os> .... <sysinfo type='smbios'> <bios> <entry name='vendor'>LENOVO</entry> </bios> <system> <entry name='manufacturer'>HP</entry> <entry name='product'>30AH001GPB</entry> <entry name='serial'>S4M88119</entry> <entry name='sku'>LENOVO_MT_30AH</entry> </system> </sysinfo> </os>
如何創建 ACPI 表的轉儲?簡單地:
root@node0:/sys/firmware/acpi/tables# ls -l total 0 -r-------- 1 root root 146 Sep 23 13:44 APIC -r-------- 1 root root 165 Sep 23 13:44 ASF! -r-------- 1 root root 56 Sep 23 13:44 BGRT -r-------- 1 root root 52 Sep 23 13:44 DBGP -r-------- 1 root root 184 Sep 23 13:44 DMAR -r-------- 1 root root 96238 Sep 23 13:44 DSDT drwxr-xr-x 2 root root 0 Sep 23 13:44 dynamic -r-------- 1 root root 268 Sep 23 13:44 FACP -r-------- 1 root root 64 Sep 23 13:44 FACS -r-------- 1 root root 156 Sep 23 13:44 FIDT -r-------- 1 root root 68 Sep 23 13:44 FPDT -r-------- 1 root root 56 Sep 23 13:44 HPET -r-------- 1 root root 207330 Sep 23 13:44 LUFT -r-------- 1 root root 60 Sep 23 13:44 MCFG -r-------- 1 root root 85 Sep 23 13:44 MSDM -r-------- 1 root root 374 Sep 23 13:44 SLIC -r-------- 1 root root 1337 Sep 23 13:44 SSDT1 -r-------- 1 root root 2776 Sep 23 13:44 SSDT2 -r-------- 1 root root 877 Sep 23 13:44 SSDT3 -r-------- 1 root root 13608 Sep 23 13:44 SSDT4 root@node0:/sys/firmware/acpi/tables# cat SLIC > /var/lib/libvirt/images/slic.bin
它適用於 Windows 2008/2012 品牌媒體。檢查這些參數是否正確傳遞非常重要,檢查 VM 的登錄:
/var/log/libvirt/
vm_name.log
。在 VM 中執行一些實時發行版,例如 sysresccd 並檢查它的輸出dmidecode -t 0; dmidecode -t 1
必須與硬體版本匹配。