Yeah, I just read this bug carefully, in order to avoid individual volume names clash for ESX, we don't need to change anything, in addition, as Matt said, it's not very important to the customer and hasn't break anything, so please ignore this patch. Thanks, Alex ----- Original Message ----- From: "yupzhang" <yupzhang@redhat.com> To: "Alex Jia" <ajia@redhat.com> Cc: mdbooth@redhat.com, libguestfs@redhat.com Sent: Tuesday, July 17, 2012 10:31:22 AM Subject: Re: [Libguestfs] [PATCH] virt-v2v: Create a libvirt-friendly volume name Hi ajia, I think the volume name need not to be updated,please refer to bug https://bugzilla.redhat.com/show_bug.cgi?id=784495. Thanks Yuping On 07/16/2012 06:00 PM, Alex Jia wrote:
On 07/11/2012 06:33 PM, Alex Jia wrote:
The $vmdk value is a directory name in ESX.pm, although the later codes replace '/' with '_', the volume name isn't still friendly, for example, it looks like this:
# virsh vol-list pool-dir Name Path ----------------------------------------- esx4.1-rhel6.2-x86_64_esx4.1-rhel6.2-x86_64 /mnt/esx4.1-rhel6.2-x86_64_esx4.1-rhel6.2-x86_64
With the patch, the volume name is very friendly like guest name:
# virsh vol-list pool-dir Name Path ----------------------------------------- esx4.1-rhel6.2-x86_64 /mnt/esx4.1-rhel6.2-x86_64
Signed-off-by: Alex Jia<ajia@redhat.com> --- lib/Sys/VirtConvert/Transfer/ESX.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/Sys/VirtConvert/Transfer/ESX.pm b/lib/Sys/VirtConvert/Transfer/ESX.pm index 23969cd..f29eb31 100644 --- a/lib/Sys/VirtConvert/Transfer/ESX.pm +++ b/lib/Sys/VirtConvert/Transfer/ESX.pm @@ -368,8 +368,9 @@ sub new }
# Create a libvirt-friendly volume name - $self->{name} = $vmdk; - $self->{name} =~ s,/,_,g; + use File::Basename; + my($name, $dir, $suffix) = fileparse($vmdk); + $self->{name} = $name;
return $self; } Hi Matt, any advise about this?
_______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs