]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
toolstack/libvirt: guest migrate, save and restore support
authorWei Liu <wei.liu2@citrix.com>
Sun, 8 Feb 2015 15:57:01 +0000 (15:57 +0000)
committerWei Liu <wei.liu2@citrix.com>
Thu, 30 Jul 2015 14:11:01 +0000 (15:11 +0100)
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Osstest/Toolstack/libvirt.pm

index 26a2fa35cda95d7f35e6c297939602c8bc5259af..5c6ca905cf05d81b2b9c07e9efcfe62fb26780e1 100644 (file)
@@ -93,17 +93,22 @@ sub saverestore_check ($) {
 
 sub migrate ($) {
     my ($self,$gho,$dst,$timeout) = @_;
-    die "Migration is not yet supported on libvirt.";
+    my $ho = $self->{Host};
+    my $gn = $gho->{Name};
+    target_cmd_root($ho, "virsh migrate $gn $dst", $timeout);
 }
 
 sub save ($$$$) {
     my ($self,$gho,$f,$timeout) = @_;
-    die "Save is not yet supported on libvirt.";
+    my $ho = $self->{Host};
+    my $gn = $gho->{Name};
+    target_cmd_root($ho, "virsh save $gn $f", $timeout);
 }
 
 sub restore ($$$$) {
     my ($self,$gho,$f,$timeout) = @_;
-    die "Restore is not yet supported on libvirt.";
+    my $ho = $self->{Host};
+    target_cmd_root($ho, "virsh restore $f", $timeout);
 }
 
 1;