Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

vboxmanage.exe Problem with Perl

by anshumangoyal (Scribe)
on Dec 28, 2012 at 05:39 UTC ( #1010630=perlquestion: print w/ replies, xml ) Need Help??
anshumangoyal has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to automate Oracle Virtual Box with Perl. Inside Perl Script I have given some commands to turn on and turn off virtual machine. The program runs fine when executed from command prompt (sitting on the same machine), but when this script is fired from Telnet (Windows Host), the vboxmanage.exe (utility to manage VM's) throws exception. It seems this utility doesnot work over telnet, though this is purely a command line utility (no GUI).

I want to check if there is any way i can execute command inside my perl script, so that it should feel if that is being executed on command prompt only.

Comment on vboxmanage.exe Problem with Perl
Re: vboxmanage.exe Problem with Perl (not a problem with perl at all)
by Anonymous Monk on Dec 28, 2012 at 05:51 UTC

    It seems this utility doesnot work over telnet, though this is purely a command line utility (no GUI).

    What error messages do you base that conclusion on?

    Like every program, it comes down to %ENV, which user the process is running as, user permissions ...

Re: vboxmanage.exe Problem with Perl
by muba (Priest) on Dec 28, 2012 at 05:56 UTC
Re: vboxmanage.exe Problem with Perl
by dasgar (Deacon) on Dec 28, 2012 at 09:54 UTC

    Out of curiosity, what are you using as the telnet host on your Windows system?

    My guess is along the lines of what someone else suggested: the environment that you are connecting to via telnet probably doesn't have something setup correctly.

    Since you have a script that is working locally, you can probably use something like psexec to remotely run your script remotely from another Windows system.

    If you are wanting a more Perl type solution and/or the ability to execute your script remotely from other platforms, you could use a Perl module to create your own Telnet server that can accept remote connections and commands. As long as the Telnet server script is started with the correct credentials and environment, you should be good to go. At work, I setup a simple little "Telnet server" using IO::Socket::INET::Daemon that allowed me to remotely connect to a Windows system and get information from a USB connected device to that system. The concepts of what I did there should work in your situation too.

Re: vboxmanage.exe Problem with Perl
by karlgoethebier (Priest) on Dec 28, 2012 at 21:16 UTC

    What about SSH?

    Regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1010630]
Approved by muba
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2014-12-26 00:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls