cancel
Showing results for 
Search instead for 
Did you mean: 

Programatically interact with vmchange

krimo
Level 3

Hi!

Using Netbackup 6.5.1, I developed a GUI to import and export tapes from a scalar i500 robotic.

 

The matter is vmchange needs a user interaction to know when the user have removed tapes from the mailslot. Otherwise, the tape is ingested again. I wrote this script in perl (newb in perl) but the user interaction i sumulate seems to fail with vmchange. The vmupdate indicates that the tape is still ingested although it's not the case. Here is the code:

 

# Export tape

if (@ARGV != 1) {
 print "usage: export barcode \n";
 exit -1;
}


$barcode=$ARGV[0];
$enter="\n\n";
$quit="q\n";
$sleepBeforeEnter = 120;
$sleepBeforeQuit = 30;

print "Running vmchange...\n";
open (ENTER, "|\"C:\\Program Files\\VERITAS\\Volmgr\\bin\\vmchange\" -res -multi_eject -w -rt TLD -rn 0 -rh hostname -h hostname -ml $barcode") or die "Impossible de lancer import_bande";

print "Sleep before simulating ENTER. Please remove tape from mailslot\n";
sleep $sleepBeforeEnter;

print "Simulating ENTER \n";
print ENTER $enter;

print "Sleep before exit to let vmchange exit\n";
sleep 30;

exit 0;

 

 

Some help will be appreciated ;).

 

Regards.

 

3 REPLIES 3

J_H_Is_gone
Level 6

Do you know that if you say NO to the quesiton it will NOT put the tapes back into the robot and it will leave them in the MAP until you are ready to take the out?

 

S_H1
Level 5
Partner

krimo
Level 3

Don't know why my thread was posted two times

 

Thanks J.Hinchcliffe for the tip. Will try it soon.