mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-03 14:38:31 +00:00
add qemu_volume_snapshot_delete
We need to split the delvm monitor command, like savevm, to delete snapshot onlinefor each volume (qcow2,sheepdog,rbd) Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
parent
e8f3f18e3d
commit
fc46aff9fa
@ -2766,6 +2766,24 @@ sub qemu_volume_snapshot {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub qemu_volume_snapshot_delete {
|
||||||
|
my ($vmid, $deviceid, $storecfg, $volid, $snap) = @_;
|
||||||
|
|
||||||
|
#need to implement statefile location
|
||||||
|
my $statefile="/tmp/$vmid-$snap";
|
||||||
|
|
||||||
|
unlink $statefile if -e $statefile;
|
||||||
|
|
||||||
|
my $running = PVE::QemuServer::check_running($vmid);
|
||||||
|
|
||||||
|
return if !PVE::Storage::volume_snapshot_delete($storecfg, $volid, $snap, $running);
|
||||||
|
|
||||||
|
return if !$running;
|
||||||
|
|
||||||
|
#need to split delvm monitor command like savevm
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
sub qemu_snapshot_start {
|
sub qemu_snapshot_start {
|
||||||
my ($vmid, $snap) = @_;
|
my ($vmid, $snap) = @_;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user