Merge "libvirt: Switch the default video model from 'cirrus' to 'virtio'"

This commit is contained in:
Zuul
2021-11-18 15:54:13 +00:00
committed by Gerrit Code Review
3 changed files with 19 additions and 1 deletions
+1 -1
View File
@@ -2056,7 +2056,7 @@ class LibvirtConfigGuestVideo(LibvirtConfigGuestDevice):
super(LibvirtConfigGuestVideo, self).__init__(root_name="video",
**kwargs)
self.type = 'cirrus'
self.type = 'virtio'
self.vram = None
self.heads = None
self.driver_iommu = False
+9
View File
@@ -5940,6 +5940,15 @@ class LibvirtDriver(driver.ComputeDriver):
guestarch = libvirt_utils.get_arch(image_meta)
if CONF.libvirt.virt_type == 'parallels':
video.type = 'vga'
# NOTE(kchamart): 'virtio' is a sensible default whether or not
# the guest has the native kernel driver (called "virtio-gpu" in
# Linux) -- i.e. if the guest has the VirtIO GPU driver, it'll
# be used; otherwise, the 'virtio' model will gracefully
# fallback to VGA compatibiliy mode.
elif (guestarch in (fields.Architecture.I686,
fields.Architecture.X86_64) and not
CONF.spice.enabled):
video.type = 'virtio'
elif guestarch in (fields.Architecture.PPC,
fields.Architecture.PPC64,
fields.Architecture.PPC64LE):
@@ -0,0 +1,9 @@
---
features:
- |
From this release, Nova instances will get ``virtio`` as the default
display device (instead of ``cirrus``, which has many limitations).
If your guest has a native kernel (called "virtio-gpu" in Linux;
available since Linux 4.4 and above) driver, then it'll be used;
otherwise, the 'virtio' model will gracefully fallback to VGA
compatibiliy mode, which is still better than ``cirrus``.