mirror of
git://git.proxmox.com/git/pve-storage.git
synced 2025-01-11 05:18:01 +03:00
plugin : add volume_snapshot_rollback
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
parent
22a2a633c4
commit
41dffa853d
@ -520,6 +520,20 @@ sub volume_snapshot {
|
|||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub volume_snapshot_rollback {
|
||||||
|
my ($class, $scfg, $storeid, $volname, $snap) = @_;
|
||||||
|
|
||||||
|
die "can't rollback snapshot this image format" if $volname !~ m/\.(qcow2|qed)$/;
|
||||||
|
|
||||||
|
my $path = $class->path($scfg, $volname);
|
||||||
|
|
||||||
|
my $cmd = ['/usr/bin/qemu-img', 'snapshot','-a', $snap, $path];
|
||||||
|
|
||||||
|
run_command($cmd, timeout => 1);
|
||||||
|
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
sub list_images {
|
sub list_images {
|
||||||
my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_;
|
my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user