diff options
| -rwxr-xr-x | scripts/runqemu | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index 18aeb7f5f0..6a5a6451da 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
| @@ -84,6 +84,7 @@ of the following environment variables (in any order): | |||
| 84 | publicvnc - enable a VNC server open to all hosts | 84 | publicvnc - enable a VNC server open to all hosts |
| 85 | audio - enable audio | 85 | audio - enable audio |
| 86 | guestagent - enable guest agent communication | 86 | guestagent - enable guest agent communication |
| 87 | qmp=<path> - create a QMP socket (defaults to unix:qmp.sock if unspecified) | ||
| 87 | [*/]ovmf* - OVMF firmware file or base name for booting with UEFI | 88 | [*/]ovmf* - OVMF firmware file or base name for booting with UEFI |
| 88 | tcpserial=<port> - specify tcp serial port number | 89 | tcpserial=<port> - specify tcp serial port number |
| 89 | qemuparams=<xyz> - specify custom parameters to QEMU | 90 | qemuparams=<xyz> - specify custom parameters to QEMU |
| @@ -221,6 +222,7 @@ class BaseConfig(object): | |||
| 221 | self.cleaned = False | 222 | self.cleaned = False |
| 222 | # Files to cleanup after run | 223 | # Files to cleanup after run |
| 223 | self.cleanup_files = [] | 224 | self.cleanup_files = [] |
| 225 | self.qmp = None | ||
| 224 | self.guest_agent = False | 226 | self.guest_agent = False |
| 225 | self.guest_agent_sockpath = '/tmp/qga.sock' | 227 | self.guest_agent_sockpath = '/tmp/qga.sock' |
| 226 | 228 | ||
| @@ -536,6 +538,10 @@ to your build configuration. | |||
| 536 | self.qemu_opt_script += ' -vnc :0' | 538 | self.qemu_opt_script += ' -vnc :0' |
| 537 | elif arg == 'guestagent': | 539 | elif arg == 'guestagent': |
| 538 | self.guest_agent = True | 540 | self.guest_agent = True |
| 541 | elif arg == "qmp": | ||
| 542 | self.qmp = "unix:qmp.sock" | ||
| 543 | elif arg.startswith("qmp="): | ||
| 544 | self.qmp = arg[len('qmp='):] | ||
| 539 | elif arg.startswith('guestagent-sockpath='): | 545 | elif arg.startswith('guestagent-sockpath='): |
| 540 | self.guest_agent_sockpath = '%s' % arg[len('guestagent-sockpath='):] | 546 | self.guest_agent_sockpath = '%s' % arg[len('guestagent-sockpath='):] |
| 541 | elif arg.startswith('tcpserial='): | 547 | elif arg.startswith('tcpserial='): |
| @@ -1406,6 +1412,10 @@ to your build configuration. | |||
| 1406 | self.qemu_opt += ' -device virtio-serial ' | 1412 | self.qemu_opt += ' -device virtio-serial ' |
| 1407 | self.qemu_opt += ' -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 ' | 1413 | self.qemu_opt += ' -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 ' |
| 1408 | 1414 | ||
| 1415 | def setup_qmp(self): | ||
| 1416 | if self.qmp: | ||
| 1417 | self.qemu_opt += " -qmp %s,server,nowait" % self.qmp | ||
| 1418 | |||
| 1409 | def setup_vga(self): | 1419 | def setup_vga(self): |
| 1410 | if self.nographic == True: | 1420 | if self.nographic == True: |
| 1411 | if self.sdl == True: | 1421 | if self.sdl == True: |
| @@ -1547,6 +1557,7 @@ to your build configuration. | |||
| 1547 | self.qemu_opt += " -snapshot" | 1557 | self.qemu_opt += " -snapshot" |
| 1548 | 1558 | ||
| 1549 | self.setup_guest_agent() | 1559 | self.setup_guest_agent() |
| 1560 | self.setup_qmp() | ||
| 1550 | self.setup_serial() | 1561 | self.setup_serial() |
| 1551 | self.setup_vga() | 1562 | self.setup_vga() |
| 1552 | 1563 | ||
