diff --git a/perl-xCAT/xCAT/zvmCPUtils.pm b/perl-xCAT/xCAT/zvmCPUtils.pm index f68d28e67..657485d70 100644 --- a/perl-xCAT/xCAT/zvmCPUtils.pm +++ b/perl-xCAT/xCAT/zvmCPUtils.pm @@ -2,10 +2,7 @@ #------------------------------------------------------- =head1 - - (Hello) - (Bye) - + This is a CP utility plugin for z/VM. =cut diff --git a/xCAT-server/lib/xcat/plugins/zvm.pm b/xCAT-server/lib/xcat/plugins/zvm.pm index ec46e78ac..02c9ac48d 100644 --- a/xCAT-server/lib/xcat/plugins/zvm.pm +++ b/xCAT-server/lib/xcat/plugins/zvm.pm @@ -871,17 +871,6 @@ sub changeVM { $out = xCAT::zvmUtils->appendHostname( $node, $out ); } - # exchangesshkeys [password] - elsif ( $args->[0] eq "--exchangesshkeys" ) { - - # Get password - my $password = $args->[1]; - - # Exchange SSH keys - $out = `DSH_REMOTE_PASSWORD=$password xdsh $node -K`; - $out = xCAT::zvmUtils->appendHostname( $node, $out ); - } - # formatdisk [address] [multi password] elsif ( $args->[0] eq "--formatdisk" ) { my $tgtNode = $node; @@ -1579,6 +1568,9 @@ sub makeVM { if ( $generateNew == 1 ) { $out = xCAT::zvmUtils->generateMacId($hcp); } + + # Remove user entry file (on HCP) + $out = `ssh -o ConnectTimeout=5 $hcp "rm $userEntry"`; } } else { @@ -1820,6 +1812,9 @@ sub cloneVM { foreach (@children) { waitpid( $_, 0 ); } + + # Remove source user entry + $out = `rm $srcUserEntry`; } # --- Detatch source disks --- @@ -2013,7 +2008,7 @@ sub clone { # SCP user entry file over to HCP xCAT::zvmUtils->sendFile( $hcp, $userEntry, $userEntry ); - + # --- Create new virtual server --- my $try = 10; while ($try > 0) { @@ -2037,13 +2032,17 @@ sub clone { last; } } + + # Remove user entry + $out = `rm $userEntry`; + $out = `ssh -o ConnectTimeout=5 $hcp "rm $userEntry"`; # Exit on bad output if ( $rc == -1 ) { xCAT::zvmUtils->printLn( $callback, "$tgtNode: (Error) Could not create user entry" ); return; } - + # Load VMCP module on HCP and source node xCAT::zvmCPUtils->loadVmcp($hcp); xCAT::zvmCPUtils->loadVmcp($sourceNode); @@ -2308,7 +2307,7 @@ sub clone { $out = `ssh $hcp sed --in-place -e "s/$sourceIp/$targetIp/g" \ -e "s/$sourceNode/$tgtNode/g" $ifcfgPath`; # Set MAC address - my $networkFile = $tgtNode . "_network_config"; + my $networkFile = $tgtNode . "NetworkConfig"; if ( $os =~ m/Red Hat/i ) { # Red Hat only $out = `ssh $hcp "cat $ifcfgPath" | grep -v "MACADDR" > /tmp/$networkFile`; @@ -2320,6 +2319,9 @@ sub clone { $out = `echo "UNIQUE=''" >> /tmp/$networkFile`; } xCAT::zvmUtils->sendFile( $hcp, "/tmp/$networkFile", $ifcfgPath ); + + # Remove network file from /tmp + $out = `rm /tmp/$networkFile`; # Set to hardware configuration -- Only for layer 2 my $layer = xCAT::zvmCPUtils->getNetworkLayer($sourceNode); @@ -2365,10 +2367,13 @@ sub clone { # Set layer 2 support $hwcfgPath .= $hwcfg; - my $hardwareFile = $tgtNode . "_hardware_config"; + my $hardwareFile = $tgtNode . "HardwareConfig"; $out = `ssh $hcp "cat $hwcfgPath" | grep -v "QETH_LAYER2_SUPPORT" > /tmp/$hardwareFile`; $out = `echo "QETH_LAYER2_SUPPORT='1'" >> /tmp/$hardwareFile`; xCAT::zvmUtils->sendFile( $hcp, "/tmp/$hardwareFile", $hwcfgPath ); + + # Remove hardware file from /tmp + $out = `rm /tmp/$hardwareFile`; } } # End of if ( $layer == 2 ) @@ -2492,7 +2497,7 @@ sub nodeSet { my $netName = $words[4]; # Get NIC address from user entry - $out = `ssh $hcp "$::DIR/getuserentry $userId" | grep "$netName"`; + $out = `ssh $hcp "$::DIR/getuserentry $userId" | grep "NICDEF" | grep "$netName"`; if ( !$out ) { xCAT::zvmUtils->printLn( $callback, "$node: (Error) Missing NICDEF statement in user entry of node" ); return; @@ -2706,7 +2711,7 @@ sub nodeSet { xCAT::zvmUtils->sendFile( $hcp, $kernelFile, $kernelFile ); xCAT::zvmUtils->sendFile( $hcp, $parmFile, $parmFile ); xCAT::zvmUtils->sendFile( $hcp, $initFile, $initFile ); - + # Set the virtual unit record devices online on HCP $out = xCAT::zvmUtils->disableEnableDisk( $callback, $hcp, "-e", "c" ); $out = xCAT::zvmUtils->disableEnableDisk( $callback, $hcp, "-e", "d" ); @@ -2736,6 +2741,10 @@ sub nodeSet { return; } + # Remove kernel, parmfile, and initrd from /tmp + $out = `rm $parmFile $kernelFile $initFile`; + $out = `ssh -o ConnectTimeout=5 $hcp "rm $parmFile $kernelFile $initFile"`; + xCAT::zvmUtils->printLn( $callback, "$node: Kernel, parm, and initrd punched to reader. Ready for boot." ); } @@ -2866,6 +2875,10 @@ sub nodeSet { return; } + # Remove kernel, parmfile, and initrd from /tmp + $out = `rm $parmFile $kernelFile $initFile`; + $out = `ssh -o ConnectTimeout=5 $hcp "rm $parmFile $kernelFile $initFile"`; + xCAT::zvmUtils->printLn( $callback, "$node: Kernel, parm, and initrd punched to reader. Ready for boot." ); } diff --git a/xCAT-server/share/xcat/install/sles/compute.sles10.s390x.tmpl b/xCAT-server/share/xcat/install/sles/compute.sles10.s390x.tmpl index 2aa1f82bf..a1e685704 100644 --- a/xCAT-server/share/xcat/install/sles/compute.sles10.s390x.tmpl +++ b/xCAT-server/share/xcat/install/sles/compute.sles10.s390x.tmpl @@ -1,1148 +1,976 @@ - - - - - - - - - - None - none - 0.0.0100 - /dev/dasda - - /dev/dasda - /dev/disk/by-path/ccw-0.0.0100 - - DASD - io_subchannel - - - true - true - - - dasd_eckd_mod - - - - - - true - /dev/dasda1 (Linux native) - - - - 3338 - 15 - 12 - - - - - true - 1 - rw - 256 - - - - 0.0.0100 - /org/freedesktop/Hal/devices/ccw_0_0_0100_storage - - - - - None - none - 0.0.0101 - /dev/dasdb - - /dev/dasdb - /dev/disk/by-path/ccw-0.0.0101 - - DASD - io_subchannel - - - true - true - - - dasd_eckd_mod - - - - - - true - /dev/dasdb1 (Linux native) - - - - 3338 - 15 - 12 - - - - - true - 1 - rw - 256 - - - - 0.0.0101 - /org/freedesktop/Hal/devices/ccw_0_0_0101_storage - - - - - None - none - 0.0.0300 - /dev/dasdc - - /dev/dasdc - /dev/disk/by-path/ccw-0.0.0300 - - DASD - io_subchannel - - - true - true - - - dasd_fba_mod - - - - - - true - /dev/dasdc1 - - - - 256 - 16 - 128 - - - - 0.0.0300 - /org/freedesktop/Hal/devices/ccw_0_0_0300_storage - - - - - None - none - 0.0.0301 - /dev/dasdd - - /dev/dasdd - /dev/disk/by-path/ccw-0.0.0301 - - DASD - io_subchannel - - - true - true - - - dasd_fba_mod - - - - - - true - /dev/dasdd1 - - - - 512 - 16 - 128 - - - - 0.0.0301 - /org/freedesktop/Hal/devices/ccw_0_0_0301_storage - - - - - - - false - - - none - - - true - true - true - true - false - true - - - - - - - x - users - - - - x - floppy - - - - x - bin - daemon - - - x - xok - - - - x - nobody - - - - x - modem - - - - x - lp - - - - x - tty - - - - ! - postfix - - - - ! - gdm - - - - x - nogroup - nobody - - - ! - maildrop - - - - ! - messagebus - - - - x - video - - - - x - sys - - - - x - shadow - - - - x - console - - - - x - cdrom - - - - ! - haldaemon - - - - x - trusted - - - - x - dialout - - - - x - wheel - - - - x - www - - - - x - games - - - - x - disk - - - - x - audio - - - - ! - suse-ncc - - - - x - ftp - - - - ! - at - - - - x - kmem - - - - x - public - - - - x - root - - - - x - mail - - - - x - daemon - - - - ! - ntp - - - - x - uucp - - - - ! - ntadmin - - - - x - man - - - - x - utmp - - - - x - news - - - - ! - sshd - - - - - - - - - 127.0.0.1 - - localhost - - - - replace_host_address - - replace_long_name replace_short_name - - - - - - - - - - 1.0 - - - - - - en_US - - - - - - - - - AUTO - - - true - true - replace_domain - replace_hostname - - replace_nameserver - - - - - dhcp - replace_device - replace_lladdr - auto - no - - - false - - - - - dasd-bus-ccw-0.0.0100 - dasd_eckd_mod - - - - - dasd-bus-ccw-0.0.0101 - dasd_eckd_mod - - - - - dasd-bus-ccw-0.0.0300 - dasd_fba_mod - - - - - dasd-bus-ccw-0.0.0301 - dasd_fba_mod - - - - - replace_ccw_chan_ids - replace_ccw_chan_mode - 3 - replace_device - qeth - - - - - false - - - - - - false - false - false - - false - - - - false - false - - - - - - - - /dev/dasda - - - true - ext3 - true - / - path - 131 - 1 - primary - max - - - all - - - - - /dev/dasdb - - - true - ext3 - true - /usr - path - 131 - 1 - primary - max - - - all - - - - - /dev/dasdc - - - true - swap - true - swap - device - 131 - 1 - primary - max - - - all - - - - - /dev/dasdd - - - true - swap - true - swap - device - 131 - 1 - primary - max - - - all - - - - - false - - - - localhost, 127.0.0.1 - - - - - - - - true - true - 0 - - - true - true - 0 - - - true - true - 0 - - - true - true - 0 - - - - - - 5 - - - - - - libgsm - libssui - perl-Bootloader - samba-client - libiniparser - libnl - cifs-mount - OpenEXR - perl-XML-Parser - qt-qt3support - net-snmp - dbus-1-qt - perl-gettext - perl-Carp-Clan - dmapi - xorg-x11-Xnest - glibc-32bit - mDNSResponder-lib - perl-Config-Crontab - perl-X500-DN - libogg - perl-TermReadKey - pciutils-ids - perl-Config-IniFiles - perl-XML-Writer - update-alternatives - mono-winforms - yast2-trans-en_US - libvorbis - perl-Crypt-SmbHash - perl-TimeDate - zypper - taglib - libicu - perl-Digest-MD4 - perl-Parse-RecDescent - unrar - perl-Bit-Vector - perl-Date-Calc - boost - flac - python-cairo - aspell-en - libgimpprint - susehelp_en - iso-codes - libsvg-cairo - audiofile - esound - dbus-1-mono - limal-nfs-server - libzypp-zmd-backend - aalib - libsvg - perl-Compress-Zlib - perl-Digest-SHA1 - perl-URI - libgdiplus - limal-nfs-server-perl - bind - - - - x11 - gnome - base - - - - xorg-x11-driver-video-radeon - 915resolution - xorg-x11-driver-video-nvidia - 3ddiag - sax2-libsax-perl - sax2-ident - sax2 - sax2-gui - sax2-libsax - xorg-x11-server-glx - xorg-x11-server - xorg-x11-driver-video - nautilus-cd-burner - yast2-sound - evolution - gnome2-SLES - mDNSResponder - cdrecord - cdrdao - dosbootdisk - gnome2-SuSE - suspend - acpid - bootcycle - fbset - libpfm - mcelog - mpt-status - linux32 - master-boot-code - pfmon - numactl - powersave - pdisk - smartmontools - salinfo - powerpc32 - syslinux - wol - yast2-irda - yast2-vm - yast2-power-management - - - - - - UTC - US/Eastern - - - - - - 100 - video,dialout - /home - -1 - /bin/bash - /etc/skel - - - - - - true - Games account - 100 - /var/games - - - - - - - - - /bin/bash - 12 - * - games - - - true - bin - 1 - /bin - - - - - - - - - /bin/bash - 1 - * - bin - - - true - nobody - 65533 - /var/lib/nobody - - - - - - - - - /bin/bash - 65534 - * - nobody - - - true - Printing daemon - 7 - /var/spool/lpd - - - - - - - - - /bin/bash - 4 - * - lp - - - true - Postfix Daemon - 51 - /var/spool/postfix - - - - - 99999 - 0 - 7 - - /bin/false - 51 - ! - postfix - - - true - Novell Customer Center User - 105 - /var/lib/YaST2/suse-ncc-fakehome - - - - - 99999 - 0 - 7 - - /bin/bash - 102 - ! - suse-ncc - - - true - FTP account - 49 - /srv/ftp - - - - - - - - - /bin/bash - 40 - * - ftp - - - true - Gnome Display Manager daemon - 104 - /var/lib/gdm - - - - - 99999 - 0 - 7 - - /bin/false - 50 - ! - gdm - - - true - Batch jobs daemon - 25 - /var/spool/atjobs - - - - - 99999 - 0 - 7 - - /bin/bash - 25 - ! - at - - - false - root - 0 - /root - - - - - - - - - /bin/bash - 0 - replace_root_password - root - - - true - Mailer daemon - 12 - /var/spool/clientmqueue - - - - - - - - - /bin/false - 8 - * - mail - - - true - Daemon - 2 - /sbin - - - - - - - - - /bin/bash - 2 - * - daemon - - - true - NTP daemon - 103 - /var/lib/ntp - - - - - 99999 - 0 - 7 - - /bin/false - 74 - ! - ntp - - - User for D-BUS - 101 - /var/run/dbus - /bin/false - 100 - - - true - Unix-to-Unix CoPy system - 14 - /etc/uucp - - - - - - - - - /bin/bash - 10 - * - uucp - - - User for haldaemon - 102 - /var/run/hal - /bin/false - 101 - - - true - WWW daemon apache - 8 - /var/lib/wwwrun - - - - - - - - - /bin/false - 30 - * - wwwrun - - - true - Manual pages viewer - 62 - /var/cache/man - - - - - - - - - /bin/bash - 13 - * - man - - - true - News system - 13 - /etc/news - - - - - - - - - /bin/bash - 9 - * - news - - - true - SSH daemon - 65 - /var/lib/sshd - - - - - 99999 - 0 - 7 - - /bin/false - 71 - ! - sshd - - - - - - - - - - - - - - - - - + + + + + + + + + + + None + none + 0.0.0100 + true + /dev/dasda + + /dev/dasda + /dev/disk/by-path/ccw-0.0.0100 + + DASD + io_subchannel + + + true + true + + + dasd_eckd_mod + + + + + + true + /dev/dasda1 (Linux native) + + + + 15 + 12 + + + + + true + 1 + rw + + + + 0.0.0100 + + + + + None + none + 0.0.0101 + true + /dev/dasdb + + /dev/dasdb + /dev/disk/by-path/ccw-0.0.0101 + + DASD + io_subchannel + + + true + true + + + dasd_eckd_mod + + + + + + true + /dev/dasdb1 (Linux native) + + + + 15 + 12 + + + + + true + 1 + rw + + + + 0.0.0101 + + + + + None + none + 0.0.0300 + /dev/dasdc + + /dev/dasdc + /dev/disk/by-path/ccw-0.0.0300 + + DASD + io_subchannel + + + true + true + + + dasd_fba_mod + + + + + + true + /dev/dasdc1 + + + + 16 + 128 + + + + 0.0.0300 + + + + + None + none + 0.0.0301 + /dev/dasdd + + /dev/dasdd + /dev/disk/by-path/ccw-0.0.0301 + + DASD + io_subchannel + + + true + true + + + dasd_fba_mod + + + + + + true + /dev/dasdd1 + + + + 16 + 128 + + + + 0.0.0301 + + + + + + + + false + + + none + + + + + + + + + users + + + + floppy + + + + bin + daemon + + + xok + + + + nobody + + + + modem + + + + lp + + + + tty + + + + ! + postfix + + + + ! + gdm + + + + nogroup + nobody + + + ! + maildrop + + + + ! + messagebus + + + + video + + + + sys + + + + shadow + + + + console + + + + cdrom + + + + ! + haldaemon + + + + trusted + + + + dialout + + + + ! + ts-shell + + + + wheel + + + + www + + + + games + + + + disk + + + + audio + + + + ! + suse-ncc + + + + ftp + + + + ! + at + + + + kmem + + + + public + + + + root + + + + mail + + + + daemon + + + + ! + ntp + + + + uucp + + + + ! + ntadmin + + + + man + + + + utmp + + + + news + + + + ! + sshd + + + + + + + + + + 127.0.0.1 + + localhost + + + + replace_host_address + + replace_long_name replace_short_name + + + + + + + + + + 1.0 + + + + + + en_US + + + + + + + + + + AUTO + + + true + true + replace_domain + replace_hostname + + replace_nameserver + + + + + dhcp + replace_device + replace_lladdr + auto + no + + + false + + + + + + dasd-bus-ccw-0.0.0100 + dasd_eckd_mod + + + + + dasd-bus-ccw-0.0.0101 + dasd_eckd_mod + + + + + dasd-bus-ccw-0.0.0300 + dasd_fba_mod + + + + + dasd-bus-ccw-0.0.0301 + dasd_fba_mod + + + + + replace_ccw_chan_ids + replace_ccw_chan_mode + 3 + replace_device + qeth + + + + + false + + + + + + false + false + false + + false + + + + + false + false + + + + + + + + + /dev/dasda + + + true + ext3 + true + / + path + 131 + 1 + primary + max + + + all + + + + + /dev/dasdb + + + true + ext3 + true + /usr + path + 131 + 1 + primary + max + + + all + + + + + /dev/dasdc + + + true + swap + true + swap + path + 131 + 1 + primary + max + + + all + + + + + /dev/dasdd + + + true + swap + true + swap + path + 131 + 1 + primary + max + + + all + + + + + + false + + + + localhost, 127.0.0.1 + + + + + + + + true + true + 0 + + + true + true + 0 + + + true + true + 0 + + + true + true + 0 + + + + + + 5 + + + + + + + base + x11 + gnome + + + + + + + UTC + US/Eastern + + + + + + 100 + video,dialout + /home + -1 + /bin/bash + /etc/skel + + + + + + + true + Games account + 100 + /var/games + + + + + + + + + /bin/bash + 12 + * + games + + + true + bin + 1 + /bin + + + + + + + + + /bin/bash + 1 + * + bin + + + true + nobody + 65533 + /var/lib/nobody + + + + + + + + + /bin/bash + 65534 + * + nobody + + + true + Printing daemon + 7 + /var/spool/lpd + + + + + + + + + /bin/bash + 4 + * + lp + + + true + Postfix Daemon + 51 + /var/spool/postfix + + + + + 99999 + 0 + 7 + + /bin/false + 51 + ! + postfix + + + true + Novell Customer Center User + 106 + /var/lib/YaST2/suse-ncc-fakehome + + + + + 99999 + 0 + 7 + + /bin/bash + 102 + ! + suse-ncc + + + true + FTP account + 49 + /srv/ftp + + + + + + + + + /bin/bash + 40 + * + ftp + + + false + root + 0 + /root + + + + + + + + + /bin/bash + 0 + replace_root_password + root + + + true + Mailer daemon + 12 + /var/spool/clientmqueue + + + + + + + + + /bin/false + 8 + * + mail + + + true + Daemon + 2 + /sbin + + + + + + + + + /bin/bash + 2 + * + daemon + + + true + NTP daemon + 103 + /var/lib/ntp + + + + + 99999 + 0 + 7 + + /bin/false + 74 + ! + ntp + + + true + Unix-to-Unix CoPy system + 14 + /etc/uucp + + + + + + + + + /bin/bash + 10 + * + uucp + + + User for D-BUS + 101 + /var/run/dbus + /bin/false + 100 + + + User for haldaemon + 102 + /var/run/hal + /bin/false + 101 + + + true + WWW daemon apache + 8 + /var/lib/wwwrun + + + + + + + + + /bin/false + 30 + * + wwwrun + + + true + Manual pages viewer + 62 + /var/cache/man + + + + + + + + + /bin/bash + 13 + * + man + + + true + News system + 13 + /etc/news + + + + + + + + + /bin/bash + 9 + * + news + + + true + SSH daemon + 65 + /var/lib/sshd + + + + + 99999 + 0 + 7 + + /bin/false + 71 + ! + sshd + + + + + + + + + + + + + + + + + +