[gnome-boxes] vm-configuration: Expand the check for virtio devices



commit e366a8ca09832f2d12004a0dd64a583ea5c91104
Author: Fabiano FidĂȘncio <fidencio redhat com>
Date:   Fri Oct 12 09:09:53 2018 +0200

    vm-configuration: Expand the check for virtio devices
    
    Although it's not a common case for an OS to have support for virtio1 but
    not support virtio1, let's expand the check for the safety sake.
    
    Related: https://bugzilla.redhat.com/show_bug.cgi?id=1581422
    
    Signed-off-by: Fabiano FidĂȘncio <fidencio redhat com>

 src/vm-configurator.vala | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala
index dcff9d5e..148bbd8b 100644
--- a/src/vm-configurator.vala
+++ b/src/vm-configurator.vala
@@ -116,9 +116,10 @@ public static Domain create_domain_config (InstallerMedia install_media, string
         console.set_source (new DomainChardevSourcePty ());
         domain.add_device (console);
 
+        var supports_virtio_net = install_media.supports_virtio_net || install_media.supports_virtio1_net;
         var iface = create_network_interface (domain,
                                               is_libvirt_bridge_net_available (),
-                                              install_media.supports_virtio_net);
+                                              supports_virtio_net);
         domain.add_device (iface);
 
         return domain;
@@ -314,7 +315,7 @@ public static void set_target_media_config (Domain         domain,
         disk.set_driver_cache (DomainDiskCacheType.WRITEBACK);
 
         var dev_letter_str = ((char) (dev_index + 97)).to_string ();
-        if (install_media.supports_virtio_disk) {
+        if (install_media.supports_virtio_disk || install_media.supports_virtio1_disk) {
             debug ("Using virtio controller for the main disk");
             disk.set_target_bus (DomainDiskBus.VIRTIO);
             disk.set_target_dev ("vd" + dev_letter_str);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]