PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.virtualserver > Scripts in host don't run
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Scripts in host don't run

Réponse
 
LinkBack Outils de la discussion
Vieux 13/02/2008, 17h01   #1 (permalink)
NKR
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Scripts in host don't run

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 .
  Réponse avec citation
Vieux 13/02/2008, 17h05   #2 (permalink)
NKR
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut RE: Scripts in host don't run

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 .

  Réponse avec citation
Vieux 14/02/2008, 02h41   #3 (permalink)
Wesley
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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 .

  Réponse avec citation
Vieux 14/02/2008, 06h14   #4 (permalink)
NKR
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut RE: Scripts in host don't run

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 .

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 04h03.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12132 seconds with 12 queries