search for: output_method

Displaying 12 results from an estimated 12 matches for "output_method".

2011 Apr 21
1
[PATCH] v2v: Filter out the transfer iso if it's returned by inspect_os()
...utput. --- v2v/virt-v2v.pl | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/v2v/virt-v2v.pl b/v2v/virt-v2v.pl index fe07ae9..6e73102 100755 --- a/v2v/virt-v2v.pl +++ b/v2v/virt-v2v.pl @@ -496,11 +496,18 @@ my $g = new Sys::VirtConvert::GuestfsHandle( $output_method eq 'rhev' ); +# Get the name of the appliance's transfer device, if it has one +my $transferdev; +if (defined($transferiso)) { + my @devices = $g->list_devices(); + $transferdev = pop(@devices); +} + my $guestcaps; my $desc; eval { # Inspect the guest - $desc = in...
2010 May 04
2
[PATCH 1/2] Config: NFC: always create and pass round a Config object
...-217,8 +217,7 @@ GetOptions ("help|?" => sub { ) or pod2usage(2); # Read the config file if one was given -my $config; -$config = Sys::VirtV2V::Config->new($config_file) if defined($config_file); +my $config = Sys::VirtV2V::Config->new($config_file); my $target; if ($output_method eq "libvirt") { @@ -302,7 +301,7 @@ my $storage = $conn->get_storage_paths(); # Create the transfer iso if required my $transferiso; -$transferiso = $config->get_transfer_iso() if (defined($config)); +$transferiso = $config->get_transfer_iso(); if ($output_method eq 'r...
2010 Jun 17
2
[PATCH] Improve cleanup of libguestfs handle with Sys::VirtV2V::GuestfsHandle
...::Target::RHEV; use Sys::VirtV2V::ExecHelper; +use Sys::VirtV2V::GuestfsHandle; use Sys::VirtV2V::GuestOS; use Sys::VirtV2V::UserMessage qw(user_message); @@ -357,18 +358,9 @@ my $storage = $conn->get_storage_paths(); my $transferiso; $transferiso = $config->get_transfer_iso(); -if ($output_method eq 'rhev') { - $) = "36 36"; - $> = "36"; -} - # Open a libguestfs handle on the guest's storage devices -my $g = get_guestfs_handle($storage, $transferiso); - -if ($output_method eq 'rhev') { - $) = "0"; - $> = "0"; -}...
2010 Mar 30
3
[PATCH 1/2] Refactor guest and volume creation into Sys::VirtV2V::Target::LibVirt
...11 +100,29 @@ my $input_transport; =item B<-it method> -Species the transport method used to obtain raw storage from the source guest. +Specifies the transport method used to obtain raw storage from the source guest. This is currently only a placeholder, and does nothing. =cut +my $output_method = "libvirt"; + +=item B<-o method> + +Specifies the output method. Supported output methods are: + +=over + +=item libvirt + +Create a libvirt guest. See the I<-oc> and I<-op> options. + +=back + +If no output type is specified, it defaults to libvirt. + +=cut + my $out...
2010 Jun 09
1
[PATCH] Fix cleanup of guest handle when installing with local files
...uestfs handle in an eval block. --- v2v/virt-v2v.pl | 38 ++++++++++++++++++++++++-------------- 1 files changed, 24 insertions(+), 14 deletions(-) diff --git a/v2v/virt-v2v.pl b/v2v/virt-v2v.pl index 726cd50..9008ad6 100755 --- a/v2v/virt-v2v.pl +++ b/v2v/virt-v2v.pl @@ -370,16 +370,29 @@ if ($output_method eq 'rhev') { $> = "0"; } -# Inspect the guest -my $os = inspect_guest($g); +my $os; +my $guestcaps; +eval { + # Inspect the guest + $os = inspect_guest($g); + + # Instantiate a GuestOS instance to manipulate the guest + my $guestos = Sys::VirtV2V::GuestOS-&g...
2013 Sep 05
1
[PATCH] virt-v2v: Add verbose message logging
...__('Guest doesn\'t define any storage devices') unless @{$meta->{disks}} > 0; # Copy source storage to target +if (defined($verbose)) { + logmsg NOTICE, __x('Copying virtual machine storage to target '. + '({output})', output => $output_method) +} $source->copy_storage($target, $output_format, $output_sparse); # Open a libguestfs handle on the guest's storage devices +if (defined($verbose)) { logmsg NOTICE, __x('Starting guestfs') } my @disks = map { [ $_->{device}, $_->{dst}->get_path(),...
2010 Apr 08
1
[PATCH] Move all interaction with the config file into Sys::VirtV2V::Config
...parsefile($config_file); - }; - - die(user_message(__x("Unable to parse config file {path}: {error}", - path => $config_file, error => $@))) if ($@); -} +$config = Sys::VirtV2V::Config->new($config_file) if defined($config_file); my $target; if ($output_method eq "libvirt") { @@ -312,7 +297,8 @@ exit(1) unless(defined($dom)); my $storage = $conn->get_storage_paths(); # Create the transfer iso if required -my $transferiso = get_transfer_iso($config, $config_file); +my $transferiso; +$transferiso = $config->get_transfer_iso() if (define...
2010 Jun 08
3
[PATCH 1/3] Fix RHEV cleanup on unclean shutdown
...lling +# destructors. We don't rely on it anywhere, as we check for errors when reading +# from or writing to a pipe. +$SIG{'PIPE'} = 'IGNORE'; + # Initialise the message output prefix Sys::VirtV2V::UserMessage->set_identifier('virt-v2v'); @@ -362,9 +370,6 @@ if ($output_method eq 'rhev') { $> = "0"; } -$SIG{'INT'} = \&close_guest_handle; -$SIG{'QUIT'} = \&close_guest_handle; - # Inspect the guest my $os = inspect_guest($g); @@ -425,6 +430,12 @@ sub close_guest_handle } } +sub signal_exit +{ + close_guest...
2010 Mar 31
1
[PATCH] Add LocalCopy transfer method to transfer local files to a target
...<Sys::VirtV2V::Converter(3pm)>, +L<virt-v2v(1)>, +L<http://libguestfs.org/>. + +=cut + +1; diff --git a/v2v/virt-v2v.pl b/v2v/virt-v2v.pl index 351caf1..c1a4728 100755 --- a/v2v/virt-v2v.pl +++ b/v2v/virt-v2v.pl @@ -225,6 +225,11 @@ if(defined($config_file)) { my $target; if ($output_method eq "libvirt") { + pod2usage({ -message => __("You must specify an output storage pool ". + "when using the libvirt output method"), + -exitval => 1 }) + unless (defined($output_pool)); + $target = new Sy...
2010 Sep 21
1
[PREVIEW ONLY] Refactor data transfer code
...se Sys::VirtV2V::Connection::LibVirtSource; +use Sys::VirtV2V::Connection::LibVirtTarget; +use Sys::VirtV2V::Connection::LibVirtXMLSource; +use Sys::VirtV2V::Connection::RHEVTarget; use Sys::VirtV2V::ExecHelper; use Sys::VirtV2V::GuestfsHandle; use Sys::VirtV2V::GuestOS; @@ -282,7 +282,8 @@ if ($output_method eq "libvirt") { -exitval => 1 }) unless (defined($output_pool)); - $target = new Sys::VirtV2V::Target::LibVirt($output_uri, $output_pool); + $target = new Sys::VirtV2V::Connection::LibVirtTarget($output_uri, +...
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,
2013 Sep 24
5
[PATCH 0/4] Add SUSE guest converter to virt-v2v
This is a new conversion module to convert SUSE Linux and openSUSE guests. The converter is based on the RedHat module, and should offer the same functionality on both SUSE and RedHat hosts. There are a few additional messages in this module, such as reporting of packages when installing through zypper or the local virt-v2v repo. These messages don't necessarily flow unless verbose switches