search for: list_kernel

Displaying 20 results from an estimated 27 matches for "list_kernel".

Did you mean: list_kernels
2016 Aug 26
2
[PATCH] v2v: Use unitless methods for methods which don't change the internal state.
...dex 7829612..e1a769b 100644 --- a/v2v/convert_linux.ml +++ b/v2v/convert_linux.ml @@ -240,7 +240,7 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source rcaps = * list is the default booting kernel. *) let grub_kernels : kernel_info list = - let vmlinuzes = bootloader#list_kernels () in + let vmlinuzes = bootloader#list_kernels in (* Map these to installed kernels. *) filter_map ( diff --git a/v2v/linux_bootloaders.ml b/v2v/linux_bootloaders.ml index d12edf8..f41947e 100644 --- a/v2v/linux_bootloaders.ml +++ b/v2v/linux_bootloaders.ml @@ -29,7 +29,7 @@ module...
2017 Mar 14
1
[PATCH 2/2] v2v: bootloaders: look for device.map also in /boot/grub (Grub2)
...les/etc/default/grub/GRUB_CMDLINE_LINUX"; "/files/etc/default/grub/GRUB_CMDLINE_LINUX_DEFAULT"; "/files/boot/grub2/device.map/*[label() != \"#comment\"]"; + "/files/boot/grub/device.map/*[label() != \"#comment\"]"; ] method list_kernels = -- 2.9.3
2016 Sep 27
8
[PATCH 0/3] v2v: further bits of Debian/Ubuntu guests supports
Hi, this series adds a couple bits more in v2v to convert Debian/Ubuntu (and derived) guests. The series does not complete the support (see known issues below), but all the patches here should be fit for review and inclusion. The series does not enable the conversion, yet. Known issues: * currently tested with simple local guest images, hence needs testing with real guests on
2016 Sep 27
0
[PATCH 3/3] v2v: bootloaders: improve detection of Grub2 default method
Detect only once which method must be used to get and set the default Grub2 kernel in the guest: this avoids the same checks in list_kernels and set_default_kernel. Also, add a "no method" option as well: Debian/Ubuntu guests do not have neither grubby nor Perl's Bootloader::Tools, so there is no way to know what is the default kernel, nor to change it. In this case, add a warning about this situation. --- v2v/linux_bo...
2016 Aug 15
2
[PATCH v2] v2v: factor out bootloader handling
...Fifth Floor, Boston, MA 02110-1301 USA. + *) + +open Printf + +open Common_gettext.Gettext +open Common_utils + +open Types +open Utils + +module G = Guestfs + +class virtual bootloader = object + method virtual name : string + method virtual augeas_device_patterns : string list + method virtual list_kernels : unit -> string list + method virtual set_default_kernel : string -> unit + method set_augeas_configuration () = false + method virtual configure_console : unit -> unit + method virtual remove_console : unit -> unit + method update () = () +end + +(* Helper type used in detect_bo...
2015 Nov 20
0
[PATCH] v2v: factor out bootloader handling
...Fifth Floor, Boston, MA 02110-1301 USA. + *) + +open Printf + +open Common_gettext.Gettext +open Common_utils + +open Types +open Utils + +module G = Guestfs + +class virtual bootloader = object + method virtual name : string + method virtual augeas_device_patterns : string list + method virtual list_kernels : unit -> string list + method virtual set_default : string -> unit + method set_augeas_configuration () = false + method virtual configure_console : unit -> unit + method virtual remove_console : unit -> unit + method update () = () +end + +(* Helper type used in detect_bootloade...
2016 Aug 15
0
Re: [PATCH v2] v2v: factor out bootloader handling
...really "bootloaders"? It's more like "linux_bootloaders", unless this might one day be extended to include NTLDR. > +class virtual bootloader = object > + method virtual name : string > + method virtual augeas_device_patterns : string list > + method virtual list_kernels : unit -> string list > + method virtual set_default_kernel : string -> unit > + method set_augeas_configuration () = false > + method virtual configure_console : unit -> unit > + method virtual remove_console : unit -> unit > + method update () = () > +end I th...
2016 Aug 15
1
Re: [PATCH v2] v2v: factor out bootloader handling
...x_bootloaders", > unless this might one day be extended to include NTLDR. OK, make sense -- I will rename it. > > +class virtual bootloader = object > > + method virtual name : string > > + method virtual augeas_device_patterns : string list > > + method virtual list_kernels : unit -> string list > > + method virtual set_default_kernel : string -> unit > > + method set_augeas_configuration () = false > > + method virtual configure_console : unit -> unit > > + method virtual remove_console : unit -> unit > > + method updat...
2016 Aug 25
2
[PATCH v2] v2v: factor out bootloader handling
...(g#glob_expand "/vmlinuz-*") in - let rex = Str.regexp ".*\\.\\(dpkg-.*|rpmsave|rpmnew\\)$" in - let vmlinuzes = List.filter ( - fun file -> not (Str.string_match rex file 0) - ) vmlinuzes in - vmlinuzes in + let vmlinuzes = bootloader#list_kernels () in (* Map these to installed kernels. *) filter_map ( @@ -396,21 +279,8 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source rcaps = (* Conversion step. *) let rec augeas_grub_configuration () = - match grub with - | `Grub1 -> - (* Ensure Auge...
2016 Sep 09
2
[PATCH] v2v: linux: Move kernel detection to a separate module.
This is a sort of follow-up to the Linux_bootloaders patch. It turns out all the kernel detection code is nicely self- contained and can therefore be moved to its own module. Rich.
2013 Nov 07
6
[PATCH 0/4] virt-v2v: Add support for SUSE guest conversions
The following series of patches adds support for converting SUSE guests through virt-v2v. These changes should not impact non-SUSE guest conversions. Mike Latimer (4): Add perl-Bootloader support to grub packages Add conversion support for SUSE guests Add SUSE to capabilities db and conf Add SUSE support documentation lib/Sys/VirtConvert/Converter/Linux.pm | 480
2016 Sep 09
0
[PATCH] v2v: linux: Move kernel detection to a separate module.
...found.\n\nThis probably indicates that %s was unable to inspect this guest properly.") - prog; - - (* Now the difficult bit. Get the grub kernels. The first in this - * list is the default booting kernel. - *) - let grub_kernels : kernel_info list = - let vmlinuzes = bootloader#list_kernels in - - (* Map these to installed kernels. *) - filter_map ( - fun vmlinuz -> - try - let statbuf = g#statns vmlinuz in - let kernel = - List.find ( - fun { ki_vmlinuz_stat = s } -> - statbuf.G.st_dev = s.G.st_dev &amp...
2016 Oct 03
4
[PATCH v2 0/3] v2v: further bits of Debian/Ubuntu guests supports
Hi, this series adds a couple bits more in v2v to convert Debian/Ubuntu (and derived) guests. The series does not complete the support (see known issues below), but all the patches here should be fit for review and inclusion. The series does not enable the conversion, yet. Known issues: * currently tested with simple local guest images, hence needs testing with real guests on
2013 Oct 31
0
[PATCH] virt-v2v: Add use augeas_error to GrubLegacy, plus typo fixup
The following patch adds augeas_error to the Sys::VirtConvert::Util use statement for GrubLegacy (matching what is used in the Grub2 package). This is required to prevent an undefined subroutine error for the augeas_error call in list_kernels(). There are also a few minor typo fixups: - A message string in _configure_kernel was missing the $ before a variable - In _install_capability, the expression that filters out 'xen' should actually filter out '-xen' - Two typos in comments were irritating me ;) --- lib/...
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
2013 Sep 25
5
Re: [PATCH 3/4] Add SUSE converter
...} > + > + # Check we have a grub2 configuration > + if ($g->exists('/boot/grub2/grub.cfg')) { > + $self->{cfg} = '/boot/grub2/grub.cfg'; > + } > + die unless exists $self->{cfg}; > + > + return $self; > +} > + > +sub list_kernels > +{ > + my $self = shift; > + my $g = $self->{g}; > + > + my @kernels; > + > + # Start by adding the default kernel > + my $default = $self->get_default_image; V2V always uses parens for function calls. > +sub update_console > +{ > + my $...
2013 Sep 24
0
[PATCH 3/4] Add SUSE converter
...unless ($found) { + $g->aug_set("/augeas/load/Grub/incl[last()+1]", $self->{grub_conf}); + + # Make augeas pick up the new configuration + $g->aug_load(); + } + }; + augeas_error($g, $@) if ($@); + + return $self; +} + +sub list_kernels +{ + my $self = shift; + + my $g = $self->{g}; + my $grub_conf = $self->{grub_conf}; + my $grub_fs = $self->{grub_fs}; + + # Look for a kernel, starting with the default + my @paths = eval { + # Get a list of all kernels + my @ret = $g->aug_match("/...
2013 Oct 03
2
[PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...unless ($found) { + $g->aug_set("/augeas/load/Grub/incl[last()+1]", $self->{grub_conf}); + + # Make augeas pick up the new configuration + $g->aug_load(); + } + }; + augeas_error($g, $@) if ($@); + + return $self; +} + +sub list_kernels +{ + my $self = shift; + + my $g = $self->{g}; + my $grub_conf = $self->{grub_conf}; + my $grub_fs = $self->{grub_fs}; + + # Look for a kernel, starting with the default + my @paths = eval { + # Get a list of all kernels + my @ret = $g->aug_match("/...
2013 Oct 12
0
Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...s_error); use Locale::TextDomain 'virt-v2v'; -@Sys::VirtConvert::Converter::RedHat::Grub2::ISA = - qw(Sys::VirtConvert::Converter::RedHat::Grub); +@Sys::VirtConvert::Converter::Linux::Grub2::ISA = + qw(Sys::VirtConvert::Converter::Linux::Grub); sub new { @@ -407,8 +479,7 @@ sub list_kernels my @kernels; # Start by adding the default kernel - my $default = $g->command(['grubby', '--default-kernel']); - chomp($default); + my $default = $self->get_default_image(); push(@kernels, $default) if length($default) > 0; # This is how th...
2013 Oct 11
2
Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...s_error); use Locale::TextDomain 'virt-v2v'; -@Sys::VirtConvert::Converter::RedHat::Grub2::ISA = - qw(Sys::VirtConvert::Converter::RedHat::Grub); +@Sys::VirtConvert::Converter::Linux::Grub2::ISA = + qw(Sys::VirtConvert::Converter::Linux::Grub); sub new { @@ -407,8 +481,7 @@ sub list_kernels my @kernels; # Start by adding the default kernel - my $default = $g->command(['grubby', '--default-kernel']); - chomp($default); + my $default = $self->get_default_image(); push(@kernels, $default) if length($default) > 0; # This is how th...