I've lost all the management interfaces to my VMWARE server (3.5 with all patches) and need a way to suspend (or shutdown) all the VMs that are currently running. Is there a simple command for doing this?
Thanks
Roger
Hi Roger,
There is a way from the command line using vmware-cmd utility
try this
for vm in $(vmware-cmd -l)
do
vmware-cmd $vm suspend trysoft
done
You can suspend a single VM using vmware-cmd with the suspend command.
To get help about vmware-cmd usage simply execute it without any arguments.
Thanks, but
I'm aware of the basic vmware-cmd but am looking to see if anyone can point me in the direction of a solution that can handle all the VMs at once.
Roger
Hi Roger,
There is a way from the command line using vmware-cmd utility
try this
for vm in $(vmware-cmd -l)
do
vmware-cmd $vm suspend trysoft
done
Thanks, I have no clue about shell (and no time to read up on it today) so this is very helpful.
Roger
Write a script similar (this script tries to suspend every VM even stopped ones) to the following
#!/usr/bin/perl -w use strict; my @vmxlist = `vmware-cmd -l`; foreach my $vmx (@vmxlist) { chomp($vmx); my $output = `vmware-cmd \"$vmx\" suspend`; }