search for: guest_arch_compat

Displaying 20 results from an estimated 30 matches for "guest_arch_compat".

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_utils.ml...
2020 May 04
1
[common PATCH] mltools: add run_in_guest_command helper
...h_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 the host. + * - Optionally sen...
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 changed, 1...
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
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 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 i = St...
2015 May 15
0
[PATCH 1/2] customize: Give a clear error message if host_cpu not compatible with guest arch.
...ot (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 + * work without libvirt 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 > i...
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 Jul 01
0
[PATCH 2/3] 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..8601009 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -738,3 +738,8 @@ 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 = + let i = String.rind...
2015 Jul 01
0
Re: [PATCH 1/2] mllib: add and use last_part_of
...!]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 st...
2015 Jul 01
1
Re: [PATCH 1/2] mllib: add and use last_part_of
...* !! 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. *)...
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 Jul 01
5
[PATCH 1/3] mllib: add an optional filter for rm_rf_only_files
This way it is possible to use rm_rf_only_files, but not removing specific files. --- mllib/common_utils.ml | 8 +++++++- mllib/common_utils.mli | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 516cff3..3737b4c 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -640,13 +640,19 @@ let rmdir_on_exit = *
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 2>&...
2015 May 15
0
[PATCH 2/2] customize: Allow --selinux-relabel flag to work on cross-architecture builds (RHBZ#1212807).
...& fixfiles restore; then - rm -f /.autorelabel - else - touch /.autorelabel - echo '%s: SELinux relabelling failed, will relabel at boot instead.' - fi - " prog in - do_run ~display:"load_policy && fixfiles restore" cmd + if guest_arch_compatible then ( + let cmd = sprintf " + if load_policy && fixfiles restore; then + rm -f /.autorelabel + else + touch /.autorelabel + echo '%s: SELinux relabelling failed, will relabel at boot instead.' + fi + " prog in...
2015 Jul 17
0
[PATCH 1/2] mllib: add and use read_first_line_from_file
...d_first_line_from_file filename = + let chan = open_in filename in + let line = input_line chan in + close_in chan; + line diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli index 550f37f..16834f7 100644 --- a/mllib/common_utils.mli +++ b/mllib/common_utils.mli @@ -181,3 +181,7 @@ val guest_arch_compatible : string -> bool val last_part_of : string -> char -> string option (** Return the last part of a string, after the specified separator. *) + +val read_first_line_from_file : string -> string +(** Read only the first line (i.e. until the first newline character) + of a file....
2016 Jul 14
0
[PATCH v2 4/7] customize: Add module for doing SELinux relabel of filesystem.
...customize/customize_run.ml b/customize/customize_run.ml index b96e40c..6f0d615 100644 --- a/customize/customize_run.ml +++ b/customize/customize_run.ml @@ -414,19 +414,7 @@ exec >>%s 2>&1 if ops.flags.selinux_relabel then ( message (f_"SELinux relabelling"); - if guest_arch_compatible then ( - let cmd = sprintf " - if load_policy && fixfiles restore; then - rm -f /.autorelabel - else - touch /.autorelabel - echo '%s: SELinux relabelling failed, will relabel at boot instead.' - fi - " prog in...
2015 Oct 29
7
[PATCH 0/7] v2v: Miscellaneous refactorings.
Just refactoring. Rich.
2016 Dec 14
5
[PATCH v3 0/5] sysprep: Remove various backup files.
v3: - Split out test for "unix-like" guest OSes into separate commit. - Add guestfish --format=qcow2 to the test (x2). Rich.