infra-generale/execute_cmd_all.sh

9 lines
126 B
Bash
Raw Normal View History

2022-05-20 22:13:38 +02:00
command=$1
VMs=$(sudo virsh list --state-running --name)
for vm in $VMs
do
echo Executing on $vm ...
ssh $vm $1
done