From 2e910a0e3ace72274e6bc8a97065e480a505f70d Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Tue, 5 Feb 2013 12:56:04 +0100 Subject: [PATCH] nexenta : list_images Signed-off-by: Alexandre Derumier --- PVE/Storage/NexentaPlugin.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/PVE/Storage/NexentaPlugin.pm b/PVE/Storage/NexentaPlugin.pm index ad8ac7d..77b199d 100644 --- a/PVE/Storage/NexentaPlugin.pm +++ b/PVE/Storage/NexentaPlugin.pm @@ -331,8 +331,15 @@ sub list_images { foreach my $image (keys %$dat) { my $volname = $dat->{$image}->{name}; + my $parent = $dat->{$image}->{parent}; - my $volid = "$storeid:$volname"; + my $volid = undef; + if ($parent && $parent =~ m/^(\S+)@(\S+)$/) { + my ($basename) = ($1); + $volid = "$storeid:$basename/$volname"; + } else { + $volid = "$storeid:$volname"; + } my $owner = $dat->{$volname}->{vmid}; if ($vollist) {