diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-10-24 13:24:16 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-10-24 15:47:57 +0100 |
commit | 3814680423984b3c46c2f99e944c2a71862bde9f (patch) | |
tree | ac3aa1ed0c217352bccf5054e4c41f85e5e0672e /src | |
parent | 35900223df1d05d0b8f4da79c854bee9899f81be (diff) | |
download | libguestfs-3814680423984b3c46c2f99e944c2a71862bde9f.tar.gz libguestfs-3814680423984b3c46c2f99e944c2a71862bde9f.tar.xz libguestfs-3814680423984b3c46c2f99e944c2a71862bde9f.zip |
Add test for qemu broken -machine option (RHBZ#748266).
Also add this option, if necessary, when testing for virtio-serial
support.
When the workaround is enabled, we specify machine type 'pc'.
Diffstat (limited to 'src')
-rw-r--r-- | src/launch.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/launch.c b/src/launch.c index 1988f70c..7b3372c2 100644 --- a/src/launch.c +++ b/src/launch.c @@ -586,7 +586,19 @@ launch_appliance (guestfs_h *g) */ if (qemu_supports (g, "-machine")) { add_cmdline (g, "-machine"); +#if QEMU_MACHINE_TYPE_IS_BROKEN + /* Workaround for qemu 0.15: We have to add the '[type=]pc' + * since there is no default. This is not a permanent solution + * because this only works on PC-like hardware. Other platforms + * like ppc would need a different machine type. + * + * This bug is fixed in qemu commit 2645c6dcaf6ea2a51a, and was + * not a problem in qemu < 0.15. + */ + add_cmdline (g, "pc,accel=kvm:tcg"); +#else add_cmdline (g, "accel=kvm:tcg"); +#endif } else { /* qemu sometimes needs this option to enable hardware * virtualization, but some versions of 'qemu-kvm' will use KVM |