Quantcast
Channel: VMware Communities : Popular Discussions - VMware Server Archives
Viewing all articles
Browse latest Browse all 69891

simple script shut down one VM, wait, start again??

$
0
0

Hi, I searched this forum and didn't find anything....

 

What I want is a pre- and post-backup script that stops the VM guest, the backup runs, then the VM guest gets started again.

 

The host is Ubuntu Linux (bash).

 

I know this code that I got from this forum (thank you, Nick!) will shut down all my guests:

 

find /home/vm-disks/ -name \*.vmx -exec /usr/bin/vmware-cmd \{} stop \;

 

But it will throw an error if any VMs are already shut down, and I don't want all the VMs to all start at the same time!!

 

How do I modify or rewrite the above line to shut down one VM??

A similar line would restart the one VM too.

 

Thank you, Tom


Viewing all articles
Browse latest Browse all 69891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>