VMware

This Question is Possibly Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (6 pts)
3 Replies Last post: Apr 20, 2009 5:31 AM by Texiwill  

would like to script start of VM, so as to launch specific process after vm started? posted: Apr 15, 2009 10:19 PM

Click to view gank211's profile Novice 7 posts since
May 19, 2007

As per the subject, I am looking for a VM technology(ies) where I can write a script in the general OS that will be able to launch the VM and to specify that process X inside the VM should launch after the VM is loaded/launch. For example - pseudocode:

var x = new VM (location of VM)

when (x.isLaunched){

x.runStartingProcess = "c:\runwhenlaunched.vbs -input " + y

}

x.launch

-the pseudocode above would assume you had a variable y that changed due to some user input. That input was then passed to the starting process inside the VM.

I suppose this is probably doable with some sort of virtualization technology, please point me to which virtualization technology can be used for this, and if you know some example code anywhere to look at that would be good too.

Thanks!

Click to view AsherN's profile Hot Shot 214 posts since
Mar 10, 2009
Unless I'm missing something here, that can be accomplished on a Windows machine with an entry in the 'HKLM\software\windows\currentversion\run' hive of the registry.
Click to view Texiwill's profile Guru 10,205 posts since
Jan 13, 2004
Hello,

You will look at using the VMware VI and VIX SDKs to achieve your ends. Note however that VIX (which allows you to run commands/programs within in a VM) is very easy to disable as well. from a security perspective this would be disabled.


Best regards,
Edward L. Haletky
VMware Communities User Moderator, VMware vExpert 2009
====
Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.
Blue Gears and SearchVMware Pro Blogs -- Top Virtualization Security Links -- Virtualization Security Round Table Podcast

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities