DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   PHP (http://www.daniweb.com/forums/forum17.html)
-   -   script which will automatic startup for virtual machines under Microsoft Virtual Serv (http://www.daniweb.com/forums/thread53552.html)

Techscorpio Aug 28th, 2006 7:43 am
script which will automatic startup for virtual machines under Microsoft Virtual Serv
 
Hi,

I am trying to develope a PHP script which will automatic startup for virtual machines under Microsoft Virtual Server 2005 r2 but it failed due to COM object saying Source unknown But the same thing when i tried through VB script it works fine.
VB script:

Set objVS = CreateObject("VirtualServer.Application")
Set objVM = objVS.FindVirtualMachine("VM Name")
objVM.RunAsDefinedAccount = True
result = objVM.SetAccountNameAndPassword("DOMAIN\Username","Password")
objVM.AutoStartAtLaunch = 2

It Worked fine
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ___________ _ _ _ _ _
PHP Script:

$objVS = new COM("VirtualServer.Application");
$objVM = $objVS->FindVirtualMachine("Scorpio");
$objVM->Startup();
it throuhgs Error at FindVirtualMachine function saying

ERROR: Fatal error: Uncaught exception 'com_exception' with message 'Source: Unknown


Plese Help me it's urgengt !!

Thanks in advance
http://forums.digitalpoint.com/images/misc/progress.gif


All times are GMT -4. The time now is 1:06 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC