search for: guest_arch

Displaying 20 results from an estimated 47 matches for "guest_arch".

2015 Aug 11
3
[PATCH 1/2] mllib: add normalize_arch helper
Small helper to normalize an architecture string, so it is easier to compare them and check for compatibilities. Make use of it in guest_arch_compatible, simplifying it. --- mllib/common_utils.ml | 12 ++++++++++-- mllib/common_utils.mli | 5 +++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index f9e8996..ca6d470 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_ut...
2015 Aug 11
1
Re: [PATCH 1/2] mllib: add normalize_arch helper
On Tuesday 11 August 2015 15:05:04 Richard W.M. Jones wrote: > On Tue, Aug 11, 2015 at 03:45:11PM +0200, Pino Toscano wrote: > > Small helper to normalize an architecture string, so it is easier to > > compare them and check for compatibilities. > > > > Make use of it in guest_arch_compatible, simplifying it. > > Have a look at: > 8864c47b94cf44ac2d0d8d4b5019073ad1da121b Yes, this is what patch #2 partially reverts (and it's mentioned there). > > mllib/common_utils.ml | 12 ++++++++++-- > > mllib/common_utils.mli | 5 +++++ > > 2 files cha...
2015 Aug 11
0
Re: [PATCH 1/2] mllib: add normalize_arch helper
On Tue, Aug 11, 2015 at 03:45:11PM +0200, Pino Toscano wrote: > Small helper to normalize an architecture string, so it is easier to > compare them and check for compatibilities. > > Make use of it in guest_arch_compatible, simplifying it. Have a look at: 8864c47b94cf44ac2d0d8d4b5019073ad1da121b > mllib/common_utils.ml | 12 ++++++++++-- > mllib/common_utils.mli | 5 +++++ > 2 files changed, 15 insertions(+), 2 deletions(-) > > diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml...
2020 May 04
1
[common PATCH] mltools: add run_in_guest_command helper
...ols/tools_utils.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 var...
2018 Apr 20
1
[PATCH] uefi: remove last references to kraxel's old edk2 builds
...are/edk2.git/ovmf-ia32/OVMF_VARS-pure-efi.fd", - []; - "x86_64", "/usr/share/OVMF/OVMF_CODE.fd", None, diff --git a/v2v/utils.ml b/v2v/utils.ml index 58331207f..372ad8aaa 100644 --- a/v2v/utils.ml +++ b/v2v/utils.ml @@ -64,7 +64,6 @@ let find_uefi_firmware guest_arch = let files = (* The lists of firmware are actually defined in common/utils/uefi.c. *) match guest_arch with - | "i386" | "i486" | "i586" | "i686" -> Uefi.uefi_i386_firmware | "x86_64" -> Uefi.uefi_x86_64_firmware | &...
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
2015 May 15
0
[PATCH 1/2] customize: Give a clear error message if host_cpu not compatible with guest arch.
...et run ~verbose ~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 comma...
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
2015 Oct 29
7
[PATCH 0/7] v2v: Miscellaneous refactorings.
Just refactoring. Rich.
2016 May 10
1
[PATCH] builder: run/schedule a SELinux relabel if needed
...utput diff --git a/builder/website/compress.sh b/builder/website/compress.sh index 2148804..4e09bf3 100644 --- a/builder/website/compress.sh +++ b/builder/website/compress.sh @@ -20,10 +20,26 @@ output=$1 +relabel_args=() + +if [ -n "$DO_RELABEL" ]; then + os_arch=$(uname -m) + guest_arch=$(virt-inspector -a "$output" | virt-inspector --xpath "string(/operatingsystems/operatingsystem/arch)") + + if [ "$os_arch" = "$guest_arch" ] || [ "$os_arch" = "x86_64" -a "$guest_arch" = "i386" ]; then + # t...
2016 Feb 04
0
[PATCH] aarch64: Use a common table of AAVMF paths.
...2 100644 --- a/v2v/utils.ml +++ b/v2v/utils.ml @@ -81,6 +81,8 @@ let qemu_supports_sound_card = function | Types.USBAudio -> true +external aavmf_firmware : unit -> (string * string) list = "v2v_utils_aavmf_firmware" + (* Find the UEFI firmware. *) let find_uefi_firmware guest_arch = let files = @@ -96,10 +98,7 @@ let find_uefi_firmware guest_arch = "/usr/share/qemu/ovmf-x86_64-code.bin", "/usr/share/qemu/ovmf-x86_64-vars.bin" ] | "aarch64" -> - [ "/usr/share/AAVMF/AAVMF_CODE.fd", - "/us...
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.
2015 Aug 31
1
[PATCH] customize: fix running commands on the same architecture
...t run (g : Guestfs.guestfs) root (ops : ops) = ) [ "http_proxy"; "https_proxy"; "ftp_proxy"; "no_proxy" ] in let env_vars = String.concat "\n" env_vars ^ "\n" in - let setarch = + let cmd = match Config.host_cpu, guest_arch with - | "x86_64", ("i386"|"i486"|"i586"|"i686") -> "setarch i686" - | _ -> "" in + | "x86_64", ("i386"|"i486"|"i586"|"i686") -> + sprintf "set...
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.
2015 Aug 27
1
[PATCH] customize: Use setarch when running commands on i686 guest (RHBZ#1256405).
...11 +70,16 @@ let run (g : Guestfs.guestfs) root (ops : ops) = ) [ "http_proxy"; "https_proxy"; "ftp_proxy"; "no_proxy" ] in let env_vars = String.concat "\n" env_vars ^ "\n" in + let setarch = + match Config.host_cpu, guest_arch with + | "x86_64", ("i386"|"i486"|"i586"|"i686") -> "setarch i686" + | _ -> "" in + let cmd = sprintf "\ exec >>%s 2>&1 %s -%s -" (quote logfile) env_vars cmd in +%s %s +" (quote...
2012 Dec 06
3
Re: [libvirt] [PATCH] Convert libxl driver to Xen 4.2
...l driver. > --- > V2: > Remove 128 vcpu limit. > Remove split_string_into_string_list() function copied from xen > sources since libvirt now has virStringSplit(). Tested on Fedora 18, with its use of xen 4.2. ACK; let''s get this pushed. > @@ -62,7 +64,6 @@ struct guest_arch { > static const char *xen_cap_re = "(xen|hvm)-[[:digit:]]+\\.[[:digit:]]+-(x86_32|x86_64|ia64|powerpc64)(p|be)?"; > static regex_t xen_cap_rec; > > - > static int > libxlNextFreeVncPort(libxlDriverPrivatePtr driver, int startPort) > { This looks like a spurio...
2016 May 22
3
[PATCH 0/2] uefi: Add new locations for UEFI files on Fedora.
https://bugzilla.redhat.com/show_bug.cgi?id=1338083 Now that UEFI is fully open source the UEFI firmware can be included in Fedora. The location will be slightly different. These patches do a bit of code rearrangement and add the new paths. Rich.
2016 Jun 13
1
[PATCH v2] sysprep: Add --network to enable the network (RHBZ#1345813).
...-50,7 +50,7 @@ let run (g : Guestfs.guestfs) root (ops : ops) = warning (f_"log file %s: %s (ignored)") logfile (Printexc.to_string exn) in (* Useful wrapper for scripts. *) - let do_run ~display cmd = + let do_run ~display ?(warn_failed_no_network = false) cmd = if not guest_arch_compatible then error (f_"host cpu (%s) and guest arch (%s) are not compatible, so you cannot use command line options that involve running commands in the guest. Use --firstboot scripts instead.") Guestfs_config.host_cpu guest_arch; @@ -90,6 +90,11 @@ exec >>%s...
2015 Jul 01
4
[PATCH 1/2] mllib: add and use last_part_of
...(* Each line is: "user:[!!]password:..." * !! at the front of the password field means the account is locked. diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 3737b4c..083c5d5 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -738,3 +738,10 @@ let guest_arch_compatible guest_arch = | x, y when x = y -> true | "x86_64", ("i386"|"i486"|"i586"|"i686") -> true | _ -> false + +(** Return the last part of a string, after the specified separator. *) +let last_part_of str sep = + try + let...
2015 Aug 27
1
[PATCH v2] customize: Use setarch when running commands on i686 guest
v2: Fix problem when running multiple commands.