Initial commit of LVM volume sync script for kvm virtual machines
Testing:
+ origin_vg=vg_orion
+ origin_lv=lv_amnesia_root
+ origin_snap=lv_amnesia_root-snap
+ dest_vg=VolGroup
+ dest_lv=lv_amnesia_root
+ dest_host=shogun
+ vm_name=amnesia
+ '[' '!' -e /dev/vg_orion/lv_amnesia_root-snap ']'
+ virsh shutdown amnesia
Domain amnesia is being shutdown

++ virsh list
++ grep amnesia
++ wc -l
+ '[' 1 -eq 1 ']'
+ sleep 1

...

++ virsh list
++ grep amnesia
++ wc -l
+ '[' 0 -eq 1 ']'
+ lvmsync /dev/vg_orion/lv_amnesia_root-snap shogun:/dev/VolGroup/lv_amnesia_root
Transferred 496 of 1549312 chunks (4096 bytes per chunk) in 1.57 seconds
You transferred your changes 3123.61x faster than a full dd!
+ '[' 0 -eq 0 ']'
+ lvremove -f vg_orion/lv_amnesia_root-snap
  Logical volume "lv_amnesia_root-snap" successfully removed
+ lvcreate --snapshot -L5G -n lv_amnesia_root-snap vg_orion/lv_amnesia_root
  Logical volume "lv_amnesia_root-snap" created
+ virsh start amnesia
Domain amnesia started

Trying 192.168.0.21...
Connected to amnesia.
Escape character is '^]'.
GET / HTTP/1.1

HTTP/1.1 400 Bad Request
...