kvm-export.sh.in 354 Bytes
#!/bin/bash
# Create a backup of the disk image of the virtual machine
BACKUP_PATH=${:backup-disk-path}
QMP_CLIENT=${buildout:directory}/software_release/bin/qemu-qmp-client

if [ ! -f $DISK_PATH ]; then
  echo "Nothing to backup, disk image doesn't exist yet."
  exit 0;
fi

$QMP_CLIENT --socket ${kvm-instance:socket-path} --drive-backup $BACKUP_PATH