[gnome-boxes/gnome-3-4: 15/15] Add SPICE agent channel to newly created domains



commit 41cb1dbd81729fac18a12f52671536228862e357
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Sat Mar 17 02:04:57 2012 +0200

    Add SPICE agent channel to newly created domains
    
    https://bugzilla.gnome.org/show_bug.cgi?id=672268

 configure.ac             |    2 +-
 src/vm-configurator.vala |    8 ++++++++
 2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 1a6c1ad..5e9d63a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,7 +46,7 @@ GOBJECT_INTROSPECTION_MIN_VERSION=0.9.6
 GTK_MIN_VERSION=3.3.5
 GTK_VNC_MIN_VERSION=0.4.4
 LIBVIRT_GLIB_MIN_VERSION=0.0.6
-LIBVIRT_GCONFIG_MIN_VERSION=0.0.5
+LIBVIRT_GCONFIG_MIN_VERSION=0.0.7
 LIBXML2_MIN_VERSION=2.7.8
 SPICE_GTK_MIN_VERSION=0.9
 GUDEV_MIN_VERSION=165
diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala
index 2c4436e..0b3f93f 100644
--- a/src/vm-configurator.vala
+++ b/src/vm-configurator.vala
@@ -51,6 +51,14 @@ private class Boxes.VMConfigurator {
         }
         domain.add_device (graphics);
 
+        // SPICE agent channel. This is needed for features like copy&paste between host and guest etc to work.
+        var channel = new DomainChannel ();
+        channel.set_target_type (DomainChannelTargetType.VIRTIO);
+        channel.set_target_name ("com.redhat.spice.0");
+        var vmc = new DomainChardevSourceSpiceVmc ();
+        channel.set_source (vmc);
+        domain.add_device (channel);
+
         set_video_config (domain, install_media);
         set_sound_config (domain, install_media);
         set_tablet_config (domain, install_media);



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