From 0eb5073dccbca1748b8e58c6f4e2195cbee018b7 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Sat, 30 Apr 2011 17:23:56 +0000 Subject: [PATCH] -Delay clone master template status until after snapshot git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9440 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/esx.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index 0bc10e89b..6d070db6e 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -2183,7 +2183,7 @@ sub promote_vm_to_master { ); my $clonespec = VirtualMachineCloneSpec->new( location=>$relocatespec, - template=>1, + #template=>1, #can't go straight to template, need to clone, then snap, then templatify powerOn=>0 ); @@ -2210,6 +2210,7 @@ sub promote_task_callback { } my $masterview = $masterviews->[0]; my $task = $masterview->CreateSnapshot_Task(name=>"xcatsnap",memory=>"false",quiesce=>"false"); + $parms->{masterview}=$masterview; $running_tasks{$task}->{data} = $parms; $running_tasks{$task}->{task} = $task; $running_tasks{$task}->{callback} = \&promotesnap_task_callback; @@ -2227,6 +2228,7 @@ sub promotesnap_task_callback { my $node = $parms->{node}; my $intent = $parms->{successtext}; if ($state eq 'success') { + $parms->{masterview}->MarkAsTemplate; #time to be a template xCAT::SvrUtils::sendmsg($intent, $output_handler,$node); my $mastertabentry = { originator=>$requester,