|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH OSSTEST v2 18/18] WIP: libvirt: migration + save/restore support.
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@xxxxxxxxxx>
---
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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |