$dst is a host hash/object, resulting in:
2015-08-04 22:35:25 Z executing ssh ... root@172.16.144.34 virsh
migrate debian.guest.osstest HASH(0x28f4310)
bash: -c: line 0: syntax error near unexpected token `('
bash: -c: line 0: `virsh migrate debian.guest.osstest HASH(0x28f4310)'
Switch to using the same pattern as xl.pm, which is to call the
argument (containing the host hash) $dho and for $dst to be a local
variable containing $dho->{Name}.
Also s/$ho/$sho/ to match xl.pm, since I think that is clearer about
what role everything has.
Fix the prototype too while editing this function.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
return check_for_command($self, "save");
}
-sub migrate ($) {
- my ($self,$gho,$dst,$timeout) = @_;
- my $ho = $self->{Host};
+sub migrate ($$$$) {
+ my ($self,$gho,$dho,$timeout) = @_;
+ my $sho = $self->{Host};
+ my $dst = $dho->{Name};
my $gn = $gho->{Name};
- target_cmd_root($ho, "virsh migrate $gn $dst", $timeout);
+ target_cmd_root($sho, "virsh migrate $gn $dst", $timeout);
}
sub save ($$$$) {