From 37183d41855ec30a5b2683be262d79517fb76ab5 Mon Sep 17 00:00:00 2001 From: phamt Date: Mon, 27 Feb 2012 22:16:42 +0000 Subject: [PATCH] Added code to remove NIC and disk from active configuration. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11701 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/zvm.pm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/zvm.pm b/xCAT-server/lib/xcat/plugins/zvm.pm index 6e25cbbf8..0f0f712d4 100644 --- a/xCAT-server/lib/xcat/plugins/zvm.pm +++ b/xCAT-server/lib/xcat/plugins/zvm.pm @@ -1148,7 +1148,15 @@ sub changeVM { # removedisk [virtual device address] elsif ( $args->[0] eq "--removedisk" ) { my $addr = $args->[1]; + + # Remove from active configuration + my $ping = `pping $node`; + if (!($ping =~ m/noping/i)) { + $out = xCAT::zvmUtils->disableEnableDisk( $callback, $node, "-d", $addr ); + $out = `ssh $node "vmcp det $addr"`; + } + # Remove from user directory entry $out = `ssh $hcp "$::DIR/removemdisk $userId $addr"`; $out = xCAT::zvmUtils->appendHostname( $node, $out ); } @@ -1156,7 +1164,14 @@ sub changeVM { # removenic [address] elsif ( $args->[0] eq "--removenic" ) { my $addr = $args->[1]; + + # Remove from active configuration + my $ping = `pping $node`; + if (!($ping =~ m/noping/i)) { + $out = `ssh $node "vmcp det nic $addr"`; + } + # Remove from user directory entry $out = `ssh $hcp "$::DIR/removenic $userId $addr"`; $out = xCAT::zvmUtils->appendHostname( $node, $out ); } @@ -1164,7 +1179,8 @@ sub changeVM { # removeprocessor [address] elsif ( $args->[0] eq "--removeprocessor" ) { my $addr = $args->[1]; - + + # Remove from user directory entry $out = `ssh $hcp "$::DIR/removeprocessor $userId $addr"`; $out = xCAT::zvmUtils->appendHostname( $node, $out ); }