在 KVM 下安装 Windows Server 2008 的 OEM 品牌媒体

在 KVM 下安装 Windows Server 2008 的 OEM 品牌媒体

问题

我有一台 HP 服务器,附带 Windows Server 2008 的 OEM 副本。我在硬件上安装了 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。

答案1

您可能还必须在 KVM 客户机上使用 MS 签名的驱动程序。 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 则不太确定

答案2

抱歉挖出旧话题,但我发现这是可能的:

品牌媒体的问题在于 KVM 的 BIOS VM 附带不同的 ACPI 表。另一方面,安装程序会验证它。在撰写本文时,我使用的是 Debian 8,带有 virtlib 1.2.9 和 qemu-system-x86 1.7.0 (qemu-kvm)。

因此,您只需要在 VM 上匹配 ACPI(dmidecode -t 0dmidecode -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.

对于 HP:

# 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是否与硬件版本匹配。

作为一名专业人士(据我所知,Windows 2012 Foundation 仅有品牌): Qemu-KVM 中的 Windows 2012 Foundation

答案3

从主板中提取 SLIC 表并使用以下方法滚动您自己的 seabios:https://github.com/ghuntley/seaslic

答案4

查看http://jamar.org/2012/09/28/installing-windows-2008-hp-oem-as-kvm-guest/

将 smbios 信息提供给客户机 xml conf 文件 (/etc/libvirt/qemu),可以使用 dmidecode 转储

更多信息请访问:http://libvirt.org/formatdomain.html#elementsSysinfo

它适用于我的 win2k12

相关内容