All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: ian.jackson@eu.citrix.com
Cc: Jim Fehlig <jfehlig@suse.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	xen-devel@lists.xen.org
Subject: [PATCH OSSTEST v2 18/18] WIP: libvirt: migration + save/restore support.
Date: Tue, 2 Dec 2014 16:04:59 +0000	[thread overview]
Message-ID: <1417536299-1810-18-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1417536141.29004.6.camel@citrix.com>

Note that this remains stubbed out, since making it actually work
requires more work (i.e. I need to figure out what is involved, seem
to need TLS and a CA etc...)

Appears to need gnutls enabling for migration, even to localhost.

NB haven't managed to get this actually working. With GNUtls enabled
it wants a CA certificate installed:
    error: Cannot read CA certificate '/etc/pki/CA/cacert.pem': No such file or directory

Other attempts give:
    # virsh migrate --live debian.guest.osstest xen://
    error: Requested operation is not valid: domain 'debian.guest.osstest' is already active

Also need to try tcp:// based, by bodging libvirtd.conf to turn on
tcp.

TODO: Ask Jim for advice...

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 Osstest/Toolstack/libvirt.pm | 17 +++++++++++++++++
 ts-libvirt-build             |  3 +++
 ts-xen-build-prep            |  1 +
 3 files changed, 21 insertions(+)

diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm
index 8030aeb..e427f63 100644
--- a/Osstest/Toolstack/libvirt.pm
+++ b/Osstest/Toolstack/libvirt.pm
@@ -65,12 +65,29 @@ sub shutdown_wait ($$) {
 
 sub migrate_check ($) {
     my ($self) = @_;
+
+    # Localhost migration currently requires more setup on our side
+    # than we currently do. Once that is sorted out the code below
+    # will correctly determine whether the version of libvirt under
+    # test even supports the possibility.
     die "Migration check is not yet supported on libvirt.";
+
+    my $ho = $self->{Host};
+    my $caps = target_cmd_output_root($ho, "virsh capabilities");
+    my $rc = ($caps =~ m/<migration_features>/) ? 0 : 1;
+    logm("rc=$rc");
+    return $rc;
 }
 
 sub migrate ($) {
     my ($self,$gho,$dst,$to) = @_;
     die "Migration is not yet supported on libvirt.";
+
+    my $ho = $self->{Host};
+    my $gn = $gho->{Name};
+    target_cmd_root($ho,
+		    "virsh migrate $gn $dst",
+		    $to);
 }
 
 sub save ($$$$) {
diff --git a/ts-libvirt-build b/ts-libvirt-build
index 878d4e2..c160533 100755
--- a/ts-libvirt-build
+++ b/ts-libvirt-build
@@ -55,6 +55,7 @@ sub config() {
             ./autogen.sh --no-git \\
                          --with-libxl --without-xen --without-xenapi --without-selinux \\
                          --without-lxc --without-vbox --without-uml \\
+                         --with-gnutls \\
                          --sysconfdir=/etc --localstatedir=/var #/
 END
 }
@@ -80,6 +81,8 @@ END
                                  $builddir.'/dist/etc/init.d/libvirtd');
     target_cmd_build($ho, 60, $builddir, <<END);
         chmod +x $builddir/dist/etc/init.d/libvirtd
+	#sed -i -e 's/\#\?listen_tls = .*/listen_tls = 0/g' $builddir/dist/etc/libvirt/libvirtd.conf
+	#sed -i -e 's/\#\?listen_tcp = .*/listen_tcp = 1/g' $builddir/dist/etc/libvirt/libvirtd.conf
 END
 }
 
diff --git a/ts-xen-build-prep b/ts-xen-build-prep
index 05a7857..ae60b30 100755
--- a/ts-xen-build-prep
+++ b/ts-xen-build-prep
@@ -174,6 +174,7 @@ sub prep () {
                                libpci-dev libncurses5-dev libssl-dev python-dev
                                libx11-dev git-core uuid-dev gettext gawk
                                libsdl-dev libyajl-dev libaio-dev libpixman-1-dev
+                               libgnutls-dev
                                libglib2.0-dev liblzma-dev pkg-config
                                autoconf automake libtool xsltproc
                                libxml2-utils libxml2-dev libnl-dev
-- 
2.1.1

  parent reply	other threads:[~2014-12-02 16:04 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-02 16:02 [PATCH v2 OSSTEST 0/18] Implement for driving libvirt via virsh Ian Campbell
2014-12-02 16:04 ` [PATCH OSSTEST v2 01/18] apt: lock osstest's usages of apt-get against each other Ian Campbell
2015-01-20 18:19   ` Ian Jackson
2015-01-21 11:29     ` Ian Campbell
2015-01-21 12:13       ` Ian Jackson
2014-12-02 16:04 ` [PATCH OSSTEST v2 02/18] ts-logs-capture: Collect some libvirt logs and capabilities Ian Campbell
2015-01-20 18:20   ` Ian Jackson
2014-12-02 16:04 ` [PATCH OSSTEST v2 03/18] Pass host to toolstack() Ian Campbell
2015-01-20 18:21   ` Ian Jackson
2014-12-02 16:04 ` [PATCH OSSTEST v2 04/18] ts-rumpuserxen-demo-xenstorels: Use standard functions for things Ian Campbell
2015-01-20 18:22   ` Ian Jackson
2014-12-02 16:04 ` [PATCH OSSTEST v2 05/18] Toolstack: use get_host_method_object() to manage toolstack selection Ian Campbell
2015-01-20 18:23   ` Ian Jackson
2014-12-02 16:04 ` [PATCH OSSTEST v2 06/18] TestSupport: always use xl for generic operations Ian Campbell
2015-01-20 18:26   ` Ian Jackson
2014-12-02 16:04 ` [PATCH OSSTEST v2 07/18] TestSupport: guest_create takes a $ho Ian Campbell
2015-01-20 18:27   ` Ian Jackson
2014-12-02 16:04 ` [PATCH OSSTEST v2 08/18] Toolstack: Refactor guest lifecycle Ian Campbell
2015-01-13 16:16   ` Ian Campbell
2015-01-14 17:01     ` Ian Jackson
2015-01-20 18:32   ` Ian Jackson
2015-01-21 15:59     ` Ian Campbell
2015-01-21 16:28       ` Ian Jackson
2014-12-02 16:04 ` [PATCH OSSTEST v2 09/18] Toolstack: Refactor consolecmd handling Ian Campbell
2015-01-20 18:34   ` Ian Jackson
2015-01-22 11:24     ` Ian Campbell
2015-01-22 11:26       ` Ian Campbell
2015-01-22 14:35         ` Ian Campbell
2015-01-22 14:41           ` Ian Jackson
2015-01-22 14:42             ` Ian Campbell
2015-01-22 15:15               ` Ian Jackson
2015-01-22 15:17                 ` Ian Campbell
2014-12-02 16:04 ` [PATCH OSSTEST v2 10/18] Toolstack: Refactor shutdown support Ian Campbell
2015-01-20 18:35   ` Ian Jackson
2014-12-02 16:04 ` [PATCH OSSTEST v2 11/18] Toolstack: Refactor migration support check Ian Campbell
2015-01-20 18:45   ` Ian Jackson
2014-12-02 16:04 ` [PATCH OSSTEST v2 12/18] Toolstack: Refactor migration support Ian Campbell
2015-01-20 18:38   ` Ian Jackson
2015-01-22 15:06     ` Ian Campbell
2015-01-22 15:17       ` Ian Jackson
2015-01-22 15:19         ` Ian Campbell
2015-01-22 15:38           ` Ian Jackson
2015-01-22 16:11           ` Ian Campbell
2014-12-02 16:04 ` [PATCH OSSTEST v2 13/18] Toolstack: Refactor save/restore support Ian Campbell
2015-01-20 18:41   ` Ian Jackson
2014-12-02 16:04 ` [PATCH OSSTEST v2 14/18] libvirt: Implement initscript restart which has some hope of working Ian Campbell
2015-01-20 18:37   ` Ian Jackson
2014-12-02 16:04 ` [PATCH OSSTEST v2 15/18] libvirt: Implement shutdown_wait Ian Campbell
2015-01-20 18:44   ` Ian Jackson
2014-12-02 16:04 ` [PATCH OSSTEST v2 16/18] Toolstack: Remove Command field for all toolstacks Ian Campbell
2015-01-20 18:39   ` Ian Jackson
2015-01-21 11:49     ` Ian Campbell
2015-01-21 12:14       ` Ian Jackson
2014-12-02 16:04 ` [PATCH OSSTEST v2 17/18] ts-guest-start: Use guest_create Ian Campbell
2015-01-20 18:46   ` Ian Jackson
2014-12-02 16:04 ` Ian Campbell [this message]
2014-12-13 16:06   ` [PATCH OSSTEST v2 18/18] WIP: libvirt: migration + save/restore support Wei Liu
2015-01-20 18:49   ` Ian Jackson
2015-01-21  5:42     ` Jim Fehlig
2015-01-21  9:48       ` Ian Campbell
2015-01-21 11:36         ` [PATCH OSSTEST v2 18/18] WIP: libvirt: migration + save/restore support. [and 1 more messages] Ian Jackson
2015-01-21 15:05           ` Jim Fehlig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1417536299-1810-18-git-send-email-ian.campbell@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jfehlig@suse.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.