aboutsummaryrefslogtreecommitdiff
path: root/bbot/agent/machine.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bbot/agent/machine.cxx')
-rw-r--r--bbot/agent/machine.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/bbot/agent/machine.cxx b/bbot/agent/machine.cxx
index 25b5278..df23fde 100644
--- a/bbot/agent/machine.cxx
+++ b/bbot/agent/machine.cxx
@@ -84,7 +84,7 @@ namespace bbot
static string
create_tap (const string& br, uint16_t port)
{
- string t ("tap" + to_string (tc_num));
+ string t ("tap" + to_string (offset));
tracer trace ("create_tap", t.c_str ());
@@ -207,8 +207,13 @@ namespace bbot
generate_mac ()),
kvm ("kvm"),
net (br, port),
- vnc ("127.0.0.1:" + to_string (5900 + tc_num)),
- monitor ("/tmp/" + tc_name + "-monitor")
+ //
+ // QEMU's -vnc option (see below) expects the port offset from 5900
+ // rather than the absolute value. The low 5901+, 6001+, and 6101+
+ // ports all look good collision-wise with anything useful.
+ //
+ vnc ("127.0.0.1:" + to_string (5900 + offset)),
+ monitor ("/tmp/monitor-" + tc_name + '-' + to_string (inst))
{
tracer trace ("kvm_machine", md.string ().c_str ());
@@ -324,7 +329,7 @@ namespace bbot
"-no-hpet",
"-global", "kvm-pit.lost_tick_policy=discard",
os,
- "-vnc", "127.0.0.1:" + to_string (tc_num), // 5900 + tc_num
+ "-vnc", "127.0.0.1:" + to_string (offset), // 5900 + offset
"-monitor", "unix:" + monitor.string () + ",server,nowait");
}