search for: _get_os_arch

Displaying 13 results from an estimated 13 matches for "_get_os_arch".

2011 Jan 19
1
[PATCH] Fix architecture detection of Linux guests with invalid grub.conf
...+++++++++++--------- 1 files changed, 12 insertions(+), 9 deletions(-) diff --git a/lib/Sys/VirtV2V/Converter/RedHat.pm b/lib/Sys/VirtV2V/Converter/RedHat.pm index 78a454a..a8a7051 100644 --- a/lib/Sys/VirtV2V/Converter/RedHat.pm +++ b/lib/Sys/VirtV2V/Converter/RedHat.pm @@ -610,17 +610,20 @@ sub _get_os_arch my $boot = $desc->{boot}; my $default_boot = $boot->{default} if(defined($boot)); - my $arch; - if(defined($default_boot)) { - my $config = $boot->{configs}->[$default_boot]; + # Pick the default config if one is defined + my $config = $boot->{configs}-...
2009 Dec 21
1
[PATCH] Converter: Blacklist ACPI for RHEL 3 x86_64
...} diff --git a/lib/Sys/VirtV2V/Converter/Linux.pm b/lib/Sys/VirtV2V/Converter/Linux.pm index db7a1ed..057ef45 100644 --- a/lib/Sys/VirtV2V/Converter/Linux.pm +++ b/lib/Sys/VirtV2V/Converter/Linux.pm @@ -105,6 +105,7 @@ sub convert $guestcaps{virtio} = $virtio; $guestcaps{arch} = _get_os_arch($desc); + $guestcaps{acpi} = _supports_acpi($desc, $guestcaps{arch}); return \%guestcaps; } @@ -495,6 +496,21 @@ sub _find_xen_kernel_modules return @modules; } +# Return 1 if the guest supports ACPI, 0 otherwise +sub _supports_acpi +{ + my ($desc, $arch) = @_; + + # Blac...
2011 Jan 20
1
[PATCH] Don't remove foreign kernels during conversion
...o continue.")) unless(defined($boot_kernel)); - # It's safe to remove kernels now - foreach my $kernel (@remove_kernels) { - # Uninstall the kernel from the guest - _remove_kernel($kernel, $g); - } - return $boot_kernel; } @@ -631,34 +614,18 @@ sub _get_os_arch return $arch; } -# Return a list of foreign hypervisor specific kernels -sub _find_hv_kernels +# Determine if a specific kernel is hypervisor-specific +sub _is_hv_kernel { - my $desc = shift; - - my $boot = $desc->{boot}; - return () unless(defined($boot)); - - my $configs =...
2013 Oct 31
6
[PATCH 0/4] virt-v2v: Convert RedHat.pm to Linux.pm
In preparation for an upcoming patch which adds support for SUSE guest conversions, it makes sense to have an intermediate steps that changes the RedHat.pm converter into a more generic Linux converter. The SUSE changes will then be limited in scope to only what is required for SUSE support. This series of patches accomplishes the following: - Renames RedHat.pm to Linux.pm - Modifies Linux.pm
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
2013 Sep 24
0
[PATCH 3/4] Add SUSE converter
..._configure_kernel_modules($g, $virtio); + _configure_boot($kernel, $virtio, $g, $root, $grub); + + my %guestcaps; + + $guestcaps{block} = $virtio == 1 ? 'virtio' : 'ide'; + $guestcaps{net} = $virtio == 1 ? 'virtio' : 'e1000'; + $guestcaps{arch} = _get_os_arch($g, $root, $grub); + $guestcaps{acpi} = _supports_acpi($g, $root, $guestcaps{arch}); + + return \%guestcaps; +} + +sub _init_selinux +{ + my ($g) = @_; + + # Assume SELinux isn't in use if load_policy isn't available + return if(!$g->exists('/usr/sbin/load_policy'...
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
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 Oct 03
2
[PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
..._configure_kernel_modules($g, $virtio); + _configure_boot($kernel, $virtio, $g, $root, $grub); + + my %guestcaps; + + $guestcaps{block} = $virtio == 1 ? 'virtio' : 'ide'; + $guestcaps{net} = $virtio == 1 ? 'virtio' : 'e1000'; + $guestcaps{arch} = _get_os_arch($g, $root, $grub); + $guestcaps{acpi} = _supports_acpi($g, $root, $guestcaps{arch}); + + return \%guestcaps; +} + +sub _init_selinux +{ + my ($g) = @_; + + # Assume SELinux isn't in use if load_policy isn't available + return if(!$g->exists('/usr/sbin/load_policy'...
2013 Oct 12
0
Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
..._kernel augeas_error($g, $@) if ($@); } + # If the kernel version was backed up previously (SUSE environments), + # restore the original value before returning it. + $boot_kernel = $backup_ver if defined($backup_ver); return $boot_kernel; } @@ -1121,8 +1255,8 @@ sub _get_os_arch # Default to x86_64 if we still didn't find an architecture return 'x86_64' unless defined($arch); - # We want an i686 guest for i[345]86 - return 'i686' if($arch =~ /^i[345]86$/); + # Change i386 to i[56]86 + $arch = _set_32bit_arch($g, $root, $arch);...
2013 Oct 11
2
Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
..."virtio_blk", "virtio_net", + "virtio_pci"); } else { _prepare_bootable($g, $root, $grub, $kernel, "sym53c8xx"); } @@ -1121,8 +1266,8 @@ sub _get_os_arch # Default to x86_64 if we still didn't find an architecture return 'x86_64' unless defined($arch); - # We want an i686 guest for i[345]86 - return 'i686' if($arch =~ /^i[345]86$/); + # Change i386 to i[56]86 + $arch = _set_32bit_arch($g, $root, $arch);...
2013 Sep 25
5
Re: [PATCH 3/4] Add SUSE converter
...2vdie __x('Failed to find a {name} package to install', > + name => "$kernel_pkg"); This is $kernel_pkg.$kernel_arch in RedHat.pm. Is there any reason you removed the arch? > +# Get the target architecture from the default boot kernel > +sub _get_os_arch > +{ > + my ($g, $root, $grub) = @_; > + > + # Get the arch of the default kernel > + my @kernels = $grub->list_kernels(); > + my $path = $kernels[0] if @kernels > 0; > + my $kernel = _inspect_linux_kernel($g, $path) if defined($path); > + my $arch =...
2013 Oct 07
3
Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
On Friday, October 04, 2013 09:38:58 AM Matthew Booth wrote: > It's specifically an error if we're attempting to configure virtio, and > there's no detected virtio kernel. It shouldn't have been possible to > get here in that state, hence it's a programmer error. The code below > attempts to install *any* kernel in the case that we aren't configuring >