5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-26 10:03:51 +03:00

add qemu_volume_snapshot

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier 2012-09-06 10:33:34 +02:00 committed by Dietmar Maurer
parent be79c214ac
commit 1ab0057c8b

View File

@ -2753,6 +2753,19 @@ sub qemu_block_resize {
}
sub qemu_volume_snapshot {
my ($vmid, $deviceid, $storecfg, $volid, $snap) = @_;
my $running = PVE::QemuServer::check_running($vmid);
return if !PVE::Storage::volume_snapshot($storecfg, $volid, $snap, $running);
return if !$running;
vm_mon_cmd($vmid, "snapshot-drive", device => $deviceid, name => $snap);
}
sub vm_start {
my ($storecfg, $vmid, $statefile, $skiplock, $migratedfrom) = @_;