Displaying 8 results from an estimated 8 matches for "_storage_iterate".
2010 Mar 31
1
[PATCH] Add LocalCopy transfer method to transfer local files to a target
...@ use warnings;
use Sys::Virt;
-use Locale::TextDomain 'virt-v2v';
-
+use Sys::VirtV2V::Transfer::ESX;
+use Sys::VirtV2V::Transfer::LocalCopy;
use Sys::VirtV2V::UserMessage qw(user_message);
+use Locale::TextDomain 'virt-v2v';
+
=pod
=head1 NAME
@@ -134,41 +136,39 @@ sub _storage_iterate
else {
my $path = $source->getValue();
- if (defined($transfer)) {
- # Die if transfer required and no output target
- die (user_message(__"No output target was specified"))
- unless (defined($target));...
2010 Jun 18
1
[PATCH] Improve error message when LibvirtXML is given invalid domain XML
...s/VirtV2V/Connection/LibVirtXML.pm | 5 +++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/lib/Sys/VirtV2V/Connection.pm b/lib/Sys/VirtV2V/Connection.pm
index da6a44b..4dc659d 100644
--- a/lib/Sys/VirtV2V/Connection.pm
+++ b/lib/Sys/VirtV2V/Connection.pm
@@ -186,6 +186,9 @@ sub _storage_iterate
$source_e->setAttribute($source->getName(), '');
}
+ die(user_message(__("Guest doesn't define any recognised storage devices")))
+ unless (@paths > 0);
+
$self->{paths} = \@paths;
$self->{devices} = \@devices;
}
diff --git a...
2010 Apr 07
1
[PATCH] Connection: Handle case of cdrom with no <source> element
...103 ++++++++++++++++++++++-------------------
1 files changed, 56 insertions(+), 47 deletions(-)
diff --git a/lib/Sys/VirtV2V/Connection.pm b/lib/Sys/VirtV2V/Connection.pm
index a211662..c901b90 100644
--- a/lib/Sys/VirtV2V/Connection.pm
+++ b/lib/Sys/VirtV2V/Connection.pm
@@ -116,7 +116,8 @@ sub _storage_iterate
my @paths;
# A list of libvirt target device names
my @devices;
- foreach my $disk ($dom->findnodes('/domain/devices/disk')) {
+
+ foreach my $disk ($dom->findnodes("/domain/devices/disk[\@device='disk']")) {
my ($source_e) = $disk->f...
2010 Feb 19
2
[PATCH 1/2] Fix remapping of block devices
...rt device names for the guest's storage prior to
+conversion. This list is guaranteed to be in the same order as the list returned
+by get_storage_paths.
+
+=cut
+
+sub get_storage_devices
+{
+ my $self = shift;
+
+ return $self->{devices};
}
=item get_dom()
@@ -94,8 +110,10 @@ sub _storage_iterate
my $dom = $self->get_dom();
- # Create a hash of guest devices to their paths
- my @storage;
+ # An list of local paths to guest storage
+ my @paths;
+ # A list of libvirt target device names
+ my @devices;
foreach my $disk ($dom->findnodes('/domain/devices...
2010 Mar 30
3
[PATCH 1/2] Refactor guest and volume creation into Sys::VirtV2V::Target::LibVirt
...Virt;
- $conn = Sys::VirtV2V::Connection::LibVirt->new($uri, $name, $pool);
+ $conn = Sys::VirtV2V::Connection::LibVirt->new($uri, $name, $target);
$dom = $conn->get_dom();
$storage = $conn->get_storage_paths();
$devices = $conn->get_storage_devices();
@@ -106,7 +106,7 @@ sub _storage_iterate
{
my $self = shift;
- my ($transfer, $pool) = @_;
+ my ($transfer, $target) = @_;
my $dom = $self->get_dom();
@@ -121,8 +121,8 @@ sub _storage_iterate
defined($source) or die("source element has neither dev nor file: \n"....
2010 Sep 21
1
[PREVIEW ONLY] Refactor data transfer code
...scheme =~ /\+ssh$/) {
- $transfer = "Sys::VirtV2V::Transfer::SSH";
- }
-
- # Default to LocalCopy
- # XXX: Need transfer methods for remote libvirt connections, e.g. scp
- else {
- $transfer = "Sys::VirtV2V::Transfer::LocalCopy";
- }
-
- $self->_storage_iterate($transfer, $target);
+ $self->{vmm} = $vmm;
return $self;
}
-sub _check_shutdown
+sub _get_transfer
{
my $self = shift;
+ my ($path, $is_sparse) = @_;
- my $vmm = $self->{vmm};
- my $domain = $self->_get_domain();
+ my $uri = $self->{uri};
- # Check...
2010 Jan 29
4
[FOR REVIEW ONLY] ESX work in progress
...meat is really in the 4th patch. The rename of MetadataReader->Connection
was because the Connection is now really providing the whole guest, rather than
just its metadata.
I intend to add more transfer methods once ESX conversion is working. A copy
method for LibVirtXML is required at least.
_storage_iterate in Sys::VirtV2V::Connection does interesting things with the
domain's storage devices. I'd especially appreciate a close look there.
Matt
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