Skip to content

Commit 7aa3a0f

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "libvirt: Switch the default video model from 'cirrus' to 'virtio'"
2 parents 52bd1e5 + cc59698 commit 7aa3a0f

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

nova/virt/libvirt/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2056,7 +2056,7 @@ def __init__(self, **kwargs):
20562056
super(LibvirtConfigGuestVideo, self).__init__(root_name="video",
20572057
**kwargs)
20582058

2059-
self.type = 'cirrus'
2059+
self.type = 'virtio'
20602060
self.vram = None
20612061
self.heads = None
20622062
self.driver_iommu = False

nova/virt/libvirt/driver.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5940,6 +5940,15 @@ def _add_video_driver(self, guest, image_meta, flavor):
59405940
guestarch = libvirt_utils.get_arch(image_meta)
59415941
if CONF.libvirt.virt_type == 'parallels':
59425942
video.type = 'vga'
5943+
# NOTE(kchamart): 'virtio' is a sensible default whether or not
5944+
# the guest has the native kernel driver (called "virtio-gpu" in
5945+
# Linux) -- i.e. if the guest has the VirtIO GPU driver, it'll
5946+
# be used; otherwise, the 'virtio' model will gracefully
5947+
# fallback to VGA compatibiliy mode.
5948+
elif (guestarch in (fields.Architecture.I686,
5949+
fields.Architecture.X86_64) and not
5950+
CONF.spice.enabled):
5951+
video.type = 'virtio'
59435952
elif guestarch in (fields.Architecture.PPC,
59445953
fields.Architecture.PPC64,
59455954
fields.Architecture.PPC64LE):
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
features:
3+
- |
4+
From this release, Nova instances will get ``virtio`` as the default
5+
display device (instead of ``cirrus``, which has many limitations).
6+
If your guest has a native kernel (called "virtio-gpu" in Linux;
7+
available since Linux 4.4 and above) driver, then it'll be used;
8+
otherwise, the 'virtio' model will gracefully fallback to VGA
9+
compatibiliy mode, which is still better than ``cirrus``.

0 commit comments

Comments
 (0)