I have bypassed it by adding 2 lines of code to driver.py
def get_host_capabilities(self):
"""Returns an instance of config.LibvirtConfigCaps representing
the capabilities of the host.
"""
if not self._caps:
xmlstr = self._conn.getCapabilities() self._caps = vconfig.LibvirtConfigCaps() self._caps.parse_str(xmlstr)
if hasattr(libvirt, 'VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES'): try: features = self._conn.baselineCPU( [self._caps.host.cpu.to_xml()], libvirt.VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES)
# Add Code to remove duplicate Features (Marwan AKIKI) for f in self._caps.host.cpu.features: features=features.replace(" <feature policy='require' name='" + f.name + "'/>\n", '')
# FIXME(wangpan): the return value of baselineCPU should be # None or xml string, but libvirt has a bug # of it from 1.1.2 which is fixed in 1.2.0, # this -1 checking should be removed later. if features and features != -1: self._caps.host.cpu.parse_str(features) except libvirt.VIR_ERR_NO_SUPPORT: # Note(yjiang5): ignore if libvirt has no support pass
return self._caps
I have bypassed it by adding 2 lines of code to driver.py
def get_host_ capabilities( self): LibvirtConfigCa ps representing getCapabilities ()
self. _caps = vconfig. LibvirtConfigCa ps()
self. _caps.parse_ str(xmlstr) BASELINE_ CPU_EXPAND_ FEATURES' ):
try:
features = self._conn. baselineCPU(
[self. _caps.host. cpu.to_ xml()],
libvirt. VIR_CONNECT_ BASELINE_ CPU_EXPAND_ FEATURES)
"""Returns an instance of config.
the capabilities of the host.
"""
if not self._caps:
xmlstr = self._conn.
if hasattr(libvirt, 'VIR_CONNECT_
return self._caps