X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=src%2Flaunch.c;h=31d98af7fc671ab8544322d36fedea686ae79fff;hb=90b708cba263ab35e66852c1bc47674180142829;hp=ca48bdd1c018d721436f3558ab68a2d035ff5f12;hpb=d28f8f4cc36b42ace02b8c02b80a945315fdbf24;p=libguestfs.git diff --git a/src/launch.c b/src/launch.c index ca48bdd..31d98af 100644 --- a/src/launch.c +++ b/src/launch.c @@ -494,7 +494,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 @@ -1083,7 +1095,7 @@ test_qemu_cmd (guestfs_h *g, const char *cmd, char **ret) return -1; } - if (pclose (fp) == -1) + if (pclose (fp) != 0) return -1; return 0;