search for: get_volum

Displaying 20 results from an estimated 21 matches for "get_volum".

Did you mean: get_volume
2010 Apr 28
3
Fix 2 issues in ESX transfer
We were seeing 100% failure rates transferring 10G disk images from ESX on a particular setup. We also weren't spotting the transfer failure, and dying with a strange error from libguestfs. These 2 patches fix the error check which should have made it obvious what was failing, and the underlying error.
2010 Jun 07
1
[PATCH] ESX: Fix storage URL if storage has a snapshot
...++++++++++++++++++++++++++++++------- 1 files changed, 42 insertions(+), 10 deletions(-) diff --git a/lib/Sys/VirtV2V/Transfer/ESX.pm b/lib/Sys/VirtV2V/Transfer/ESX.pm index 5d6b586..faf872d 100644 --- a/lib/Sys/VirtV2V/Transfer/ESX.pm +++ b/lib/Sys/VirtV2V/Transfer/ESX.pm @@ -102,9 +102,7 @@ sub get_volume my $datastore = $1; my $vmdk = $2; - my $url = URI->new("https://".$self->{_v2v_server}); - $url->path("/folder/$vmdk-flat.vmdk"); - $url->query_form(dcPath => "ha-datacenter", dsName => $datastore); + my $url = _get_vol_url($...
2011 Jan 26
1
[PATCH] Display verbose error message when guest storage isn't found
...anged, 23 insertions(+), 4 deletions(-) diff --git a/lib/Sys/VirtV2V/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, -...
2010 Feb 18
2
[PATCH 1/2] ESX: Look harder for potential transfer failures
.../Transfer/ESX.pm | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/lib/Sys/VirtV2V/Transfer/ESX.pm b/lib/Sys/VirtV2V/Transfer/ESX.pm index f270938..1da382a 100644 --- a/lib/Sys/VirtV2V/Transfer/ESX.pm +++ b/lib/Sys/VirtV2V/Transfer/ESX.pm @@ -140,6 +140,7 @@ sub get_volume "{error}", error => $@->stringify()))); } + $self->{_v2v_received} = 0; my $r = $self->SUPER::get($url, ':content_cb' => sub { $self->handle_data(@_); }, &...
2010 Mar 31
1
[PATCH] Add LocalCopy transfer method to transfer local files to a target
...;, + poolname => $poolname))); } return $self; diff --git a/lib/Sys/VirtV2V/Transfer/ESX.pm b/lib/Sys/VirtV2V/Transfer/ESX.pm index 42b4326..9db28e0 100644 --- a/lib/Sys/VirtV2V/Transfer/ESX.pm +++ b/lib/Sys/VirtV2V/Transfer/ESX.pm @@ -120,10 +120,9 @@ sub get_volume my $target = $self->{_v2v_target}; if ($target->volume_exists($volname)) { print STDERR user_message(__x("WARNING: storage volume {name} ". - "already exists in the target ". - &q...
2010 Sep 13
3
[PATCH 1/4] Check that we're not overwriting an existing Libvirt domain
...rget/LibVirt.pm @@ -145,8 +145,10 @@ sub close package Sys::VirtV2V::Target::LibVirt; -use Sys::VirtV2V::Util qw(user_message); +use Sys::Virt; +use Sys::Virt::Error; +use Sys::VirtV2V::Util qw(user_message); use Locale::TextDomain 'virt-v2v'; =head1 NAME @@ -288,6 +290,33 @@ sub get_volume return Sys::VirtV2V::Target::LibVirt::Vol->_get($self->{pool}, $name); } +=item guest_exists(name) + +Return 1 if a guest with I<name> already exists, 0 otherwise. + +=cut + +sub guest_exists +{ + my $self = shift; + my ($name) = @_; + + eval { + $self->{vmm}...
2010 Sep 21
1
[PREVIEW ONLY] Refactor data transfer code
..._; + + my $self = $class->SUPER::_libvirt_new($uri); + + $self->{name} = $name; + + $self->_check_shutdown(); + $self->_get_dom(); + + return $self; +} + +=item get_name + +Return the name of the domain. + +=cut + +sub get_name +{ + return shift->{name}; +} + +=item get_volume(path) + +Return a volume object for I<path>, where I<path> is the path of a volume on the +connected hypervisor. + +=cut + +sub get_volume +{ + my $self = shift; + my ($path) = @_; + + my $uri = $self->{uri}; + + my ($name, $format, $size, $is_sparse, $is_block); + +...
2010 Mar 30
3
[PATCH 1/2] Refactor guest and volume creation into Sys::VirtV2V::Target::LibVirt
...er_message(__x("Failed to create storage volume: {error}", + error => $@->stringify()))) if ($@); + + return $class->_new($vol); +} + +sub _get +{ + my $class = shift; + my ($pool, $name) = @_; + + my $vol; + eval { + $vol = $pool->get_volume_by_name($name); + }; + die(user_message(__x("Failed to get storage volume: {error}", + error => $@->stringify()))) if ($@); + + return $class->_new($vol); +} + +sub get_path +{ + my $self = shift; + + return $self->{vol}->get_path();...
2010 Mar 22
1
[PATCH] ESX: Enable verification of SSL certificates
...$username, $password, - $pool); + $pool, + $noverify); return $ua->get_volume($path); } -- 1.6.6.1
2010 Jun 07
1
[PATCH] ESX: Always validate SSL certificate
...b/Sys/VirtV2V/Transfer/ESX.pm | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/lib/Sys/VirtV2V/Transfer/ESX.pm b/lib/Sys/VirtV2V/Transfer/ESX.pm index f638149..5d6b586 100644 --- a/lib/Sys/VirtV2V/Transfer/ESX.pm +++ b/lib/Sys/VirtV2V/Transfer/ESX.pm @@ -143,6 +143,8 @@ sub get_volume my $died = $r->header('X-Died'); die($died) if (defined($died)); + $self->verify_certificate($r) unless ($self->{_v2v_noverify}); + # It reports success even if we didn't receive the whole file die(user_message(__x("Didn't...
2019 Apr 08
0
[PATCH v4 3/7] v2v: switch to ocaml-libvirt
...ol>’ to display details about a particular pool.\n\nTo set the pool which virt-v2v uses, add the ‘-os <pool>’ option.") + name (Option.default "" message) + ) -external libvirt_get_version : unit -> int * int * int - = "v2v_libvirt_get_version" +let get_volume pool name = + try + Libvirt.Volume.lookup_by_name pool name + with + (* No such volume. *) + | Libvirt.Virterror { code = VIR_ERR_NO_STORAGE_VOL; message } -> + error (f_"cannot find libvirt volume ‘%s’: %s") + name (Option.default "" message) + +let domain_ex...
2011 Jan 26
1
[PATCH] Don't use libvirt for volume information when converting with libvirtxml
...Virt; use XML::DOM; use XML::DOM::XPath; use Sys::VirtV2V::Connection::Source; use Sys::VirtV2V::Transfer::Local; -use Sys::VirtV2V::Util qw(user_message parse_libvirt_volinfo); +use Sys::VirtV2V::Util qw(user_message); 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, $i...
2011 Mar 11
2
[PATCH 1/2] Allow reading more data than the reported size of a volume
If a volume is not an exact multiple of 512 bytes, qemu-img will report its size rounded down to a 512 byte boundary. However, when copying, the file is still read until EOF, which will return more data than was expected. This change prevents that causing a failure in itself. The situation is still not resolved, however, as there are still situations where this will cause a failure. For example,
2010 Apr 09
1
[PATCH] Add SSH transfer method
...quot;already exists on the target. NOT ". + "copying it again. Delete the volume ". + "and retry to copy again.", + name => $name)); + return $target->get_volume($name); + } + + my $uri = $conn->{uri}; + my $username = $conn->{username}; + my $password = $conn->{password}; + my $host = $conn->{hostname}; + + die("URI not defined for connection") unless (defined($uri)); + + my ($pid, $size, $fh, $error) =...
2010 Jan 29
4
[FOR REVIEW ONLY] ESX work in progress
The following patches are where I'm currently at with ESX support. I can now import a domain from ESX along with its storage. Note that I'm not yet doing any conversion. In fact, I've never even tested past the import stage (I just had an exit in there). The meat is really in the 4th patch. The rename of MetadataReader->Connection was because the Connection is now really providing
2010 Feb 01
9
[ESX support] Working ESX conversion for RHEL 5
With this patchset I have successfully[1] imported a RHEL 5 guest directly from ESX with the following command line: virt-v2v -ic 'esx://yellow.marston/?no_verify=1' -op transfer RHEL5-64 Login details are stored in ~/.netrc Note that this is the only guest I've tested against. I haven't for example, checked that I haven't broken Xen imports. Matt [1] With the exception of
2018 Aug 30
8
[PATCH 0/7] RFC: switch v2v to ocaml-libvirt
Hi, this is a mostly done attempt to switch to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not
2018 Nov 27
8
[PATCH v2 0/7] RFC: switch v2v to ocaml-libvirt
Hi, this is a mostly done attempt to switch to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not
2019 Jan 30
8
[PATCH v3 0/7] RFC: switch v2v to ocaml-libvirt
Hi, this is a mostly done attempt to switch to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not
2019 May 20
8
[PATCH v5 0/7] v2v: switch to ocaml-libvirt
Hi, this series switches virt-2v to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not test all