1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

Feature #1224: The hypervisor_id of the snapshot for Libvirt/KVM is decided by Libvirt

This commit is contained in:
Jaime Melis 2013-02-21 17:46:08 +01:00
parent 4391225f7e
commit 29fc00ea44

View File

@ -22,10 +22,13 @@ source $(dirname $0)/../../scripts_common.sh
DOMAIN="$1"
SNAP_ID="$2"
NAME="snapshot-${SNAP_ID}"
data=`virsh --connect $LIBVIRT_URI snapshot-create-as $DOMAIN`
exec_and_log "virsh --connect $LIBVIRT_URI snapshot-create-as $DOMAIN $NAME" \
"Could not create snapshot $NAME for domain $DOMAIN."
if [ "$?" = "0" ]; then
echo "$data" | awk '{print $3}'
else
error_message "Could not create snapshot $NAME for domain $DOMAIN."
exit -1
fi
echo "$NAME"
exit 0