I noticed that when storing VMs and VM snapshot states on a Ceph RBD pool, Proxmox does not map the volume for the VM state file when restoring from this snapshot. This patch tries to fix this behavior by mapping the volume for the VM state files before, and unmapping the file afterwards.
Signed-off-by: Katie Holly <[email protected]> --- PVE/QemuConfig.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PVE/QemuConfig.pm b/PVE/QemuConfig.pm index 9a29b53..1866989 100644 --- a/PVE/QemuConfig.pm +++ b/PVE/QemuConfig.pm @@ -313,7 +313,9 @@ sub __snapshot_rollback_vm_start { my $storecfg = PVE::Storage::config(); my $statefile = PVE::Storage::path($storecfg, $vmstate); + PVE::Storage::activate_volumes($storecfg, [$vmstate]); PVE::QemuServer::vm_start($storecfg, $vmid, $statefile, undef, undef, undef, $forcemachine); + PVE::Storage::deactivate_volumes($storecfg, [$vmstate]); } sub __snapshot_rollback_get_unused { -- 2.14.1 _______________________________________________ pve-devel mailing list [email protected] https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
