diff --git a/nova/virt/libvirt/config.py b/nova/virt/libvirt/config.py index 303581dd3c..7129933f34 100644 --- a/nova/virt/libvirt/config.py +++ b/nova/virt/libvirt/config.py @@ -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 diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index 966f8ccdfa..a46e6b3f31 100644 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -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): diff --git a/releasenotes/notes/virtio-as-default-display-device-5341d3d5180036e2.yaml b/releasenotes/notes/virtio-as-default-display-device-5341d3d5180036e2.yaml new file mode 100644 index 0000000000..d27efce1fc --- /dev/null +++ b/releasenotes/notes/virtio-as-default-display-device-5341d3d5180036e2.yaml @@ -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``.