search for: aug_match

Displaying 20 results from an estimated 178 matches for "aug_match".

2016 Nov 16
2
Re: [ovirt-users] OVA import of FC21 VM hangs during virt-v2v conversion?
...v2v: is_file = 0 > libguestfs: trace: v2v: is_file "/etc/sysconfig/kernel" "followsymlinks:true" > guestfsd: main_loop: new request, len 0x48 > guestfsd: main_loop: proc 37 (is_file) took 0.00 seconds > libguestfs: trace: v2v: is_file = 1 > libguestfs: trace: v2v: aug_match > "/files/etc/sysconfig/kernel/DEFAULTKERNEL/value" > guestfsd: main_loop: new request, len 0x5c > guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds > libguestfs: trace: v2v: aug_match = > ["/files/etc/sysconfig/kernel/DEFAULTKERNEL/value"] > libguestf...
2010 May 13
1
[PATCH] Improve augeas error reporting
...9 @@ sub new return $self; } +sub _augeas_error +{ + my $self = shift; + my ($err) = @_; # The original error message. We will emit this if there + # were no augeas errors. + + my $g = $self->{g}; + + my $msg = ""; + + foreach my $error ($g->aug_match('/augeas/files//error')) { + $error =~ /^\/augeas\/files(\/.*)\/error$/ + or die("Unexpected return from aug_match: $error"); + my $file = $1; + + my %detail; + foreach my $detail_path ($g->aug_match("$error//*")) { +...
2011 Dec 07
2
failure converting Linux ESX guest to KVM hypervisor
...are/perl5/vendor_perl/Sys/VirtV2V/GuestfsHandle.pm line 188. at /usr/lib64/perl5/vendor_perl/Sys/Guestfs/Lib.pm line 1022 libguestfs: trace: available "augeas" libguestfs: trace: available = 0 libguestfs: trace: aug_init "/" 16 libguestfs: trace: aug_init = 0 libguestfs: trace: aug_match "/files//etc/grub.conf/title" libguestfs: trace: aug_match = [""] libguestfs: trace: aug_get "/files//etc/grub.conf/default" libguestfs: trace: aug_get = NULL (error) libguestfs: trace: aug_init "/" 16 libguestfs: trace: aug_init = 0 libguestfs: trace: aug_ma...
2016 Aug 15
2
[PATCH v2] v2v: factor out bootloader handling
...ernel/resume"; + "/files/boot/grub/device.map/*[label() != \"#comment\"]"; + "/files/etc/sysconfig/grub/boot"; + ] + + method list_kernels () = + let paths = + let expr = sprintf "/files%s/title/kernel" grub_config in + let paths = g#aug_match expr in + let paths = Array.to_list paths in + + (* Remove duplicates. *) + let paths = remove_duplicates paths in + + (* Get the default kernel from grub if it's set. *) + let default = + let expr = sprintf "/files%s/default" grub_config in + tr...
2015 Nov 20
0
[PATCH] v2v: factor out bootloader handling
...ernel/resume"; + "/files/boot/grub/device.map/*[label() != \"#comment\"]"; + "/files/etc/sysconfig/grub/boot"; + ] + + method list_kernels () = + let paths = + let expr = sprintf "/files%s/title/kernel" grub_config in + let paths = g#aug_match expr in + let paths = Array.to_list paths in + + (* Remove duplicates. *) + let paths = remove_duplicates paths in + + (* Get the default kernel from grub if it's set. *) + let default = + let expr = sprintf "/files%s/default" grub_config in + tr...
2016 Aug 15
0
Re: [PATCH v2] v2v: factor out bootloader handling
...es/boot/grub/device.map/*[label() != \"#comment\"]"; > + "/files/etc/sysconfig/grub/boot"; > + ] > + > + method list_kernels () = > + let paths = > + let expr = sprintf "/files%s/title/kernel" grub_config in > + let paths = g#aug_match expr in > + let paths = Array.to_list paths in > + > + (* Remove duplicates. *) > + let paths = remove_duplicates paths in > + > + (* Get the default kernel from grub if it's set. *) > + let default = > + let expr = sprintf "/files%s/...
2016 Sep 09
1
[PATCH 1/2] v2v: linux: Avoid recursive functions.
...x.augeas_reload g @@ -675,6 +675,41 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source rcaps = and configure_kernel_modules block_type net_type = (* This function modifies modules.conf (and its various aliases). *) + let augeas_modprobe query = + (* Execute g#aug_match, but against every known location of + modules.conf. *) + let paths = [ + "/files/etc/conf.modules/alias"; + "/files/etc/modules.conf/alias"; + "/files/etc/modprobe.conf/alias"; + "/files/etc/modprobe.d/*/alias"; +...
2010 May 11
1
[PATCH] GuestOS: Update XF86Config or xorg.conf as appropriate
...elf->{xorg} = '/etc/X11/xorg.conf'; + } + # Make augeas pick up the new configuration $g->aug_load(); }; @@ -287,7 +298,7 @@ sub update_display_driver # Update the display driver if it exists eval { foreach my $path - ($g->aug_match('/files/etc/X11/xorg.conf/Device/Driver')) + ($g->aug_match('/files'.$self->{xorg}.'/Device/Driver')) { $g->aug_set($path, $driver); } -- 1.6.6.1
2016 Aug 25
2
[PATCH v2] v2v: factor out bootloader handling
...let rex = Str.regexp "^(hd.*)\\(.*\\)" in - Str.replace_first rex "\\1" - in - - let vmlinuzes = - match grub with - | `Grub1 -> - let paths = - let expr = sprintf "/files%s/title/kernel" grub_config in - let paths = g#aug_match expr in - let paths = Array.to_list paths in - - (* Remove duplicates. *) - let paths = remove_duplicates paths in - - (* Get the default kernel from grub if it's set. *) - let default = - let expr = sprintf "/files%s/default" gr...
2011 Apr 26
7
[PATCH 1/7] Push $desc creation into Sys::VirtConvert::Converter->convert
This change is part of an ongoing effort to remove use of $desc and inspect the OS directly as required during conversion. --- lib/Sys/VirtConvert/Connection/LibVirtTarget.pm | 4 +- lib/Sys/VirtConvert/Connection/RHEVTarget.pm | 41 +++++++++--------- lib/Sys/VirtConvert/Converter.pm | 35 ++++++++++++---- lib/Sys/VirtConvert/Converter/RedHat.pm | 45
2010 Apr 14
1
[PATCH] Workaround issue where grubby fails when run under libguestfs
...$initrd; my $found = 0; eval { + my $prefix; + if ($self->{desc}->{boot}->{grub_fs} eq "/boot") { + $prefix = ''; + } else { + $prefix = '/boot'; + } + foreach my $kernel ($g->aug_match('/files/boot/grub/menu.lst/title/kernel')) { - if($g->aug_get($kernel) eq "/vmlinuz-$version") { + if($g->aug_get($kernel) eq "$prefix/vmlinuz-$version") { # Ensure it's the default $kernel =~ m{/files/b...
2010 Jun 30
3
[PATCH 1/2] Add new augeas directory with grub device.map lens
Add a directory to contain required augeas lenses which aren't yet upstream. Include a new lens for grub's device.map. --- augeas/README.txt | 4 ++++ augeas/device_map.aug | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 0 deletions(-) create mode 100644 augeas/README.txt create mode 100644 augeas/device_map.aug diff --git a/augeas/README.txt
2013 Sep 24
0
[PATCH 3/4] Add SUSE converter
...rub', '/boot') { + if (exists($mounts{$path})) { + $self->{grub_fs} = $path; + last; + } + } + + # Initialise augeas + eval { + # Check grub_conf is included by the Grub lens + my $found = 0; + foreach my $incl ($g->aug_match("/augeas/load/Grub/incl")) { + if ($g->aug_get($incl) eq $self->{grub_conf}) { + $found = 1; + last; + } + } + + # If it wasn't there, add it + unless ($found) { + $g->aug_set("/augeas/lo...
2013 Sep 25
0
Re: [PATCH 3/4] Add SUSE converter
...unted at /boot/efi, but the next level efi is lowercase. However, the minor efi changes are what I inherited (well, that and the copyright changes), so I have some more investigation to do here. > > + # Nothing to do if the kernel already has a grub entry > > + return if $g->aug_match("/files$grub_conf/title/kernel". > > + "[. = '$grub_path']") ne ''; > > I notice this is a change from RedHat.pm. Why did you add the "ne ''"? > Augeas will only return kernel entries, and I would expec...
2009 Aug 03
1
[REPOST] Use grub entries to find Linux kernels
This is a repost of the patch I sent on Friday. I know it was already ACK'd, but I've changed a fair bit in addition to adding the requested POD. Specifically: I discovered that augeas's grub lens wasn't returning cmdline the way I expected. This is fixed. The kernel package, if known, is output as a property of the kernel. The XML output of virt-inspector is updated with all
2016 Jul 26
5
[PATCH v2 0/4] Improve LVM handling in the appliance
Hi, this series improves the way LVM is used in the appliance: in particular, now lvmetad can eventually run at all, and with the correct configuration. Also improve the listing strategies. Changes in v2: - dropped patch #5, will be sent separately - move lvmetad statup in own function (patch #2) Thanks, Pino Toscano (4): daemon: lvm-filter: set also global_filter daemon: lvm-filter:
2010 May 07
1
[PATCH] Check a grub kernel exists before selecting it
...sub get_default_kernel $default = $g->aug_get('/files/boot/grub/menu.lst/default'); }; + # Get the grub filesystem + my $grub = $self->{desc}->{boot}->{grub_fs}; + + # Look for a kernel, starting with the default + my @paths; + push(@paths, $g->aug_match("/files/boot/grub/menu.lst/". + "title[$default]/kernel")) if defined($default); + push(@paths, $g->aug_match('/files/boot/grub/menu.lst/title/kernel')); + my $kernel; - if(defined($default)) { - # Grub's default is...
2013 Oct 03
2
[PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...rub', '/boot') { + if (exists($mounts{$path})) { + $self->{grub_fs} = $path; + last; + } + } + + # Initialise augeas + eval { + # Check grub_conf is included by the Grub lens + my $found = 0; + foreach my $incl ($g->aug_match("/augeas/load/Grub/incl")) { + if ($g->aug_get($incl) eq $self->{grub_conf}) { + $found = 1; + last; + } + } + + # If it wasn't there, add it + unless ($found) { + $g->aug_set("/augeas/lo...
2013 Sep 25
5
Re: [PATCH 3/4] Add SUSE converter
...~ /^$grub_fs(.*)/ > + or v2vdie __x('Kernel {kernel} is not under grub tree {grub}', > + kernel => $path, grub => $grub_fs); > + my $grub_path = $1; > + > + # Nothing to do if the kernel already has a grub entry > + return if $g->aug_match("/files$grub_conf/title/kernel". > + "[. = '$grub_path']") ne ''; I notice this is a change from RedHat.pm. Why did you add the "ne ''"? Augeas will only return kernel entries, and I would expect a blank kernel ent...
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