search for: open_guest

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

Did you mean: open_guestfs
2012 Mar 31
1
modifying open_guest function (copy_over.c)
It works, but I should delete if (guestfs_umount_all (destg) == -1) ??? exit (EXIT_FAILURE); inmain() function and /* Clean up. */ ? if (guestfs_umount_all (srcg) == -1) { ??? pthread_cancel (threaddata->mainthread); ??? exit (EXIT_FAILURE); ? } in the start_scrthread() function or it will return an error after the program finish: libguestfs: error: umount_all: umount:
2009 Jul 15
0
[PATCH] Make Perl strings translatable
...ndex d5dfb4e..d79079c 100644 --- a/perl/lib/Sys/Guestfs/Lib.pm +++ b/perl/lib/Sys/Guestfs/Lib.pm @@ -22,6 +22,7 @@ use warnings; use Sys::Guestfs; use File::Temp qw/tempdir/; +use Locale::TextDomain 'libguestfs'; # Optional: eval "use Sys::Virt;"; @@ -131,35 +132,36 @@ sub open_guest } elsif (ref ($first) eq "SCALAR") { @images = ($first); } else { - die "open_guest: first parameter must be a string or an arrayref" + die __"open_guest: first parameter must be a string or an arrayref" } my ($conn, $dom); if (-e $images...
2016 Dec 02
1
[PATCH NOT TO BE APPLIED] builder: make-template: Add --encrypted
I was attempting one way to solve: https://bugzilla.redhat.com/show_bug.cgi?id=1400332 "RFE: virt-builder should support templates with encrypted filesystems" However this approach doesn't really work because templates containing encrypted partitions cannot be compressed, and therefore the guest template would be a multi-gigabyte download. I better approach will likely be to use
2012 May 03
2
[PATCH 0/2] Don't fail if 'type' (disk format) attribute is missing from libvirt XML (RHBZ#701814).
https://bugzilla.redhat.com/show_bug.cgi?id=701814
2012 Mar 09
1
[PATCH 1/2] Close all file descriptors in the recovery process.
From: "Richard W.M. Jones" <rjones at redhat.com> If the parent process uses a pipe (or any fd, but pipes are a particular problem), then the recovery process would hold open the file descriptor(s) of the pipe, meaning that it could not be fully closed in the parent. Because the recovery process doesn't use exec(2), this wasn't avoidable even using FD_CLOEXEC. Avoid this
2010 Mar 29
4
[PATCH 0/3] Export and merge into Windows Registry
As described here previously: https://www.redhat.com/archives/libguestfs/2010-March/msg00129.html Here is the three part patch to reimplement virt-win-reg to support exporting and merging Windows Registry entries in the 'regedit' format. Tested by me on a local Windows VM. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top'
2010 Jun 17
2
[PATCH] Improve cleanup of libguestfs handle with Sys::VirtV2V::GuestfsHandle
...copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +package Sys::VirtV2V::GuestfsHandle; + +use strict; +use warnings; + +use Carp; + +use Sys::Guestfs::Lib qw(open_guest); +use Sys::VirtV2V::UserMessage qw(user_message); + +use Locale::TextDomain 'virt-v2v'; + +=pod + +=head1 NAME + +Sys::VirtV2V::GuestfsHandle - Proxy Sys::Guestfs with custom close behaviour + +=head1 SYNOPSIS + + use Sys::VirtV2V::GuestfsHandle; + + my $g = new Sys::VirtV2V::GuestfsHandle...
2009 Aug 19
2
[PATCH] Export inspect_linux_kernel in Lib.pm
...changed, 25 insertions(+), 13 deletions(-) diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm index 1f84bc6..dfa79af 100644 --- a/perl/lib/Sys/Guestfs/Lib.pm +++ b/perl/lib/Sys/Guestfs/Lib.pm @@ -66,7 +66,8 @@ use vars qw(@EXPORT_OK @ISA); @ISA = qw(Exporter); @EXPORT_OK = qw(open_guest get_partitions resolve_windows_path inspect_all_partitions inspect_partition - inspect_operating_systems mount_operating_system inspect_in_detail); + inspect_operating_systems mount_operating_system inspect_in_detail + inspect_linux_kernel); =head2 open_guest @@ -1551,10 +1552,19 @@ sub...
2009 Sep 23
1
[PATCH] virt-cat: Remove some unused Perl module includes.
...virt-cat: Remove some unused Perl module includes. --- cat/virt-cat.pl | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/cat/virt-cat.pl b/cat/virt-cat.pl index 8db5348..748dbb8 100755 --- a/cat/virt-cat.pl +++ b/cat/virt-cat.pl @@ -25,9 +25,6 @@ use Sys::Guestfs::Lib qw(open_guest get_partitions resolve_windows_path inspect_operating_systems mount_operating_system); use Pod::Usage; use Getopt::Long; -use Data::Dumper; -use File::Temp qw/tempdir/; -use XML::Writer; use Locale::TextDomain 'libguestfs'; =encoding utf8 -- 1.6.2.5
2010 Feb 09
5
[PATCH 1/6] Convert config file to XML, and translate networks/bridge for all connections
Previously, only the LibVirtXML connection translated network and bridge names in imported metadata. This change moves this functionality in Converter, making it available to LibVirt connections as well. At the same time, the format of the config file is switched to XML. The primary driver for this is that the allowable syntax of a foreign network/bridge name is not known. Rather than create a
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
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...ame () } @doms; if (@domnames) { - print_title (); - foreach (@domnames) { - do_df ($_); - } + print_title (); + foreach (@domnames) { + do_df ($_); + } } } else { print_title (); @@ -177,9 +177,9 @@ sub do_df my $g; if ($uri) { - $g = open_guest (\@_, address => $uri); + $g = open_guest (\@_, address => $uri); } else { - $g = open_guest (\@_); + $g = open_guest (\@_); } $g->launch (); @@ -195,15 +195,15 @@ sub do_df # Mount each partition in turn, and if mountable, do a statvfs on it. forea...
2016 Nov 30
0
Re: [PATCH] builder: Rearrange how template-building scripts work.
...t; () > + | Some i -> fpf "revision=%d\n" i > + ); > + fpf "checksum[sha512]=%s\n" (sha512sum_of_file output); > + fpf "format=raw\n"; > + fpf "size=%d\n" (virtual_size_gb * 1024 * 1024 * 1024); Shouldn't this be Int64? > +and open_guest filename = > + let g = new Guestfs.guestfs () in > + g#add_drive_opts ~format:"raw" filename; > + g#launch (); > + > + let roots = g#inspect_os () in > + if Array.length roots = 0 then ( > + eprintf "%s: cannot inspect this guest\n" prog; > + e...
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
2010 Feb 12
11
[PATCH 1/9] Convert config file to XML, and translate networks/bridge for all connections
Previously, only the LibVirtXML connection translated network and bridge names in imported metadata. This change moves this functionality in Converter, making it available to LibVirt connections as well. At the same time, the format of the config file is switched to XML. The primary driver for this is that the allowable syntax of a foreign network/bridge name is not known. Rather than create a
2010 Apr 08
1
[PATCH] Move all interaction with the config file into Sys::VirtV2V::Config
...2v/virt-v2v.pl b/v2v/virt-v2v.pl index c7ebad3..66b1844 100755 --- a/v2v/virt-v2v.pl +++ b/v2v/virt-v2v.pl @@ -21,8 +21,6 @@ use strict; use Pod::Usage; use Getopt::Long; -use File::Spec; -use File::stat; use Locale::TextDomain 'virt-v2v'; @@ -32,6 +30,7 @@ use Sys::Guestfs::Lib qw(open_guest get_partitions inspect_all_partitions inspect_in_detail); use Sys::VirtV2V; +use Sys::VirtV2V::Config; use Sys::VirtV2V::Converter; use Sys::VirtV2V::Connection::LibVirt; use Sys::VirtV2V::Connection::LibVirtXML; @@ -215,21 +214,7 @@ GetOptions ("help|?"...
2009 Jul 24
2
[PATCH] Initial drop of virt-v2v
...t, + $module_options{$storage_opt}); +if(!defined($storage)) { + print STDERR __x("{virt-v2v: storage} is not a valid storage option\n", + storage => $storage)."\n"; + exit 1; } -my ($g, $conn, $dom) = open_guest (@params); -$g->launch (); -$g->wait_ready (); +# The name of the target guest is the last command line argument +my $target_name = pop; -# List of possible filesystems. -my @partitions = get_partitions ($g); +$mdr->handle_arguments(@ARGV); -# Now query each one to build up a picture...
2010 Jul 28
3
Create new Sys::VirtV2V::Util
These 2 patches are mostly code motion. They were prompted by an apparent augeas error in BZ 613967 which didn't display useful error message. The error seems to happen in Converter::Linux. GuestOS::RedHat had a handy function which displayed verbose augeas error messages. This function moves into the new module where it can be used by both modules. The second patch is an consequential tidy
2016 Nov 28
2
[PATCH] builder: Rearrange how template-building scripts work.
...s_status_for_errors pstat; + cleanup_libvirt_guest (); + + (* Get the root filesystem which is the one which will be + * expanded. Since we never use LVM, this should return a + * plain partition. However virt-builder can deal with LVM + * so we may need to revisit this. + *) + let g = open_guest tmpout in + let roots = g#inspect_get_roots () in + let expandfs = g#canonical_device_name roots.(0) in + assert (String.sub expandfs 0 7 = "/dev/sd"); + + (* Some guests are special flowers. *) + (match os with + | Debian _ -> + (* Remove apt proxy configuration (thanks: D...
2009 Dec 21
4
Refactor virt-v2v to be more like a 'big script'
These patches combine HVSource and HVTarget into a single Converter. This should make it more obvious where to hack without losing any practical flexibility. GuestOS remains separate. GuestOS is now a misnomer, because it's really only a Linux distro abstraction. It will be useless for Windows, for example. Functions which you'd expect to be different on a non-RH distro should live in