[libvirt] How to define QEMU/SMBIOS Attributes in virsh

Daniel P. Berrange berrange at redhat.com
Wed Jul 1 17:49:04 UTC 2015


On Wed, Jul 01, 2015 at 03:01:40PM +0200, Holger Schranz wrote:
> Hello,
> 
> I have a "request for Help" please.
> 
> Myself:
> I'm a native german language speaker and
> I' work with qemu/virsh since 6 months now.
> At the moment I try to define/configure qemu/smbios
> attributes in a virsh xml-file.
> 
> My current problem:
> I need to configure two on-board lan elements.
> Thanks to Gerd Hoffmann (Qemu group). He gave me the hint for
> smbios/acpi configuration. For this configuration I need a
> type 41 record. I found on http://libvirt.org some descriptions
> for smbios but only for type 0 and 1.
> 
> In qemu the solution is available:
> 
> [Qemu-devel] [PATCH 2/2] smbios: Allow device ID instead of PCI address
> http://lists.gnu.org/archive/html/qemu-devel/2013-11/msg02350.html
> @@ -1336,9 +1338,10 @@ Specify SMBIOS type 0 fields Specify SMBIOS type 1
> fields
>  @item -smbios
> type=41,address at hidden,address at hidden,address at hidden,status=on|off][,address at hidden|n}]
> address at hidden -smbios
> type=41,address at hidden,address at hidden,address at hidden,status=on|off][,address at hidden|n}]
>  Add SMBIOS type 41 fields (Onboard Devices Extended Information). Could be
>  specified multiple times for different devices. Mandatory options are
> address at hidden in form "[[<domain>:]<bus>:]<slot>.<func>" and
> address at hidden in form "[[<domain>:]<bus>:]<slot>.<func>" or @option{id},
> and
>  @option{instance} number. @option{instance} shoud be in range [1, 255] and
>  should be unique within specified @option{device-type}.
> @option{designation} is
>  an optional string that somehow designates device. @option{status} is a
> device
> @@ -1365,6 +1368,9 @@ qemu-i386 \
>  -netdev user,id=hostnet0 \
>  -device e1000,netdev=hostnet0,id=net0,bus=pci.0,addr=0x1f \
>  -smbios type=41,address=00:1f.0,instance=1,designation="NIC
> 1",device-type=ethernet \
> +-netdev user,id=hostnet1 \
> +-device e1000,netdev=hostnet1,id=net1 \
> +-smbios type=41,id=net1,instance=2,designation="NIC 2",device-type=ethernet
> \
>  < ... other qemu options ... >
>  @end example
> 
> So my question: How can I configure such record in a virsh xml-file please.

There's no official support for SMBIOS type 41 fields in libvirt. Please do
file a bug report requesting this feature against libvirt. Meanwhile your
only option is to use custom command line passthrough in libvirt

https://www.berrange.com/posts/2011/12/19/using-command-line-arg-monitor-command-passthrough-with-libvirt-and-kvm/


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list