Bug 600223

Summary: RFE: SMBIOS: Detect and pass host serial # to guest OS
Product: [Community] Virtualization Tools Reporter: Grant Williamson <grant_williamson>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: berrange, crobinso, jonstanley, xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-07 14:31:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 636033    

Description Grant Williamson 2010-06-04 07:48:49 UTC
Description of problem:
For the registration and license management of guest OS, it is important that we can track the serial information of the host machine being used from within the guest os.
We would like libvirt to be able to detect the following. Which can be found on most machines using dmidecode.

Serial Number: xxxxxxx
UUID: xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

This could then be offered/detected by the guest OS.

I spoke to Jonathan Blandford, who asked me to open a ticket for this request.

Comment 1 Jon Stanley 2011-04-20 17:09:18 UTC
Note that it's also important to be able to pass arbitrary values in these SMBIOS fields (and others) - we're particularly interested in asset tag (which is in SMBIOS type 3, which is unsupported by QEMU at the moment), but being able to set arbitrary values in serial number is useful as well. 

This part is already there:

http://libvirt.org/formatdomain.html#elementsSysinfo

The part that was originally requested, the ability to pass through the values from the host, isn't there. I assume this is only applicable for the qemu driver, since it's the "most important" driver in libvirt for enterprise customers.

Comment 2 Daniel Berrangé 2011-04-21 08:58:29 UTC
> The part that was originally requested, the ability to pass through the values
> from the host, isn't there.

Yes it is:

  http://libvirt.org/formatdomain.html#elementsOSBIOS

  "<smbios>: The mode attribute must be specified, and is either "emulate" (let the hypervisor generate all values), "host" (copy all of Block 0 and Block 1, except for the UUID, from the host's SMBIOS values; the virConnectGetSysinfo call can be used to see what values are copied), or "sysinfo" (use the values in the sysinfo element).

eg, to pass values from the host:

  <os>
    ....
    <smbios mode='host'/>
  </os>