KVM qmeu dump xml all machines


This is script backup for copy config virtual machines. Create xml filesv from all you machines in current directory

while read -r line; do  virsh dumpxml $line > $line.xml ; done <<< $(virsh list  --all |tail -n +2 | awk 'BEGIN  { FS=" " } $3>100  {print $2}')

more readable version

machines=$(virsh list  --all |tail -n +2 | awk 'BEGIN  { FS=" " } $3>100  {print $2}')

while read -r line; 
  do   
    virsh dumpxml $line > $line.xml
 done <<< $machnies


Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s