aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bbot/agent/machine.cxx21
1 files changed, 13 insertions, 8 deletions
diff --git a/bbot/agent/machine.cxx b/bbot/agent/machine.cxx
index 83e64e5..e7f549d 100644
--- a/bbot/agent/machine.cxx
+++ b/bbot/agent/machine.cxx
@@ -309,10 +309,10 @@ namespace bbot
}
else
{
- auto add = [&os] (string o, string v)
+ auto add = [&os] (string o, optional<string> v = {})
{
os.push_back (move (o));
- os.push_back (move (v));
+ if (v) os.push_back (move (*v));
};
// Network.
@@ -334,6 +334,17 @@ namespace bbot
//"-drive", "if=none,id=disk0,format=raw,file=disk.img"
//"-device", "virtio-scsi-pci,id=scsi"
//"-device", "scsi-hd,drive=disk0"
+
+ // USB settings.
+ //
+ // These options should make graphical VMs usable from VNC.
+ //
+ // Note that the "standard" USB bus may not be available on
+ // architectures other than x86 (e.g., aarch64).
+ //
+ add ("-usb");
+ add ("-device", "usb-kbd");
+ add ("-device", "usb-tablet");
}
// Setup QMP (QEMU Machine Protocol) monitor to act as a log.
@@ -388,12 +399,6 @@ namespace bbot
"-global", "kvm-pit.lost_tick_policy=discard",
#endif
- // USB settings.
- //
- // This option should make graphical VMs usable from VNC.
- //
- "-usb", "-device", "usb-kbd", "-device", "usb-tablet",
-
// These can override the above but not below.
//
os,