#1
|
|||
|
|||
Virtual Server 2005 Script issues
At my company, we use Virtual server 2005 for our build machines. I am currently looking at ways to include our virtual machine code into VBP. Unfortunately, we have run into scripting issues that are causing us to create work arounds that are not pretty.
I have created a step that will start a virtual machine (vm) on our server. If I attempt to run this code throught a script step, I recieve an error utilizing the VM object. (javscript) If I take the same code and execute it with cscript, I recieve no errors. Therefore, we are currently writing our code to a javascript file, and then executing it with cscript. I would like to add some exception handling, and macro definition within my script. Anyone have any thoughts? Example Script: var vmServerName = "MYVIRTUALSERVER"; var buildVmMachine = "Test Virtual machine"; var vmServer = new ActiveXObject("VirtualServer.Application", vmServerName); var oBuildVM = vmServer.FindVirtualMachine(buildVmMachine); //See if machine is running. HBeatFlag = oBuildVM.GuestOS.IsHeartbeating; //Tell user WScript.echo("HBeatFlag = " + HBeatFlag); |
Thread Tools | |
Display Modes | Rate This Thread |
|
|