|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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 . |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Sorry, just a mistype in my config description: VS 2005 runs in the phisical,
not in the guest... "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 . |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
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 . |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
Thank you, but that is exactly what I did (see last part of my description)
after noting that as an event triggered by the single VM config it didn't start. Now it's in the VS scripts, but still it only generates an entry in the log and no actions. VS is running under the Administrator account, and so is the VM. Anyone tested the "command line" capabilities of VS ? "Wesley" wrote: > 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 . |
|
![]() |
| Outils de la discussion | |
|
|