Re: Remote Scripting - To work with Virtual Server 2005



Cool! A comedian!

"asdf" wrote:

I will pass on this one, almost.

See the MS 2003 Server whatever.

Did they (MS) have a qualifiying product in 2003 ?

Do they have one in 2005 ?

--------

Why is the product named RC as in Release Candidate ?

-----------

Use common sense !

---------------------------------

The future is about quality and reliability
and not whoever may dance on most "markets".

-----------------------

Don't go with the masses!
Go with satisfaction.

----------------------

Think of your favorite female actor in Bay Watch in 1985.
Was her name Elniak or was it Pamela.
If later, you are what she is.


http://fischerse.free.fr/blog/images/signs/erika_eleniak.jpg


I am 8 years older than she is and she knows little about
computing but about live that is graceful.


http://idata.over-blog.com/0/05/80/38/newstarcom4/eleniake.jpg


--

Good luck with your MS event CDs, pencils, split pea soup,
and all the other promises to the moon and beyond.

---------------

Your soul will be soon available at any corner around the world
called VISTA as in Seen That Already.






"Becky" <Becky@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1520A25B-F26E-4BB7-91A6-288ED43E3441@xxxxxxxxxxxxxxxx
Anyone,

I set up two machines to do remote scripting with wsh 5.6. I did the
examples on the microsoft web and they worked fine.

Then I tried to apply the same concept and I can't get it to work. I
don't
even get an error. I am a novice to scripting and I've hacked enough to
get
things working.

Here is what I am trying to accomplish.

I have a XP SP 2 machine that will execute the script. This script will
remotely execute a script to a 2003 Server that has Virtual Server 2005 on
it. This remote script will start and save the virtual machines by the
parameters I pass to it.

Here is the script called remote_test.js that is called from the XP SP 2:

var Controller = WScript.CreateObject("WSHController");

var RemoteScript =

Controller.CreateScript("Z:\\BuildScripts\\TargetsBuildSystem\\VMachine_man.
js
//virtual_server:rdhou02 //Mantype:Start //virtual_machine:build12",
"rdhou02");

WScript.ConnectObject(RemoteScript, "remote_");

RemoteScript.Execute();



while (RemoteScript.Status != 2) {

WScript.Sleep(100);

}

WScript.DisconnectObject(RemoteScript);


function remote_Error()

{

var theError = RemoteScript.Error;

WScript.Echo("Error " + theError.Number + " - Line: " + theError.Line
+
", Char: " + theError.Character + "\nDescription: " +
theError.Description);

WScript.Quit(-1);

}


Here are the contents of VMachine.man.js:

var CRLF = "\r\n";
var VM_STATE_OFF = 1;
var VM_STATE_RUNNING = 5;

var strServer = WScript.Arguments.Named.Item ("virtual_server");
var strMantype = WScript.Arguments.Named.Item ("Mantype");
var strVMName = WScript.Arguments.Named.Item ("virtual_machine");

var objVS = new ActiveXObject( "VirtualServer.Application", strServer );
var objVM = objVS.FindVirtualMachine( strVMName );

if ( objVM != null ) {
WScript.Echo( "Found Virtual Machine named: " + strVMName );
if (strMantype == "Start") {
if (objVM.State == 5)
WScript.Echo( "Virtual machine " + strVMName + " running on box " +
strServer );

else
objVM.Startup();

}
else if (strMantype == "Save") {
if (objVM.State == 2)
WScript.Echo( "Virtual machine " + strVMName + " is in save state on box
" + strServer );

else
objVM.Save();

}

}

When I execute remote_test.js nothing happens. No error messages, no
nothing. And the Virtual Server doesn't response to starting or stopping
the
VM named build12.

I did test VMMachine_man.js on the remote machine using:

cscript Z:\\BindViewBuildScripts\\TargetsBuildSystem\\VMachine_man.js
/virtual_server:rdhou02 /Mantype:Start /virtual_machine:build12

with no problems, works as expected. Now for some reason I have to use
//virtual_server etc... or the script will not work from remote_test.js.

Can anyone help me with this? Maybe there is a better approach to this?

Thanks,

Rebecca




.



Relevant Pages

  • Re: Remote office logon script - Long Delay
    ... Windows IP Configuration ... If I point the User's profile to a script that doesn't contain the ... I do not have WINS configured for the remote site, ... This remote server was built using connect computer script, ...
    (microsoft.public.windows.server.sbs)
  • Re: Remote office logon script - Long Delay
    ... Windows IP Configuration ... If I point the User's profile to a script that doesn't contain the ... I do not have WINS configured for the remote site, ... This remote server was built using connect computer script, ...
    (microsoft.public.windows.server.sbs)
  • Re: Remote office logon script - Long Delay
    ... Windows IP Configuration ... If I point the User's profile to a script that doesn't contain the ... I do not have WINS configured for the remote site, ... is a GC/AD server with DNS and DHCP for it's area. ...
    (microsoft.public.windows.server.sbs)
  • RE: Permission Denied when trying to access remote computer with VBScr
    ... I am having a simular problem with a remote script. ... I am using the following to access the Services on a remote 2000 Server. ... Set objSWbemLocator = CreateObject ...
    (microsoft.public.windowsxp.wmi)
  • Re: DBI Performance Issues
    ... use the cpu or the network hardware during remote tests. ... first the live script is run from a sun solaris machine using ... server machine. ...
    (comp.lang.perl.misc)

Loading