Re: Virtual Connect Scripting help (111 Views)
Reply
Neighborhood Admin
chuckk281
Posts: 3,223
Registered: ‎01-09-2007
Message 1 of 2 (165 Views)

Virtual Connect Scripting help

Pete was looking for help in setting up some blades:

 

*****************

 

We are installing 14 C7000 enclosures that are identical in every way. The only difference in the virtual connect configuration is the domain ID and the WWNpool number. We created virtual connect configuration files for each enclosure and configure VC through putty. Problem is putty craps out if you paste the entire config so we have to paste the config into putty in sections in order to complete the VC config without errors.  This is WAY less time consuming than configuring VC manually through the interface, but still, we’d like to fire off the whole script one shot in order to avoid all the cut and pasting into putty.

 

We’re looking for a better way to do this. Does any know of a way to execute a script or batch file to configure VC in an enclosure?

 

 

***************

 

Help from Steve:

 

**************

 

Apparently this is a topic that many are interested in as I received a several direct messages asking to be included in my response.  I'll provide a brief outline below, if this IS of interest, I'll put it into a paper.

 

So, the simplest solution here is to use plink.exe in batch mode to feed the contents of a .txt file into an SSH session to a VC module.  One issue here is that if you have not completed an SSH key exchange with the target, plink will fail.  But, I have a solution below….

 

Take a look at the attached files, they are used as follows;

 

Create_Domain.cmd

This file is used to execute the build of several enclosures.

You will need to edit as follows;

The IP address, user name and password should be that of the VC module in Bay 1 of each enclosure,

The %comspec% statement/line is used to do the initial SSH key exchange,

 

ECHO. Creating Pod21

%comspec% /c echo Y | plink.exe -ssh -l Administrator -pw YZJRR92G 192.168.21.118 exit

plink -batch -ssh 192.168.21.118 -l Administrator -pw YZJRR92G -m createdomain21.txt > out_create.wri

plink -batch -ssh 192.168.21.118 -l Administrator -pw YZJRR92G -m createnetworksISS.txt >> out_create.wri

 

The createdomain21.txt file contains the initial domain configuration, which imports the domain and sets the MAC/WWN ranges (sample attached).

There is one file for each VC domain to be created

 

The createnetworksISS.txt has the Network (LAN and SAN) configurations and the profiles.  If each domain is different, then you could combine the contents of this file in to the domain unique file above, otherwise;

Edit this file to meet the network and profile configurations you require.

Run the Create_Domain.cmd and it will execute the config across each enclosure.

 

Also an output file called out_create.wri will be created, simply review it for errors once completed.

 

Hope all this helps, feedback welcomed.

 

*************

 

Any feedback?

Occasional Contributor
xaoc
Posts: 7
Registered: ‎07-05-2011
Message 2 of 2 (111 Views)

Re: Virtual Connect Scripting help

Hi,

 

Can you please share attachments :)

10x in advance

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.