← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1902203] [NEW] Instance architecture should be reflected in the instance domain

 

Public bug reported:

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

The issue is that nova always uses the architecture from the host when defining the instance domain and not what's defined in the image architecture.
Also, because of this the emulator is not correctly defined.

Almost all the pieces are already there!
- CONF.libvirt.hw_machine_type / or using the instance metadata
(it's defined as expected in the instance domain, I'm using "virt-4.0")

- CONF.libvirt.virt_type
(it's defined as expected in the instance domain, I'm using "qemu")

- Defined the image architecture to "aarch64". Actually Nova reads this
property from the image but doesn't use it.

===

The instance creation fails because:

Nova only uses in the domain definition: 
<type machine="virt-4.0">hvm</type>

and then libvirt uses the host architecture in the domain definition.
In my case this results in using the x86_64 emulator.

When hardcoding the right architecture in the guest.os_mach_type it works as expected.
if self.os_mach_type is not None:
    type_node.set("arch", 'aarch64')
    type_node.set("machine", self.os_mach_type)

The domain is created correctly:
<type arch='aarch64' machine='virt-4.0'>hvm</type>

<emulator>/usr/bin/qemu-system-aarch64</emulator>

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

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

Other
=====

I'm now opening target bugs for this issue.
It was first reported has a generic bug in https://bugs.launchpad.net/nova/+bug/1863728

** Affects: nova
     Importance: Undecided
         Status: New

** Description changed:

  """
  It would be great if Nova supports instances with a different architecture than the host.
  An use case would be run aarch64 guests in a x86_64 compute node.
  """
  
  The issue is that nova always uses the architecture from the host when defining the instance domain and not what's defined in the image architecture.
  Also, because of this the emulator is not correctly defined.
  
  Almost all the pieces are already there!
- - CONF.libvirt.hw_machine_type / or using the instance metadata 
+ - CONF.libvirt.hw_machine_type / or using the instance metadata
  (it's defined as expected in the instance domain, I'm using "virt-4.0")
  
- - CONF.libvirt.virt_type 
+ - CONF.libvirt.virt_type
  (it's defined as expected in the instance domain, I'm using "qemu")
  
  - Defined the image architecture to "aarch64". Actually Nova reads this
  property from the image but doesn't use it.
  
  ===
  
  The instance creation fails because:
  
- Nova only uses in the domain definition: <type machine="virt-4.0">hvm</type>
+ Nova only uses in the domain definition: 
+ <type machine="virt-4.0">hvm</type>
+ 
  and then libvirt uses the host architecture in the domain definition.
  In my case this results in using the x86_64 emulator.
  
  When hardcoding the right architecture in the guest.os_mach_type it works as expected.
  if self.os_mach_type is not None:
-     type_node.set("arch", 'aarch64')
-     type_node.set("machine", self.os_mach_type)
+     type_node.set("arch", 'aarch64')
+     type_node.set("machine", self.os_mach_type)
  
  The domain is created correctly:
  <type arch='aarch64' machine='virt-4.0'>hvm</type>
  
  <emulator>/usr/bin/qemu-system-aarch64</emulator>
- 
  
  Environment
  ===========
  
  Tested using the master branch (29/10/2020)
  
  Other
  =====
  
  I'm now opening target bugs for this issue.
  It was first reported has a generic bug in https://bugs.launchpad.net/nova/+bug/1863728

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1902203

Title:
  Instance architecture should be reflected in the instance domain

Status in OpenStack Compute (nova):
  New

Bug description:
  """
  It would be great if Nova supports instances with a different architecture than the host.
  An use case would be run aarch64 guests in a x86_64 compute node.
  """

  The issue is that nova always uses the architecture from the host when defining the instance domain and not what's defined in the image architecture.
  Also, because of this the emulator is not correctly defined.

  Almost all the pieces are already there!
  - CONF.libvirt.hw_machine_type / or using the instance metadata
  (it's defined as expected in the instance domain, I'm using "virt-4.0")

  - CONF.libvirt.virt_type
  (it's defined as expected in the instance domain, I'm using "qemu")

  - Defined the image architecture to "aarch64". Actually Nova reads
  this property from the image but doesn't use it.

  ===

  The instance creation fails because:

  Nova only uses in the domain definition: 
  <type machine="virt-4.0">hvm</type>

  and then libvirt uses the host architecture in the domain definition.
  In my case this results in using the x86_64 emulator.

  When hardcoding the right architecture in the guest.os_mach_type it works as expected.
  if self.os_mach_type is not None:
      type_node.set("arch", 'aarch64')
      type_node.set("machine", self.os_mach_type)

  The domain is created correctly:
  <type arch='aarch64' machine='virt-4.0'>hvm</type>

  <emulator>/usr/bin/qemu-system-aarch64</emulator>

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

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

  Other
  =====

  I'm now opening target bugs for this issue.
  It was first reported has a generic bug in https://bugs.launchpad.net/nova/+bug/1863728

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1902203/+subscriptions