[pve-devel] Problems creating live snapshot

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed Jun 7 12:08:50 CEST 2017


On Wed, Jun 07, 2017 at 11:51:23AM +0200, datanom.net wrote:
> On 2017-06-07 08:52, Fabian Grünbichler wrote:
> > 
> > this could easily be tested by adding a sleep or udev trigger udev
> > settle sequence into QemuConfig's __snapshot_create_vol_snapshots_hook,
> > inside the before branch before calling savevm-start (line 185 in
> > current master).
> > 
> This was not the problem.
> 
> But I have found the reason anyway.
> savevm-start calls the path function of the storage which in case returns a
> means for savevm-start to access the vm state disk which is all as should
> be. However, I have discovered that savevm-start does not call the storage
> function activate_volume neither prior nor after the call to the function
> path. This leads to the following questions:
> 1) Should a call to path in a storage plugin always implicitly have the
> storage plugin activate the volume?
> 2) Should savevm-start call the storage plugins function activate_volume
> before or after calling path?

not sure which version you are developing on, but in both stable-4 and
master the call to activate the vmstate volume is the line directly
above the savevm-start qmp command?

https://git.proxmox.com/?p=qemu-server.git;a=blob;f=PVE/QemuConfig.pm;hb=stable-4#l145
https://git.proxmox.com/?p=qemu-server.git;a=blob;f=PVE/QemuConfig.pm;hb=master#l184

this was added in November 2016:
https://git.proxmox.com/?p=qemu-server.git;a=commitdiff;h=3a8deb551f2c7648865437961b3593d11bf0591b

maybe your plugin does not handle activate_volumes correctly?




More information about the pve-devel mailing list