I'm not seeing any major changes in nova between newton and ocata wrt host-model. That's not to say this isn't a bug in nova.
As I noted previously, xenial-ocata is using libvirt 2.5.0 whereas xenial-mitaka and xenial-newton are using libvirt 1.3.1. This error and the function that it comes from are new since sometime after libvirt 1.3.1: "libvirtError: unsupported configuration: CPU mode 'host-model' for aarch64 kvm domain on aarch64 host is not supported by hypervisor".
This is coming from the following code, pasted from libvirt 2.5.0:
5020 static int
5021 qemuProcessUpdateGuestCPU(virDomainDefPtr def,
5022 virQEMUCapsPtr qemuCaps,
5023 virCapsPtr caps,
5024 unsigned int flags)
5025 {
5026 int ret = -1;
5027 size_t nmodels = 0;
5028 char **models = NULL;
5029
5030 if (!def->cpu)
5031 return 0;
5032
5033 /* nothing to do if only topology part of CPU def is used */
5034 if (def->cpu->mode == VIR_CPU_MODE_CUSTOM && !def->cpu->model)
5035 return 0;
5036
5037 /* Old libvirt added host CPU model to host-model CPUs for migrations,
5038 * while new libvirt just turns host-model into custom mode. We need
5039 * to fix the mode to maintain backward compatibility and to avoid
5040 * the CPU model to be replaced in virCPUUpdate.
5041 */
5042 if (!(flags & VIR_QEMU_PROCESS_START_NEW) &&
5043 ARCH_IS_X86(def->os.arch) &&
5044 def->cpu->mode == VIR_CPU_MODE_HOST_MODEL &&
5045 def->cpu->model) {
5046 def->cpu->mode = VIR_CPU_MODE_CUSTOM;
5047 }
5048
5049 if (!virQEMUCapsIsCPUModeSupported(qemuCaps, caps, def->virtType,
5050 def->cpu->mode)) {
5051 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
5052 _("CPU mode '%s' for %s %s domain on %s host is not "
5053 "supported by hypervisor"),
5054 virCPUModeTypeToString(def->cpu->mode),
5055 virArchToString(def->os.arch),
5056 virDomainVirtTypeToString(def->virtType),
5057 virArchToString(caps->host.arch));
5058 return -1;
5059 }
Storing the updated CPU definition in the live domain definition saves
us from having to update it over and over when we need it. Not to
mention that we will soon further update the CPU definition according to
QEMU once it's started.
A highly wanted side effect of this patch, libvirt will pass all CPU
features explicitly specified in domain XML to QEMU, even those that are
already included in the host model.
I'm not seeing any major changes in nova between newton and ocata wrt host-model. That's not to say this isn't a bug in nova.
As I noted previously, xenial-ocata is using libvirt 2.5.0 whereas xenial-mitaka and xenial-newton are using libvirt 1.3.1. This error and the function that it comes from are new since sometime after libvirt 1.3.1: "libvirtError: unsupported configuration: CPU mode 'host-model' for aarch64 kvm domain on aarch64 host is not supported by hypervisor".
This is coming from the following code, pasted from libvirt 2.5.0:
5020 static int teGuestCPU( virDomainDefPtr def, PROCESS_ START_NEW) && X86(def- >os.arch) && MODE_HOST_ MODEL && MODE_CUSTOM; CPUModeSupporte d(qemuCaps, caps, def->virtType, VIR_ERR_ CONFIG_ UNSUPPORTED, oString( def->cpu- >mode), (def->os. arch), peToString( def->virtType) , (caps-> host.arch) );
5021 qemuProcessUpda
5022 virQEMUCapsPtr qemuCaps,
5023 virCapsPtr caps,
5024 unsigned int flags)
5025 {
5026 int ret = -1;
5027 size_t nmodels = 0;
5028 char **models = NULL;
5029
5030 if (!def->cpu)
5031 return 0;
5032
5033 /* nothing to do if only topology part of CPU def is used */
5034 if (def->cpu->mode == VIR_CPU_MODE_CUSTOM && !def->cpu->model)
5035 return 0;
5036
5037 /* Old libvirt added host CPU model to host-model CPUs for migrations,
5038 * while new libvirt just turns host-model into custom mode. We need
5039 * to fix the mode to maintain backward compatibility and to avoid
5040 * the CPU model to be replaced in virCPUUpdate.
5041 */
5042 if (!(flags & VIR_QEMU_
5043 ARCH_IS_
5044 def->cpu->mode == VIR_CPU_
5045 def->cpu->model) {
5046 def->cpu->mode = VIR_CPU_
5047 }
5048
5049 if (!virQEMUCapsIs
5050 def->cpu->mode)) {
5051 virReportError(
5052 _("CPU mode '%s' for %s %s domain on %s host is not "
5053 "supported by hypervisor"),
5054 virCPUModeTypeT
5055 virArchToString
5056 virDomainVirtTy
5057 virArchToString
5058 return -1;
5059 }
This code was introduced by the following commit:
commit 7ce711a30eaf882 ccd0217b2528362 b563b6d670
Author: Jiri Denemark <email address hidden>
Date: Wed Jun 22 15:53:48 2016 +0200
qemu: Update guest CPU def in live XML
Storing the updated CPU definition in the live domain definition saves
us from having to update it over and over when we need it. Not to
mention that we will soon further update the CPU definition according to
QEMU once it's started.
A highly wanted side effect of this patch, libvirt will pass all CPU
features explicitly specified in domain XML to QEMU, even those that are
already included in the host model.
This patch should fix the following bugs: /bugzilla. redhat. com/show_ bug.cgi? id=1207095 /bugzilla. redhat. com/show_ bug.cgi? id=1339680 /bugzilla. redhat. com/show_ bug.cgi? id=1371039 /bugzilla. redhat. com/show_ bug.cgi? id=1373849 /bugzilla. redhat. com/show_ bug.cgi? id=1375524 /bugzilla. redhat. com/show_ bug.cgi? id=1377913
https:/
https:/
https:/
https:/
https:/
https:/
Signed-off-by: Jiri Denemark <email address hidden>