[pve-devel] [PATCH qemu-server 1/1] Mount storage for VM states before starting VMs from a snapshot

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Nov 16 12:07:52 CET 2017


On Mon, Oct 23, 2017 at 02:32:19AM +0200, Katie Holly wrote:
> 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 <uz4rlcxy at meo.ws>

hello,

just noticed this patch which apparently got overlooked with the (at
the time) ongoing release.

fix looks good - please send a signed CLA[1] (to office at proxmox.com) so
it can be merged.

thanks!

1: https://pve.proxmox.com/wiki/Developer_Documentation#Software_License_and_Copyright

> ---
>  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
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel




More information about the pve-devel mailing list