[pve-devel] [PATCH] remove running from Storage and check it in QemuServer

Alexandre DERUMIER aderumier at odiso.com
Thu Apr 30 12:50:31 CEST 2015


>>Form what I see this case is already handled inside storage_support_snapshop()?


 PVE::Storage::volume_snapshot($storecfg, $volid, $snap) if storage_support_snapshop($volid, $storecfg); 
 return if !$running; 
 vm_mon_cmd($vmid, "snapshot-drive", device => $deviceid, name => $snap);

and
storage_support_snapshop {
...
 if ($volid =~ m/\.(qcow2|qed)$/){ 
+ $ret = 1; 
+ } 


So, with this code, we always call qemu-img snasphot for qcow2, which is wrong if the vm is running.
(for rbd,zfs,.. no problem).

I think that's why we passed the running flag to pve-storage.



----- Mail original -----
De: "dietmar" <dietmar at proxmox.com>
À: "aderumier" <aderumier at odiso.com>, "Wolfgang Link" <w.link at proxmox.com>
Cc: "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Jeudi 30 Avril 2015 12:28:36
Objet: Re: [pve-devel] [PATCH] remove running from Storage and check it in QemuServer

> + PVE::Storage::volume_snapshot($storecfg, $volid, $snap) if 
> storage_support_snapshop($volid, $storecfg); 
> 
> This seem to be wrong. 
> 
> we can't do a qcow2 snapshot with qemu-img if the vm is running, we need to 
> use qmp in this case. 

Form what I see this case is already handled inside storage_support_snapshop()? 



More information about the pve-devel mailing list