RE: Scripts in host don't run
This is the way it was explained to me:
When you launch a script from the scripts section of virtual server, it runs
under the Network Service account, which may not have sufficient privilege.
One way to handled this is by having script run from the host that watches
for the specific event (like the VM starting) to initiate your requirements.
Run yourscript.vbs from the host command lines as "cscript yourscript.vbs"
where cscript is the system command that will interpret your script.
--
Wesley
"NKR" wrote:
> I would need on this:
> Simple configuration, a phisical with Win 2003 srv enterprise running a
> guest Win 2003 srv standard R2 + VS 2005 R2; plenty of power (2 cpu x quad
> core) and RAM (8GB). All updates installed.
> I want to shutdown the host when the guest finishes shutting down (as a
> result of an UPS event). I enabled scripts, set a command "cscript
> c:\scrpt\spegni.vbs" in the config of my VM in the scripts page under
> "Command-line action when this virtual machine turned off within the guest
> environment".
> Then I simulate UPS event by shutting down guest, I see in VS log a line
> saying "Running the script "wscript c:\scrpt\spegni.vbs" because the virtual
> machine "Sevi21" was turned off by shutting down the guest operating
> system."... but nothing happens in the host.
> I tested in a cmd window in the host the command line exactly as written in
> the VM config, and it works perfectly. I also tested a different script (one
> that simply creates a link in the sendto folder), again this works in cmd
> window but not when triggered by VS.
> I also tested removing the command from the VM scripts and putting it in the
> VS scripts, tried both the "Command-line action when any virtual machine is
> turned off within the guest environment" and the "Command-line action when no
> heartbeat is detected for any virtual machine". No success.
> Am I doing something wrong or is it a bug or... ?
> Thanks in advance for any .
|