From 3ebf425b4cee40409c945bb1191f67524173a30f Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Sun, 1 May 2011 16:46:48 +0000 Subject: [PATCH] On clonevm, assume URL matches source VM if not specified in a clonevm -t git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9452 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/esx.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index 97527cb61..4f5a74a82 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -1996,16 +1996,18 @@ sub clonevms { } } } elsif ($target) { + if ($url =~ m!/!) { $url=$target; - $url =~ s!/([^/]*)\z!!; + $url =~ s!/([^/]*)\z!!; $mastername=$1; - unless ($url) { + } else { $url = $tablecfg{vm}->{$nodes->[0]}->[0]->{storage}; $url =~ s/.*\|//; $url =~ s/=(.*)//; $url =~ s/,.*//; - } - $newdatastores->{$url}=[$nodes->[0]]; + $mastername=$target + } + $newdatastores->{$url}=[$nodes->[0]]; } if ($hyp) { unless (validate_datastore_prereqs($nodes,$hyp,$newdatastores)) {