Re: Remote Scripting - To work with Virtual Server 2005
- From: Becky <Becky@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 14 Mar 2006 07:10:37 -0800
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,don't
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
even get an error. I am a novice to scripting and I've hacked enough toget
things working.Controller.CreateScript("Z:\\BuildScripts\\TargetsBuildSystem\\VMachine_man.
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 =
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);
the
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
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
- Follow-Ups:
- References:
- Prev by Date: Terminal Services: get terminal netbios name
- Next by Date: Re: Scripting with Arrays
- Previous by thread: Re: Remote Scripting - To work with Virtual Server 2005
- Next by thread: Re: Remote Scripting - To work with Virtual Server 2005
- Index(es):
Relevant Pages
|
Loading