BladeSystem - General
1748213 Members
3095 Online
108759 Solutions
New Discussion

Virtual Connect CLI Buffer Size

 
Did
Occasional Contributor

Virtual Connect CLI Buffer Size

Hi there,

 

I'm preparing the migration of a VC 1/10 Gbit to a VC Flex-10 and I have scripted the entire configuration of the domain to make things a bit easier. I have ~300 lines of CLI that I copy and paste to configure everything from general settings, ldap auth, uplinks and server profiles.

 

My problem is the following: when I copy the ~300 lines from my text file and paste it in Putty, VCM will properly execute the first ~150 lines and then start truncating the commands so it starts failing. If I divide the work in smaller chunks of 50 lines, everything goes through smoothly but of course it's quite manual again. I was wondering if there is a CLI buffer size that I am exceeding and if this is the reason my commands start to get truncated.

 

Changing some Putty settings like # of scrollback lines, columns and rows sizes, doesn't seem to influence anything.

 

- Has anybody experienced a similar issue?

- Is there another way to inject a text file full of CLI commands to the VC other than copy/paste using Putty?

 

Any comments would be greatly appreciated.

 

Cheers,

Didier

3 REPLIES 3
chuckk281
Trusted Contributor

Re: Virtual Connect CLI Buffer Size

I have asked the CLI experts.

Stevem
Frequent Advisor

Re: Virtual Connect CLI Buffer Size

Yes.  It seems that when you "paste", putty dumps all the text to the screen, then starts to execute.  I have experienced this issue with putty.  I have sucessfully used Secure Shell Client and not had this issue, however, I have also used PLINK.EXE in batch mode to dump the contents of a text file into VC to build the entire domain.  This method can also be used to implement many VC domains at once.  I recently deployed 14 blade enclosures, ran a single script, which configured the entire VC domain on each enclcosure from importing the enclosure to assigning the profiles and powering the servers on.  I actually ran the command file, then went to bed, it was all completed successfully long before I got up the next morning.

 

 For example, take a look at the following;

 

ECHO. Creating Pod21
%comspec% /c echo Y | plink.exe -ssh -l Administrator -pw YZJRR92G 172.20.21.118 exit
plink -batch -ssh 172.20.21.118 -l Administrator -pw YZJRR92G -m createdomain21.txt > out_create.wri

 

The %comspec% line forces plink to accept the SSH key, then exits - if you don't do this, you will need to use plink or putty to connect each VC module and accept the SSH key.

The second line, using plink in batch mode will log in to VC, then dump the contents of the text file into the cli and execute it line by line.

 

Also, if you want to watch this execute, the drop the >out_create.wri from the end of the plink line and all output will be presented to the cmd window.

 

1. Create a file call "deploy_vc.cmd" and place the above into that file 

2. Replace the -pw with your actual VC toe tag password

3. Replace the IP address with the VC module IP address

4. Replace the createdomain21.txt file with the script that you have created

The out_create.wri file will capture all the output as the commands are executed, search that file for "error" to ensure everything completed successfully

 

You can also use this method to edit or change the config of a VC domain, such as add a vlan to a SUS, create a profile etc.

 

Hope all this make sense.

 

If you are attending the HP Discover event next week, I'm speaking on this topic, (Thursday morning).

 

Let me know if you have further questions.

 

Enjoy.  Steve...

Stevem
Frequent Advisor

Re: Virtual Connect CLI Buffer Size

Also, if you needed to deploy multiple enclosure, you could create several entries in teh .cmd file and point to a different config.txt file, such as...

 

ECHO. Creating Pod21
%comspec% /c echo Y | plink.exe -ssh -l Administrator -pw YZJRR92G 172.20.21.118 exit
plink -batch -ssh 172.20.21.118 -l Administrator -pw YZJRR92G -m createdomain21.txt > out_create.wri

 

ECHO. Creating Pod22

%comspec% /c echo Y | plink.exe -ssh -l Administrator -pw YZJRR92G 172.20.22.118 exit
plink -batch -ssh 172.20.22.118 -l Administrator -pw YZJRR92G -m createdomain22.txt > out_create.wri

 

etc....