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

2015-05-07 Thread Alexandre DERUMIER
for example, or mixing rbd and zfs) - Mail original - De: dietmar diet...@proxmox.com À: aderumier aderum...@odiso.com, Wolfgang Link w.l...@proxmox.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 7 Mai 2015 06:28:14 Objet: Re: [pve-devel] [PATCH] remove running from Storage

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

2015-05-06 Thread Alexandre DERUMIER
Objet: [pve-devel] [PATCH] remove running from Storage and check it in QemuServer It is better to check if a VM is running in QemuServer then in Storage. for the Storage there is no difference if it is running or not. Signed-off-by: Wolfgang Link w.l...@proxmox.com --- PVE/QemuServer.pm | 29

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

2015-05-06 Thread Dietmar Maurer
I still see calls to that function using the $runnig parameter: PVE/Storage/RBDPlugin.pm:$class-volume_snapshot($scfg, $storeid, $newname, $snap, $running); PVE/Storage/SheepdogPlugin.pm:$class-volume_snapshot($scfg, $storeid, $newname, $snap, $running); PVE/Storage/ZFSPlugin.pm:

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

2015-05-06 Thread Wolfgang Link
It is better to check if a VM is running in QemuServer then in Storage. for the Storage there is no difference if it is running or not. Signed-off-by: Wolfgang Link w.l...@proxmox.com --- PVE/Storage.pm | 4 ++-- PVE/Storage/ISCSIDirectPlugin.pm | 2 +- PVE/Storage/LVMPlugin.pm

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

2015-05-06 Thread Wolfgang Link
It is better to check if a VM is running in QemuServer then in Storage. for the Storage there is no difference if it is running or not. Signed-off-by: Wolfgang Link w.l...@proxmox.com --- PVE/QemuServer.pm | 29 +++-- 1 file changed, 23 insertions(+), 6 deletions(-) diff

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

2015-05-06 Thread Dietmar Maurer
I wonder if we could replace qmp snapshot-drive (from internal-snapshot-async.patch) by upstream qemu qmp method blockdev-snapshot-internal-sync http://git.qemu.org/?p=qemu.git;a=blob_plain;f=qmp-commands.hx;hb=HEAD One advantage is that multiple drive can be snapshotted in a

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

2015-04-30 Thread Dietmar Maurer
# Note about locking: we use flock on the config file protect @@ -3777,7 +3779,7 @@ sub qemu_volume_snapshot { my $running = check_running($vmid); -return if !PVE::Storage::volume_snapshot($storecfg, $volid, $snap, $running); +PVE::Storage::volume_snapshot($storecfg,

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

2015-04-30 Thread Wolfgang Link
It is better to check if a VM is running in QemuServer then in Storage. for the Storage there is no difference if it is running or not. Signed-off-by: Wolfgang Link w.l...@proxmox.com --- PVE/Storage.pm | 4 ++-- PVE/Storage/ISCSIDirectPlugin.pm | 2 +- PVE/Storage/LVMPlugin.pm

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

2015-04-30 Thread Wolfgang Link
It is better to check if a VM is running in QemuServer then in Storage. for the Storage there is no difference if it is running or not. Signed-off-by: Wolfgang Link w.l...@proxmox.com --- PVE/QemuServer.pm | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git

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

2015-04-30 Thread Dietmar Maurer
+ 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

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

2015-04-30 Thread Alexandre DERUMIER
- De: dietmar diet...@proxmox.com À: aderumier aderum...@odiso.com, Wolfgang Link w.l...@proxmox.com Cc: pve-devel pve-devel@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

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

2015-04-30 Thread Dietmar Maurer
Couldn't we reuse volume_has_feature from storage plugins ? We can, but this is misleading. It is not a storage feature, it is a feature of qemu. ___ pve-devel mailing list pve-devel@pve.proxmox.com

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

2015-04-30 Thread Dietmar Maurer
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. Ah, yes - the logic is wrong, but fixable. ___

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

2015-04-30 Thread Alexandre DERUMIER
: [pve-devel] [PATCH] remove running from Storage and check it in QemuServer 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. Ah, yes

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

2015-04-30 Thread Alexandre DERUMIER
...@proxmox.com À: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 30 Avril 2015 09:47:03 Objet: [pve-devel] [PATCH] remove running from Storage and check it in QemuServer It is better to check if a VM is running in QemuServer then in Storage. for the Storage there is no difference if it is running

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

2015-04-30 Thread Dietmar Maurer
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. Ah, yes - the logic is wrong, but fixable. Or is it the other way around? We need to use

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

2015-04-30 Thread Alexandre DERUMIER
pve-devel@pve.proxmox.com Envoyé: Jeudi 30 Avril 2015 09:47:03 Objet: [pve-devel] [PATCH] remove running from Storage and check it in QemuServer It is better to check if a VM is running in QemuServer then in Storage. for the Storage there is no difference if it is running or not. Signed-off