From b48e67d77db1682326238fc2c1d2af86d1322a15 Mon Sep 17 00:00:00 2001 From: phamt Date: Mon, 1 Nov 2010 19:33:41 +0000 Subject: [PATCH] Added chvm --resetsmapi option to reset zVM SMAPI. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7996 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/zvm.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/zvm.pm b/xCAT-server/lib/xcat/plugins/zvm.pm index 677aa957d..1f438dbbe 100644 --- a/xCAT-server/lib/xcat/plugins/zvm.pm +++ b/xCAT-server/lib/xcat/plugins/zvm.pm @@ -1109,6 +1109,20 @@ sub changeVM { } } + # resetsmapi + elsif ( $args->[0] eq "--resetsmapi" ) { + # Force each worker machine off + my @workers = ('VSMWORK1', 'VSMWORK2', 'VSMWORK3', 'VSMREQIN', 'VSMREQIU'); + foreach ( @workers ) { + $out = `ssh $hcp "vmcp force $_ logoff immediate"`; + } + + # Log on VSMWORK1 + $out = `ssh $hcp "vmcp xautolog VSMWORK1"`; + + $out = "$node: Resetting SMAPI... Done"; + } + # setipl [ipl target] [load parms] [parms] elsif ( $args->[0] eq "--setipl" ) { my $trgt = $args->[1];