search for: inspect_get_arch

Displaying 20 results from an estimated 67 matches for "inspect_get_arch".

2020 May 04
1
[common PATCH] mltools: add run_in_guest_command helper
....ml @@ -679,3 +679,53 @@ let with_timeout op timeout ?(sleep = 2) fn = loop () in loop () + +let run_in_guest_command g root ?logfile ?incompatible_fn cmd = + (* Is the host_cpu compatible with the guest arch? ie. Can we + * run commands in this guest? + *) + let guest_arch = g#inspect_get_arch root in + let guest_arch_compatible = guest_arch_compatible guest_arch in + if not guest_arch_compatible then ( + match incompatible_fn with + | None -> () + | Some fn -> fn () + ) + else ( + (* Add a prologue to the scripts: + * - Pass environment variables through from t...
2015 May 15
5
[PATCH 0/2] customize: Allow --selinux-relabel flag to work on cross-architecture builds.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1212807
2013 Jan 22
1
APIs affected by btrfs subvolumes
...ould this work with bindings? I would deprecate all of the apis below and replace them with alternative versions with a _ext suffix. The replacement apis would accept and return the enhanced descriptor. Inspection APIS: All take a root filesystem as an argument, which may not be a block device. inspect_get_arch inspect_get_distro inspect_get_drive_mappings inspect_get_filesystems inspect_get_format inspect_get_hostname inspect_get_icon inspect_get_major_version inspect_get_minor_version inspect_get_mountpoints inspect_get_package_format inspect_get_package_management inspect_get_product_name inspect_get_p...
2011 Apr 26
7
[PATCH 1/7] Push $desc creation into Sys::VirtConvert::Converter->convert
...sc); + my $ostype = _get_os_type($g, $root); my $ovf = new XML::DOM::Parser->parse(<<EOF); <ovf:Envelope @@ -798,23 +798,24 @@ EOF # one of the above values in case we're wrong. sub _get_os_type { - my ($desc) = @_; + my ($g, $root) = @_; + + my $arch = $g->inspect_get_arch($root); my $arch_suffix = ''; - if ($desc->{arch} eq 'x86_64') { + if ($arch eq 'x86_64') { $arch_suffix = 'x64'; - } elsif ($desc->{arch} ne 'i386') { - logmsg WARN, __x('Unsupported architecture: {arch}', -...
2015 May 15
0
[PATCH 1/2] customize: Give a clear error message if host_cpu not compatible with guest arch.
...~quiet (g : Guestfs.guestfs) root (ops : ops) = (* Timestamped messages in ordinary, non-debug non-quiet mode. *) let msg fs = make_message_function ~quiet fs in + (* Is the host_cpu compatible with the guest arch? ie. Can we + * run commands in this guest? + *) + let guest_arch = g#inspect_get_arch root in + let guest_arch_compatible = + match Config.host_cpu, guest_arch with + | x, y when x = y -> true + | "x86_64", ("i386"|"i486"|"i586"|"i686") -> true + (* In theory aarch64 host could run armv7l commands, but it won't...
2018 Feb 21
0
[PATCH] make-repository: use inspect_get_osinfo
...ombination. *) -> - sprintf "%s%d.%d" distro major minor - let cmp a b = Index.string_of_arch a = Index.string_of_arch b @@ -260,14 +243,10 @@ let process_image acc_entries filename repo tmprepo index interactive let root = Array.get roots 0 in let inspected_arch = g#inspect_get_arch root in let product = g#inspect_get_product_name root in - let distro = g#inspect_get_distro root in - let version_major = g#inspect_get_major_version root in - let version_minor = g#inspect_get_minor_version root in + let shortid = g#inspect_get_osinfo root in let lvs = g#lvs...
2020 May 04
7
[PATCH 0/4] sysprep: add FreeIPA offline unenrollment (RHBZ#1789592)
This patch series adds a new virt-sysprep operation to offline unenroll a guest from FreeIPA. It does so by removing some configuration files and certificates. It requires a change in libguestfs-common before the series is applied. Pino Toscano (4): customize: port do_run to run_in_guest_command sysprep: add a update_system_ca_store side effect sysprep: ca-certificates: request system CA
2017 Oct 27
0
[PATCH v11 5/8] builder: add a template parameter to get_index
...let nroots = Array.length roots in + if nroots <> 1 then ( + eprintf (f_"%s: no ‘arch’ entry for %s and failed to guess it\n") prog n; + corrupt_file () + ); + let inspected_arch = g#inspect_get_arch (Array.get roots 0) in + g#close(); + Or (Some inspected_arch) + with exn -> Or None + else ( + eprintf (f_"%s: no ‘arch’ entry for ‘%s’\n") prog n; + corrupt_file () + ) in...
2017 Nov 13
0
[PATCH v12 2/3] builder: add a template parameter to get_index
...) in + let nroots = Array.length roots in + if nroots <> 1 then ( + eprintf (f_"%s: no ‘arch’ entry for %s and failed to guess it\n") prog n; + corrupt_file () + ); + let inspected_arch = g#inspect_get_arch (Array.get roots 0) in + g#close(); + Index.GuessedArch inspected_arch + else ( + eprintf (f_"%s: no ‘arch’ entry for ‘%s’\n") prog n; + corrupt_file () + ) in let signature_uri =...
2017 Nov 21
0
[PATCH v13 2/3] builder: add a template parameter to get_index
...) in + let nroots = Array.length roots in + if nroots <> 1 then ( + eprintf (f_"%s: no ‘arch’ entry for %s and failed to guess it\n") prog n; + corrupt_file () + ); + let inspected_arch = g#inspect_get_arch (Array.get roots 0) in + g#close(); + Index.GuessedArch inspected_arch + else ( + eprintf (f_"%s: no ‘arch’ entry for ‘%s’\n") prog n; + corrupt_file () + ) in let signature_uri =...
2011 Dec 26
1
Another virt-p2v blew up
...name = "Microsoft Windows Server 2003" libguestfs: trace: inspect_get_major_version "/dev/sda1" libguestfs: trace: inspect_get_major_version = 5 libguestfs: trace: inspect_get_minor_version "/dev/sda1" libguestfs: trace: inspect_get_minor_version = 2 libguestfs: trace: inspect_get_arch "/dev/sda1" libguestfs: trace: inspect_get_arch = "i386" libguestfs: trace: exists "/transferZcKAPK//usr/share/virtio-win/drivers/i386/Wi n2003" libguestfs: send_to_daemon: 108 bytes: 00 00 00 68 | 20 00 f5 f5 | 00 00 00 04 | 00 00 00 24 | 00 00 00 00 | ... guestfsd:...
2017 Mar 13
2
virt-customize fail to inject firstboot script when running it from script.
...ntpoints = ["/", "/dev/sda2", "/boot", "/dev/sda1"] libguestfs: trace: mount "/dev/sda2" "/" libguestfs: trace: mount = 0 libguestfs: trace: mount "/dev/sda1" "/boot" libguestfs: trace: mount = 0 libguestfs: trace: inspect_get_arch "/dev/sda2" libguestfs: trace: inspect_get_arch = "x86_64" libguestfs: trace: inspect_get_type "/dev/sda2" libguestfs: trace: inspect_get_type = "linux" libguestfs: trace: is_dir "/tmp" "followsymlinks:true" libguestfs: trace: is_dir...
2018 Feb 21
3
[PATCH] New API: inspect_get_osinfo
Try to guess the possible osinfo-db short ID for the specified OS. Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1544842 --- generator/actions_inspection.ml | 14 ++++++++ lib/Makefile.am | 1 + lib/inspect-osinfo.c | 75 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 lib/inspect-osinfo.c diff --git
2016 Aug 26
2
[PATCH 1/2] customize: Fix firstboot scripts on Debian 6 & 7 (RHBZ#1019388).
I have only verified the fix on Debian 7. The Debian 6 guest doesn't appear to boot, I'm not sure why. The second patch contains a test suite. Rich.
2013 Oct 11
2
Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...+ + return $success; +} + sub _install_config { my ($kernel_naevr, $install, $upgrade, $g, $root, $config) = @_; @@ -1806,19 +2068,42 @@ sub _install_config } } + my @user_paths = _get_deppaths($g, $root, $config, - \@missing, $g->inspect_get_arch($root), @$user); + \@missing, $g->inspect_get_arch($root), @$user); # We can't proceed if there are any files missing v2vdie __x('Installation failed because the following '. 'files referenced in the configuration file a...
2017 Mar 14
0
Re: virt-customize fail to inject firstboot script when running it from script.
..., "/dev/sda2", "/boot", "/dev/sda1"] > libguestfs: trace: mount "/dev/sda2" "/" > libguestfs: trace: mount = 0 > libguestfs: trace: mount "/dev/sda1" "/boot" > libguestfs: trace: mount = 0 > libguestfs: trace: inspect_get_arch "/dev/sda2" > libguestfs: trace: inspect_get_arch = "x86_64" > libguestfs: trace: inspect_get_type "/dev/sda2" > libguestfs: trace: inspect_get_type = "linux" > libguestfs: trace: is_dir "/tmp" "followsymlinks:true" > l...
2013 Oct 12
0
Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...} + + return $success; +} + sub _install_config { my ($kernel_naevr, $install, $upgrade, $g, $root, $config) = @_; @@ -1806,6 +2056,7 @@ sub _install_config } } + my @user_paths = _get_deppaths($g, $root, $config, \@missing, $g->inspect_get_arch($root), @$user); @@ -1814,11 +2065,33 @@ sub _install_config 'files referenced in the configuration file are '. 'required, but missing: {list}', list => join(' ', @missing)) if scalar(@missing) > 0; - # Install any...
2017 Mar 14
2
Re: virt-customize fail to inject firstboot script when running it from script.
...a2", "/boot", "/dev/sda1"] >> libguestfs: trace: mount "/dev/sda2" "/" >> libguestfs: trace: mount = 0 >> libguestfs: trace: mount "/dev/sda1" "/boot" >> libguestfs: trace: mount = 0 >> libguestfs: trace: inspect_get_arch "/dev/sda2" >> libguestfs: trace: inspect_get_arch = "x86_64" >> libguestfs: trace: inspect_get_type "/dev/sda2" >> libguestfs: trace: inspect_get_type = "linux" >> libguestfs: trace: is_dir "/tmp" "followsymlinks:true&q...
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 >
2015 May 15
3
[PATCH v2 0/2] customize: Allow --selinux-relabel flag to work on cross-architecture builds.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1212807 Since v1: - Combine the virt-builder detection code into virt-customize. - Enables us to delete Architecture and Uname modules completely. Rich.