diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/launch.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/launch.c b/src/launch.c index a7c75ee9..c14b369e 100644 --- a/src/launch.c +++ b/src/launch.c @@ -640,6 +640,22 @@ launch_appliance (guestfs_h *g) add_cmdline (g, "virtio-blk-pci.scsi=off"); } + if (qemu_supports (g, "-nodefconfig")) + add_cmdline (g, "-nodefconfig"); + + /* Newer versions of qemu (from around 2009/12) changed the + * behaviour of monitors so that an implicit '-monitor stdio' is + * assumed if we are in -nographic mode and there is no other + * -monitor option. Only a single stdio device is allowed, so + * this broke the '-serial stdio' option. There is a new flag + * called -nodefaults which gets rid of all this default crud, so + * let's use that to avoid this and any future surprises. + */ + if (qemu_supports (g, "-nodefaults")) + add_cmdline (g, "-nodefaults"); + + add_cmdline (g, "-nographic"); + /* Add drives */ struct drive *drv = g->drives; while (drv != NULL) { @@ -653,9 +669,6 @@ launch_appliance (guestfs_h *g) drv = drv->next; } - if (qemu_supports (g, "-nodefconfig")) - add_cmdline (g, "-nodefconfig"); - if (STRNEQ (QEMU_OPTIONS, "")) { /* Add the extra options for the qemu command line specified * at configure time. @@ -705,19 +718,6 @@ launch_appliance (guestfs_h *g) } #endif /* i386 or x86-64 */ - /* Newer versions of qemu (from around 2009/12) changed the - * behaviour of monitors so that an implicit '-monitor stdio' is - * assumed if we are in -nographic mode and there is no other - * -monitor option. Only a single stdio device is allowed, so - * this broke the '-serial stdio' option. There is a new flag - * called -nodefaults which gets rid of all this default crud, so - * let's use that to avoid this and any future surprises. - */ - if (qemu_supports (g, "-nodefaults")) - add_cmdline (g, "-nodefaults"); - - add_cmdline (g, "-nographic"); - if (g->smp > 1) { snprintf (buf, sizeof buf, "%d", g->smp); add_cmdline (g, "-smp"); |