Pick guest CPU architecture based on host arch.
Currently, in many places, Nova's libvirt driver makes decisions on how
to configure guest XML based on *host* CPU architecture
("caps.
the said code needs to be reworked to make those decisions based on
*guest* CPU architecture (i.e. "guest.arch", which should be set based
on the image metadata property, `hw_architecture`). A related piece of
work is to distinguish between hosts that can do AArch64 (or PPC64, etc)
via KVM (which is hardware-
via plain emulation ("TCG") — this is to ensure that guests are not
arbitrarily scheduled on hosts that are incapable of hardware
acceleration, thus losing out on performance-related benefits.
This rework will make sure that we will: pick the correct QEMU binary
for a guest with different CPU architecture than the host; choose the
correct QEMU machine type for an x86_64 guest running on an AArch64
host; and so forth.
Blueprint information
- Status:
- Complete
- Approver:
- Balazs Gibizer
- Priority:
- Undefined
- Drafter:
- Kashyap Chamarthy
- Direction:
- Approved
- Assignee:
- Jonathan Race
- Definition:
- Approved
- Series goal:
- Accepted for yoga
- Implementation:
- Implemented
- Milestone target:
- None
- Started by
- Jonathan Race
- Completed by
- Jonathan Race
Related branches
Sprints
Whiteboard
http://
Note from nova-victoria-ptg:
https:/
If you set the virt_type to qemu then nova will report all the supported archs as compute capability
2021 Addition:
https:/
Additional work is being done and has added initial support for performing this function through adding an additional image metadata value, hw_emulation_
Items to consider are to ensure your nova nodes have all desired qemu binaries installed for the support you want, and that set the appropriate values in the image metadata.
hw_emulation_
hw_machine_type
hw_firmware_type (specific to aarch)
hw_video_type (specific to s390x)
Valid supported architectures on x86:
AARCH64
PPC64
Proposed Architecture support:
MIPS (Working on libvirt bug fix)
s390x (Troubleshooting kernel crashafter build)
2022 Additions:
Spec:
https:/
Nova:
https:/
https:/
https:/
os-traits:
https:/
[20220113 bauzas] Spec was approved https:/
[20200125 chateaulav] os-trait patch approved https:/
Work Items
Work items:
Add new traits: DONE
Update prefilter: DONE
Modify libvirt virt driver to perform checks for emulation architecture: DONE
Add new property to image_meta objects: DONE
Modify libvirt virt config to pull OS arch into LibvirtConfigGuest: DONE
Final Testing: DONE
Merge: DONE