[libvirt] [PATCH 6/7] Add sysinfo/smbios support to the QEmu driver

The patch is based on the possiblity in the QEmu command line to add -smbios options allowing to override the default values picked by QEmu. We need to detect this first from QEmu help output. If the domain is defined with smbios to be inherited from host then we pass the values coming from the Host own SMBIOS, but if the domain is defined with smbios to come from sysinfo, we use the ones coming from the domain definition. * src/qemu/qemu_conf.h: add the QEMUD_CMD_FLAG_SMBIOS_TYPE enum value * src/qemu/qemu_conf.c: scan the help output for the smbios support, and if available add support based on the domain definitions, and host data * tests/qemuhelptest.c: add the new enum in the outputs Signed-off-by: Daniel Veillard <veillard@redhat.com> --- src/qemu/qemu_conf.c | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/qemu/qemu_conf.h | 3 +- tests/qemuhelptest.c | 15 ++++-- 3 files changed, 129 insertions(+), 6 deletions(-)

On Tue, Nov 02, 2010 at 05:36:48PM +0100, Daniel Veillard wrote:
@@ -4092,6 +4171,44 @@ int qemudBuildCommandLine(virConnectPtr conn, } }
+ if ((def->smbios_mode != VIR_DOMAIN_SMBIOS_NONE) && + (def->smbios_mode != VIR_DOMAIN_SMBIOS_EMULATE) && + (qemuCmdFlags & QEMUD_CMD_FLAG_SMBIOS_TYPE)) {
It would be to report a VIR_ERR_CONFIG_UNSUPPORTED error in the else clause for this. Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Wed, Nov 03, 2010 at 11:51:07AM +0000, Daniel P. Berrange wrote:
On Tue, Nov 02, 2010 at 05:36:48PM +0100, Daniel Veillard wrote:
@@ -4092,6 +4171,44 @@ int qemudBuildCommandLine(virConnectPtr conn, } }
+ if ((def->smbios_mode != VIR_DOMAIN_SMBIOS_NONE) && + (def->smbios_mode != VIR_DOMAIN_SMBIOS_EMULATE) && + (qemuCmdFlags & QEMUD_CMD_FLAG_SMBIOS_TYPE)) {
It would be to report a VIR_ERR_CONFIG_UNSUPPORTED error in the else clause for this.
Hum ... Okay I see, Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (2)
-
Daniel P. Berrange
-
Daniel Veillard