Re: Generic Script Resource error

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Mike Rosado [MSFT] (mikeros_at_online.microsoft.com)
Date: 01/08/05


Date: Sat, 8 Jan 2005 09:25:43 -0600

Hi Chris,

I'm by no means an expert in this subject matter VBS Scripts, but I'll try
to assist you to the best of my ability.

The Event ID 5018 (0000139a) basically means the following:

  ERROR_RESMON_ONLINE_FAILED
# The cluster resource could not be brought online by the
# resource monitor.

Then the following error 0x80020009 means an "Exception occurred".

"Error loading script 'c:\windows\vstest.vbs'. HRESULT: 0x80020009"

Not sure why the line "Set objVS =
CreateObject("VirtualServer.Application")" is causing an error. But I'm
sure if you post the original message below to the
"microsoft.public.scripting.vbscript" newsgroup, that someone there might
have experienced the same behavior as you or may be able to give you better
guidance as to how to proceed.

-- 
Hope this helps,
Mike Rosado
Windows 2000 MCSE + MCDBA
Microsoft Enterprise Platform Support
Windows NT/2000/2003 Cluster Technologies
====================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
<http://www.microsoft.com/info/cpyright.htm>
-----Original Message-----
"Butler" <Butler@discussions.microsoft.com> wrote in message
news:672020B1-04B4-4011-B8B6-4986AFD297C5@microsoft.com...
> I have been trying to use a generic script resource to control MS Virtual
> Server 2005.  I have been able to use sections of my script at the command
> line to control VS but I am getting an error when running through the
cluster
> service.  The Error ID when I try to bring the resource online is 5018
> (0000139a).  The cluster log file gives me the following errors:
> 00001160.00000e30::2005/01/08-08:26:15.740 INFO Generic Script <test>:
> Loaded script engine 'VBScript' successfully.
> 00001160.00000e30::2005/01/08-08:26:15.787 ERR  Generic Script <test>:
> Script Error: Line=2, Character = 0
> 00001160.00000e30::2005/01/08-08:26:15.787 ERR  Generic Script <test>:
> Error: 2147943746 (0x80070542) - Description: <null> (Source: <null>)
> 00001160.00000e30::2005/01/08-08:26:15.787 ERR  Generic Script <test>:
Error
> loading script 'c:\windows\vstest.vbs'. HRESULT: 0x80020009
>
> My script contains:
>
> Dim objVS, objVM, oExec
> Set objVS = CreateObject("VirtualServer.Application")
> Set objVM = objVS.FindVirtualMachine("vstest")
>
> Sub Open( )
> End Sub
>
> Function Online( )
>     Resource.LogInformation "Entering Online"
>     Select Case objVM.State
> Case "0" Set oExec = objVS.RegisterVirtualMachine("vstest.vmc",
"I:\vstest")
> Do While objVM.State = 0
>    WScript.Sleep 100
> Loop
> Set objVM = objVS.FindVirtualMachine("vstest")
> If objVM.State = 1 Then
> Set oExec = objVM.Startup()
> Do While objVM.State = 3
>    WScript.Sleep 100
> Loop
> If objVM.State <> 5 Then
>    Resource.LogInformation "Error performing startup function"
>    Online = 1
> End If
> ElseIf objVM.State = 2 Then
> Set oExec = objVM.Startup()
> Do While objVM.State <> 5
>    WScript.Sleep 100
> Loop
> If oExec.ExitCode <> 5 Then
>    Resource.LogInformation "Error performing startup function from saved
>
> state"
>    Online = 1
> End If
> ElseIf oExec.Status = 6 Then
> Set oExec = objVM.Resume()
> Do While objVM.State <> 5
>    WScript.Sleep 100
> Loop
> If objVM.State <> 5 Then
>    Resource.LogInformation "Error resuming from paused state"
>    Online = 1
> End If
> Else
> Resource.LogInformation "Unknown error after registering Virtual Server"
> Online = 1
> End If
>
>
> Case "1" Set oExec = objVM.Startup()
> Do While objVM.State = 3
>    WScript.Sleep 100
> Loop
> Online = 0
> If objVM.State <> 5 Then
>    Resource.LogInformation "Error performing startup function"
>    Online = 1
> End If
>
>
> Case "2" Set oExec = objVM.Startup()
> Do While objVM.State <> 5
>    WScript.Sleep 100
> Loop
> Online = 0
> If objVM.State <> 5 Then
>    Resource.LogInformation "Error performing startup function"
>    Online = 1
> End If
>
> Case "3" Resource.LogInformation "Virtual Server is already in the process
> of turning on"
> Do While objVM.State = 3
>    WScript.Sleep 100
> Loop
> Online = 0
>
> Case "4" Resource.LogInformation "Virtual Server is already in the process
> of Restoring"
> Do While objVM.State = 4
>    WScript.Sleep 100
> Loop
> Online = 0
>
> Case "5" Resource.LogInformation "Virtual Server is already running"
> Online = 0
>
> Case "6" Set oExec = objVM.Resume()
> Do While objVM.State <> 5
>    WScript.Sleep 100
> Loop
> Online = 0
> If objVM.State <> 5 Then
>    Resource.LogInformation "Error resuming from paused state"
>    Online = 1
> End If
>
>
> Case "7" Resource.LogInformation "Virtual Server is in the process of
> Saving"
> Do While objVM.State = 7
>    WScript.Sleep 100
> Loop
> Online = 1
>
> Case "8" Resource.LogInformation "Virtual Server is in the process of
> turning off"
> Do While objVM.State = 8
>    WScript.Sleep 100
> Loop
> Online = 1
>
> Case Else Resource.LogInformation "Unknown state of Virtual Server"
> Online = 1
> End Select
> End Function
>
>
>
>
> Function Offline( )
> Resource.LogInformation "Resource going offline by saving current state of
> VS"
> Set oExec = objVM.Save()
> Do While objVM.State = 7
>    WScript.Sleep 100
> Loop
> Offline = 0
> If objVM.State <> 1 Then
>    Resource.LogInformation "Error saving VS state"
>    Offline = 1
> End If
>
> End Function
>
>
>
>
> Function LooksAlive( )
>     Resource.LogInformation "Entering LooksAlive"
>     LooksAlive = true
>     If objVM.State <> 5 Then
> Resource.LogInformation "VM state does not look to be Running"
> LooksAlive = false
>     End If
>
> End Function
>
>
>
>
> Function IsAlive( )
>     Resource.LogInformation "Entering IsAlive"
>     if objGuestOS.IsHeartbeating=True Then
>     IsAlive = true
>     Else
> Resource.LogInformation "Heart is not beating"
> IsAlive = false
>     End If
> End Function
>
>
>
>
> Function Close( )
> Close = 0
> End Function
>
>
>
> Function Terminate( )
>
> Terminate = 0
> End Function
>
>
>
> Any idea why the the "Set objVS =
CreateObject("VirtualServer.Application")"
> line is causing an error?
>
> Thanks for any help you can give!
> Chris Butler
> chris.butler@rit.edu


Relevant Pages

  • Re: disk space used in AIX 5.1L
    ... This script will loop through your online volume groups to find the ...
    (comp.unix.aix)
  • Re: IIS6 on 2003 Cluster - cannot get working!!
    ... Are you able to start and stop w3svc service from command line using ... Use of included script samples, if any, are subject to the terms specified ... > I have called the resource IIS. ... >> brought online. ...
    (microsoft.public.windows.server.clustering)
  • Re: Windows 2003 R2 SP2 64 bit : Script Resource Failure: HrSetHangEntryPoint
    ... the very very first line in you script, outside all functions, should be ... Function Online() ... the error happened only once when the cluster service was coming up. ... resource online again. ...
    (microsoft.public.windows.server.clustering)
  • Scipting, AD Permissions
    ... short of it is, he has a nice structure and as new sites come online, the OU ... he wants to script it. ... what permissions are required to be able to AddUsers, ... is there a definitive guide somewhere that spells out: ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: ICQ
    ... > Is there a way to script something for visitors on your web site know you ... Maybe an applet. ... location when you are online. ...
    (comp.lang.java.help)