Can't define a cpu_model from a different architecture

Bug #1902216 reported by Belmiro Moreira
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Wishlist
Belmiro Moreira

Bug Description

"""
It would be great if Nova supports instances with a different architecture than the host.
My use case is to be run aarch64 guests in a x86_64 compute node.
"""

In order to create an aarch64 guest in an x86_64 compute node we need to define the emulated CPU.
However, Nova doesn't allow to define a CPU model that doesn't match with the host architecture.

For example:
CONF.libvirt.virt_type=qemu
CONF.libvirt.cpu_model=cortex-a57
CONF.libvirt.cpu_mode=custom

It fails with:
nova.exception.InvalidCPUInfo: Configured CPU model: cortex-a57 is not correct, or your host CPU arch does not support this model. Please correct your config and try again.

The problem is related with the this nova check in driver.py:
if cpu_info['arch'] not in (fields.Architecture.I686,
                            fields.Architecture.X86_64,
                            fields.Architecture.PPC64,
                            fields.Architecture.PPC64LE,
                            fields.Architecture.PPC):
    return model

Again, it's relying the host architecture for the x86_64.

Environment
===========

Tested using the master branch (29/10/2020)

Other
=====

I'm now opening target bugs for the generic issue reported in https://bugs.launchpad.net/nova/+bug/1863728

Tags: libvirt
Changed in nova:
assignee: nobody → Belmiro Moreira (moreira-belmiro-email-lists)
Changed in nova:
status: New → Confirmed
importance: Undecided → Wishlist
tags: added: libvirt
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.