summaryrefslogtreecommitdiffstats
path: root/src/launch.c
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-09-28 14:39:31 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-09-28 14:52:56 +0100
commit04fbcc63ebf5718608f199eb6b09061cd32283c3 (patch)
tree1df1bb78ce7df4f9363ca8ca41e567026aea2d8a /src/launch.c
parent8403f5a9d8f1451e2c2b029b51bac18724b18ebf (diff)
downloadlibguestfs-04fbcc63ebf5718608f199eb6b09061cd32283c3.tar.gz
libguestfs-04fbcc63ebf5718608f199eb6b09061cd32283c3.tar.xz
libguestfs-04fbcc63ebf5718608f199eb6b09061cd32283c3.zip
New API: set-smp, get-smp
These calls allow you to change the number of virtual CPUs assigned to the appliance. This also adds a --smp option to virt-rescue.
Diffstat (limited to 'src/launch.c')
-rw-r--r--src/launch.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/launch.c b/src/launch.c
index 80eadef2..b0f5b394 100644
--- a/src/launch.c
+++ b/src/launch.c
@@ -555,6 +555,12 @@ launch_appliance (guestfs_h *g)
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);