APC UPS Data Center & Enterprise Solutions Forum
Schneider, APC support forum to share knowledge about installation and configuration for Data Center and Business Power UPSs, Accessories, Software, Services.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-06-30 06:11 AM . Last Modified: 2024-03-08 01:26 AM
come configurare lo spegnimento tramite script in powerchute ?
ho queso comando .sh sul server dove e installato powerchute nella cartella / opt / APC / PowerChute / user_files / poweroff .sh
ssh root@192.168.0.160 / vmfs /volumes/5f50fcc3-3b6771d2-6b3e-c81f66c17049/Shutdown.sh "
e il file Shutdown.sh sul server esxi .
come configurare powerchute in modo che fa partire lo script in mancanza di corrente ?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-06-30 06:11 AM . Last Modified: 2024-03-08 01:26 AM
Hello,
PowerChute offer the ability to run a command file for shutdown, an event driven command file or an SSH script. See pages 87, 108, and 199 of the users guide found at this link. https://download.schneider-electric.com/files?p_Doc_Ref=SPD_PMAR-9DNLQK_EN
Note: you do not need to script the VM and host shutdown if the ESXi host is licensed. PowerChute will communicate with the host and the host will command the VMs down. Then the host and the PowerChute VM will be powered off. See page 18 of the users guided.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-06-30 06:11 AM . Last Modified: 2024-03-08 01:26 AM
Quale versione di Powerchute stai usando?
Hai aggiunto l'autorizzazione di esecuzione allo script, chmod + script.sh
Scusa se ho dovuto usare Google Translate
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-06-30 06:11 AM . Last Modified: 2024-03-08 01:26 AM
la versione e l'ultima. i permessi ci sono. dopo tanti tentativi sono riuscito a farlo funzionare. esegue lo script ma mi spegne solo le macchine virtuali e non vmware
-----
#!/bin/sh
#Lista macchine virtuali e relativo spegnimento
#in ordine di ID, non tiene conto nel spegnere un DC per ultimo
#Testato su ESX 6.0.0
PATH=$PATH:/bin:/usr/bin:/usr/sbin
#Elenca le macchine presenti e passa solo l’id
for i in `vim-cmd vmsvc/getallvms | grep -v Vmid | awk '{print $1}' | sort -n`
do
echo "Spegnimento macchina virtuale numero $i"
vim-cmd vmsvc/power.shutdown $i
done
#attende 40 secondi dopo aver spento tutte le vm
sleep 40
#spegnimento ESXi dopo aver verificato che non ci siano piu’ VM accese
#ciclo identico al precedente con una funzione while che attende lo stato della macchina
for i in `vim-cmd vmsvc/getallvms | grep -v Vmid | awk '{print $1}' | sort -n`
do
STATUS=”Powered on”
while [ "$STATUS" == "Powered on" ]
do
STATUS=`vim-cmd vmsvc/power.getstate $i | sed ’id’`
sleep 5
done
done
#attende per 2 minuti
sleep 120
#spegne l'esxi
poweroff
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-06-30 06:11 AM . Last Modified: 2024-03-08 01:26 AM
Hello,
PowerChute offer the ability to run a command file for shutdown, an event driven command file or an SSH script. See pages 87, 108, and 199 of the users guide found at this link. https://download.schneider-electric.com/files?p_Doc_Ref=SPD_PMAR-9DNLQK_EN
Note: you do not need to script the VM and host shutdown if the ESXi host is licensed. PowerChute will communicate with the host and the host will command the VMs down. Then the host and the PowerChute VM will be powered off. See page 18 of the users guided.
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.