Comment 6 for bug 1834506

Revision history for this message
Miguel Ángel Herranz Trillo (maherranzt) wrote :

I dug a bit more and I think I found it. That "OpenStack Nova" string is defined here:

nova/version.py:
----------------

NOVA_PRODUCT = "OpenStack Nova"

def product_string():
    _load_config()

    return NOVA_PRODUCT

and used in the driver to setup 'system_product'

nova/virt/libvirt/driver.py:
----------------------------

    def _get_guest_config_sysinfo(self, instance):
        sysinfo = vconfig.LibvirtConfigGuestSysinfo()
        ...
        sysinfo.system_product = version.product_string()

which is translated again to Libvirt XML schema (https://libvirt.org/formatdomain.html#elementsSysinfo) in charge of DMI entries of the VM.

nova/virt/libvirt/config.py:
----------------------------

    def format_dom(self):
        sysinfo = super(LibvirtConfigGuestSysinfo, self).format_dom()
        ...
        system = etree.Element("system")
        ...
        if self.system_product is not None:
            system.append(self._text_node("entry", self.system_product,
                                          name="product"))
        ...
        if len(list(system)) > 0:
            sysinfo.append(system)

        return sysinfo

So the difference seems to be that KVM/etc uses DMI tag at `domain/sysinfo/system/entry[name='product']` and LXC should use env var tag at `domain/os/initenv[name='product_name']` which is handled in another private member function of the driver.