[pve-devel] [PATCH pve-stotage] insert the format type at volume_resize

Wolfgang Link w.link at proxmox.com
Wed Oct 28 10:41:04 CET 2015


qemu-img needs now the format to resize image.
---
 PVE/Storage/Plugin.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/PVE/Storage/Plugin.pm b/PVE/Storage/Plugin.pm
index d65bd11..ccec759 100644
--- a/PVE/Storage/Plugin.pm
+++ b/PVE/Storage/Plugin.pm
@@ -655,7 +655,9 @@ sub volume_resize {
 
     my $path = $class->filesystem_path($scfg, $volname);
 
-    my $cmd = ['/usr/bin/qemu-img', 'resize', $path , $size];
+    my $format = ($class->parse_volname($volname))[6];
+
+    my $cmd = ['/usr/bin/qemu-img', 'resize', '-f', $format, $path , $size];
 
     run_command($cmd, timeout => 10);
 
-- 
2.1.4





More information about the pve-devel mailing list