[PATCH] Add -m/--machine option. Pick the default machine type depending on arch.

Daniel P. Berrangé berrange at redhat.com
Thu Sep 10 12:52:20 UTC 2020


On Thu, Sep 10, 2020 at 01:40:09PM +0100, Richard W.M. Jones wrote:
> Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1875763
> ---
>  qemu-sanity-check.in     | 20 +++++++++++++++++---
>  qemu-sanity-check.pod.in |  8 ++++++++
>  2 files changed, 25 insertions(+), 3 deletions(-)
> 
> diff --git a/qemu-sanity-check.in b/qemu-sanity-check.in
> index 5536eda..e1abafd 100644
> --- a/qemu-sanity-check.in
> +++ b/qemu-sanity-check.in
> @@ -1,7 +1,7 @@
>  #!/bin/bash
>  # -*- shell-script -*-
>  # qemu-sanity-check
> -# Copyright (C) 2013 Red Hat Inc.
> +# Copyright (C) 2013-2020 Red Hat Inc.
>  #
>  # This program is free software; you can redistribute it and/or modify
>  # it under the terms of the GNU General Public License as published by
> @@ -27,6 +27,14 @@ canonical_arch="$(uname -m | sed 's/i[456]86/i386/')"
>  timeout=10m
>  accel=kvm:tcg
>  
> +# Default machine type depends on arch.  You can override this using
> +# -m|--machine option.
> +case "$canonical_arch" in
> +    arm*|aarch*) machine=virt ;;
> +    # On non-ARM let qemu pick the default.
> +    *) machine= ;;
> +esac

avr, rx and tricore also lack a defalt but none of those matter for
this purpose

Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the virt-tools-list mailing list