From 9538d0475a13e2a3b4aaf9dc9d3689e0ad9339d9 Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Fri, 21 Jun 2013 14:40:52 +0200 Subject: [PATCH] sheepdog: fix find_next_volume with storeid != 'sheepdog', find display volume size Signed-off-by: Alexandre Derumier --- PVE/Storage/SheepdogPlugin.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/Storage/SheepdogPlugin.pm b/PVE/Storage/SheepdogPlugin.pm index 1262186..ab25f98 100644 --- a/PVE/Storage/SheepdogPlugin.pm +++ b/PVE/Storage/SheepdogPlugin.pm @@ -62,7 +62,7 @@ sub sheepdog_ls { if ($line =~ /(=|c) ((vm|base)-(\d+)-\S+)\s+(\d+)\s+(\d+)\s(\d+)\s(\d+)\s(\d+)\s(\S+)\s(\d+)/) { my $image = $2; my $owner = $4; - my $size = $5; + my $size = $6; my $idvdi = $10; my $parentid = $relationship->{$idvdi}->{parent} if $relationship->{$idvdi}->{parent}; my $parent = $relationship->{$parentid}->{name} if $parentid; @@ -149,7 +149,7 @@ my $find_free_diskname = sub { my ($storeid, $scfg, $vmid) = @_; my $sheepdog = sheepdog_ls($scfg, $storeid); - my $dat = $sheepdog->{sheepdog}; + my $dat = $sheepdog->{$storeid}; my $disk_ids = {}; foreach my $image (keys %$dat) {