[Tutor] WMI

Steve Willoughby steve at alchemy.com
Wed Sep 17 19:20:55 CEST 2008


On Wed, Sep 17, 2008 at 10:52:33AM -0600, Spencer Parker wrote:
> We have a web interface where people can provision virtual machines.
> Currently we do this with Linux machines and it sets a unique IP, username,
> startup services, and a password.  This is all triggered at startup of the
> linux machines with perl and an xml file.  We are trying to replicate this
> with Windows.  Setting the IP and creating the user's is pretty easy...and
> that code you sent me did basically everything with some tweaking.  When
> someone goes to the web interface it triggers some Expect scripts that log
> into the linux xen machine and trigger the whole process.  We have a windows
> VM now that will control the process for Windows VM's.

SO... a user goes to the web interface and requests a new VM, which makes a
script log in to a Linux master host and kicks off a remote job there to
create a new VM instance, which, when it boots up, runs another script to 
complete the process?  I just want to make sure I got that parsed correctly.

You'd basically do the same thing on the Windows machine.  If the process
you're triggering is a simple command-line program (like a script, maybe?)
you could use an RPC call or even something like SSH to run it from the 
Linux system.  If it's something that can be easily invoked by an object
method call in .net, you could make a very simple .net web service running
on the windows master waiting to kick off the provisioning process.  Your
web interface could have a simple Linux-side Python script which would 
connect to the web service and request it to run.

Be careful, though.  What you're describing is fraught with security
issues and vulnerabilities that need to be skillfully addressed.


-- 
Steve Willoughby    |  Using billion-dollar satellites
steve at alchemy.com   |  to hunt for Tupperware.


More information about the Tutor mailing list