From e0470902d8c42b029bf280ed041ff3173bad3781 Mon Sep 17 00:00:00 2001 From: jars99 Date: Thu, 29 Jan 2009 23:07:32 +0000 Subject: [PATCH] This patch returns the message "Guest is already on host $targ" when a xen vm is migrated to the same host is was already on. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2671 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/xen.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/xen.pm b/xCAT-server/lib/xcat/plugins/xen.pm index dbf44fd1d..200effc42 100644 --- a/xCAT-server/lib/xcat/plugins/xen.pm +++ b/xCAT-server/lib/xcat/plugins/xen.pm @@ -363,6 +363,9 @@ sub migrate { } else { return (1,"Unable to find current location of $node"); } + if ($currhyp eq $target) { + return (0,"Guest is already on host $targ"); + } my $sock = IO::Socket::INET->new(Proto=>'udp'); my $ipa=inet_aton($node); my $pa=sockaddr_in(7,$ipa); #UDP echo service, not needed to be actually