Switch to 'virtio' as the default display device

Registered by Kashyap Chamarthy

What?
---------

Change Nova's default video display from 'cirrus' to 'virtio'.

Why?
-------

The "cirrus" display device has many limitations and is "considered
harmful"[1] by QEMU graphics maintainers since 2014.

The recommended[1] choice by the QEMU graphics maintainers is 'virtio'
(using the libvirt term) for both UEFI and BIOS guests:

  - Any Linux guest with kernel 4.4 (or a kernel with the Linux
    'virtio-vgpu' driver backported) can take full advantage of the
    'virtio' display device.

  - In case your guest kernel does _not_ have the kernel driver (called
    "virtio-gpu.ko"), no problem: the 'virtio' display device will
    gracefully fallback to VGA compatibility mode.

In other words, 'virtio' is a reasonable default _whether_ or not the
guest has a kernel 'virtio-gpu' driver. If the guest kernel has the
driver, it'll be used. Otherwise, it transparently falls back to the
VGA compat mode.

Lastly, the 'virtio' display device gets the most upstream
development[3], and "support for new, cool features will most likely be
added to this device."

Version requirements
-----------------------------

- Linux kernel version 4.4 or above
- QEMU version 2.6

Upstream Nova and its CI handsomely satisfy both the requirements:

  - Nova's minimum QEMU is 4.2.0
  - Ubuntu Focal, the LTS release, ships with Linux 5.4 series, so we're
    good there too. (And OSes like CentOS7 have the 'virtio-gpu' driver
    backported to them.)

Upgrade impact
----------------------

The 'cirrus' device still exists upstream; so any Nova guest with
'cirrus' that is migrated to a compute host that has 'virtio' as the
default will migrate just fine. Upon cold-reboot (stop + start), the
Nova instance will pick up 'virtio' as the default display device.

[1] https://www.kraxel.org/blog/2014/10/qemu-using-cirrus-considered-harmful/
[2] https://www.kraxel.org/blog/2019/09/display-devices-in-qemu/
[3] https://www.kraxel.org/blog/2019/09/display-devices-in-qemu/#virtio-vga

Blueprint information

Status:
Complete
Approver:
None
Priority:
Low
Drafter:
Kashyap Chamarthy
Direction:
Approved
Assignee:
Kashyap Chamarthy
Definition:
Approved
Series goal:
Accepted for yoga
Implementation:
Implemented
Milestone target:
None
Started by
Sylvain Bauza
Completed by
Sylvain Bauza

Related branches

Sprints

Whiteboard

[bauzas 20211116 approved as a specless BP during our today's weekly meeting]

Implementation patch : https://review.opendev.org/c/openstack/nova/+/798680

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.