search for: get_storage_volume_by_path

Displaying 3 results from an estimated 3 matches for "get_storage_volume_by_path".

2011 Jan 26
1
[PATCH] Display verbose error message when guest storage isn't found
...2V/Connection/LibVirtSource.pm b/lib/Sys/VirtV2V/Connection/LibVirtSource.pm index 628074c..9db9f60 100644 --- a/lib/Sys/VirtV2V/Connection/LibVirtSource.pm +++ b/lib/Sys/VirtV2V/Connection/LibVirtSource.pm @@ -130,10 +130,29 @@ sub get_volume eval { $vol = $self->{vmm}->get_storage_volume_by_path($path); }; - die(user_message(__x("Failed to retrieve storage volume {path}:". - "{error}", - path => $path, - error => $@->stringify()))) if($@); + if ($@->cod...
2011 Jan 26
1
[PATCH] Don't use libvirt for volume information when converting with libvirtxml
...ssage); use Locale::TextDomain 'virt-v2v'; @@ -115,12 +116,45 @@ sub get_volume my $self = shift; my ($path) = @_; - # Use a libvirt session connection to inspect local volumes - my $vmm = Sys::Virt->new(uri => 'qemu:///session'); - my $vol = $vmm->get_storage_volume_by_path($path); - - my ($name, $format, $size, $usage, $is_sparse, $is_block) = - parse_libvirt_volinfo($vol, $path); + # Use the output of qemu-img to inspect the path + open(my $qemuimg, '-|', 'env', 'LANG=C', 'qemu-img', 'info', $path) + or...
2010 Sep 21
1
[PREVIEW ONLY] Refactor data transfer code
...get_transfer($path, 0); + + $name = $transfer->esx_get_name(); + $format = "raw"; + $size = $transfer->esx_get_size(); + $is_sparse = 0; + $is_block = 0; + } + + else { + my $vol; + eval { + $vol = $self->{vmm}->get_storage_volume_by_path($path); + }; + die(user_message(__x("Failed to retrieve storage volume {path}:". + "{error}", + path => $path, + error => $@->stringify()))) if($@); + + ($name, $for...