mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-06-15 04:38:53 +00:00
add qemu_volume_snapshot
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
parent
be79c214ac
commit
1ab0057c8b
@ -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 {
|
sub vm_start {
|
||||||
my ($storecfg, $vmid, $statefile, $skiplock, $migratedfrom) = @_;
|
my ($storecfg, $vmid, $statefile, $skiplock, $migratedfrom) = @_;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user