From 93a72fc21361058e9803f671fc317afad67ea4d7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 23 Feb 2019 13:57:58 +0200 Subject: Don't allow machine configuration override RAM and CPU --- bbot/agent/machine.cxx | 15 ++++++++++----- 1 file 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 -- cgit v1.1