New API: set-smp, get-smp
[libguestfs.git] / src / launch.c
index 11d1acf..b0f5b39 100644 (file)
@@ -555,6 +555,12 @@ launch_appliance (guestfs_h *g)
 
     add_cmdline (g, "-nographic");
 
 
     add_cmdline (g, "-nographic");
 
+    if (g->smp > 1) {
+      snprintf (buf, sizeof buf, "%d", g->smp);
+      add_cmdline (g, "-smp");
+      add_cmdline (g, buf);
+    }
+
     snprintf (buf, sizeof buf, "%d", g->memsize);
     add_cmdline (g, "-m");
     add_cmdline (g, buf);
     snprintf (buf, sizeof buf, "%d", g->memsize);
     add_cmdline (g, "-m");
     add_cmdline (g, buf);
@@ -606,7 +612,7 @@ launch_appliance (guestfs_h *g)
     "panic=1 "         /* force kernel to panic if daemon exits */     \
     "console=ttyS0 "   /* serial console */                            \
     "udevtimeout=300 " /* good for very slow systems (RHBZ#480319) */  \
     "panic=1 "         /* force kernel to panic if daemon exits */     \
     "console=ttyS0 "   /* serial console */                            \
     "udevtimeout=300 " /* good for very slow systems (RHBZ#480319) */  \
-    "noapic "          /* workaround for RHBZ#502058 - ok if not SMP */ \
+    "no_timer_check "  /* fix for RHBZ#502058 */                        \
     "acpi=off "        /* we don't need ACPI, turn it off */           \
     "printk.time=1 "   /* display timestamp before kernel messages */   \
     "cgroup_disable=memory " /* saves us about 5 MB of RAM */
     "acpi=off "        /* we don't need ACPI, turn it off */           \
     "printk.time=1 "   /* display timestamp before kernel messages */   \
     "cgroup_disable=memory " /* saves us about 5 MB of RAM */
@@ -1083,7 +1089,8 @@ test_qemu (guestfs_h *g)
    * probably indicates that the qemu binary is missing.
    */
   if (test_qemu_cmd (g, cmd, &g->qemu_help) == -1) {
    * probably indicates that the qemu binary is missing.
    */
   if (test_qemu_cmd (g, cmd, &g->qemu_help) == -1) {
-    perrorf (g, _("%s: command failed: If qemu is located on a non-standard path, try setting the LIBGUESTFS_QEMU environment variable."), cmd);
+    error (g, _("command failed: %s\n\nIf qemu is located on a non-standard path, try setting the LIBGUESTFS_QEMU\nenvironment variable.  There may also be errors printed above."),
+           cmd);
     return -1;
   }
 
     return -1;
   }