aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-02-23 13:57:58 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-02-23 13:57:58 +0200
commit93a72fc21361058e9803f671fc317afad67ea4d7 (patch)
treef42e96765c3615b29145c0dbe8d16d4795d1216b
parenta60f797854b6a2556f7ea1c688d7ee872f5d20d6 (diff)
Don't allow machine configuration override RAM and CPU
-rw-r--r--bbot/agent/machine.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/bbot/agent/machine.cxx b/bbot/agent/machine.cxx
index 8eb70b6..92ee930 100644
--- a/bbot/agent/machine.cxx
+++ b/bbot/agent/machine.cxx
@@ -373,12 +373,7 @@ namespace bbot
"-S", // Start suspended.
"-boot", "c", // Boot from disk.
"-no-reboot", // Exit on VM reboot.
- "-m", to_string (ram / 1024) + "M",
"-cpu", "host",
- "-smp", (to_string (cpus) +
- ",sockets=" + to_string (sockets) +
- ",cores=" + to_string (cores) +
- ",threads=" + to_string (threads)),
// RTC settings.
//
@@ -386,8 +381,18 @@ namespace bbot
"-no-hpet",
"-global", "kvm-pit.lost_tick_policy=discard",
+ // These can override the above but not below.
+ //
os,
+ // RAM and CPU configuration.
+ //
+ "-m", to_string (ram / 1024) + "M",
+ "-smp", (to_string (cpus) +
+ ",sockets=" + to_string (sockets) +
+ ",cores=" + to_string (cores) +
+ ",threads=" + to_string (threads)),
+
// VNC.
//
"-vnc", "127.0.0.1:" + to_string (offset), // 5900 + offset