[Pkg-libvirt-commits] [libguestfs] 73/233: launch: libvirt: Add force_tcg backend setting.
Hilko Bengen
bengen at moszumanska.debian.org
Wed Feb 19 21:10:57 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit 26f7fb237b713c798e23a336a3c4973513f83551
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Sat Jan 18 16:36:14 2014 +0000
launch: libvirt: Add force_tcg backend setting.
By using:
export LIBGUESTFS_BACKEND_SETTINGS=force_tcg
you can force the libvirt backend to use TCG (software emulation)
instead of KVM (hardware accelerated virtualization).
---
src/guestfs.pod | 4 ++--
src/launch-libvirt.c | 9 ++++++++-
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/guestfs.pod b/src/guestfs.pod
index 1c6d6ab..1f0a324 100644
--- a/src/guestfs.pod
+++ b/src/guestfs.pod
@@ -1494,8 +1494,8 @@ Currently the only backend setting is:
export LIBGUESTFS_BACKEND_SETTINGS=force_tcg
-which will force the direct backend to use TCG (software emulation)
-instead of KVM (hardware accelerated virtualization).
+which will force the direct and libvirt backends to use TCG (software
+emulation) instead of KVM (hardware accelerated virtualization).
=head2 ATTACHING TO RUNNING DAEMONS
diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
index cb61571..9b47d30 100644
--- a/src/launch-libvirt.c
+++ b/src/launch-libvirt.c
@@ -597,6 +597,7 @@ parse_capabilities (guestfs_h *g, const char *capabilities_xml,
xmlNodeSetPtr nodes;
xmlAttrPtr attr;
size_t seen_qemu, seen_kvm;
+ bool force_tcg;
doc = xmlParseMemory (capabilities_xml, strlen (capabilities_xml));
if (doc == NULL) {
@@ -663,7 +664,13 @@ parse_capabilities (guestfs_h *g, const char *capabilities_xml,
return -1;
}
- params->is_kvm = seen_kvm;
+ force_tcg = guestfs___get_backend_setting_bool (g, "force_tcg");
+
+ if (!force_tcg)
+ params->is_kvm = seen_kvm;
+ else
+ params->is_kvm = 0;
+
return 0;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list