-Update vm.storage as approrpritae on rmigrate -s

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6516 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2010-06-17 18:55:31 +00:00
parent e5a4ad7cba
commit 95bdd32c87

View File

@ -909,8 +909,15 @@ sub relocate_callback {
my $parms = shift;
my $state = $task->info->state->val;
if ($state eq 'success') {
#my $vmtab = xCAT::Table->new('vm'); #TODO: update vm.storage?
#$vmtab->setNodeAttribs($parms->{node},{host=>$parms->{target}});
my $vmtab = xCAT::Table->new('vm'); #TODO: update vm.storage?
my $prevloc = $tablecfg{vm}->{$node}->[0]->{storage};
my $model;
($prevloc,$model) = split /=/,$prevloc;
my $target = $parms->{target};
if ($prevloc) {
$target.="=$prevloc";
}
$vmtab->setNodeAttribs($parms->{node},{storage=>$target);
sendmsg(":relocated to to ".$parms->{target},$parms->{node});
} else {
relay_vmware_err($task,"Relocating to ".$parms->{target}." ",$parms->{node});