diff options
author | Anthony Liguori | 2012-07-09 18:56:43 +0200 |
---|---|---|
committer | Anthony Liguori | 2012-07-09 18:56:43 +0200 |
commit | 537cf409421efe68b0df645d8bbb627b2702dd1f (patch) | |
tree | 57faa9246943e33b8f5045ac29d1a3e432a17603 /qemu-options.hx | |
parent | Merge remote-tracking branch 'kwolf/for-anthony' into staging (diff) | |
parent | slirp: Improve error reporting of inaccessible smb directories (diff) | |
download | qemu-537cf409421efe68b0df645d8bbb627b2702dd1f.tar.gz qemu-537cf409421efe68b0df645d8bbb627b2702dd1f.tar.xz qemu-537cf409421efe68b0df645d8bbb627b2702dd1f.zip |
Merge remote-tracking branch 'kiszka/queues/slirp' into staging
* kiszka/queues/slirp:
slirp: Improve error reporting of inaccessible smb directories
slirp: Ensure smbd and shared directory exist when enable smb
slirp: add 'cmd:' target for guestfwd
slirp: Enforce host-side user of smb share
Diffstat (limited to 'qemu-options.hx')
-rw-r--r-- | qemu-options.hx | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/qemu-options.hx b/qemu-options.hx index 8b662648ae..ecf7ca12d7 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -1421,8 +1421,28 @@ Then when you use on the host @code{telnet localhost 5555}, you connect to the guest telnet server. @item guestfwd=[tcp]:@var{server}:@var{port}-@var{dev} +@item guestfwd=[tcp]:@var{server}:@var{port}-@var{cmd:command} Forward guest TCP connections to the IP address @var{server} on port @var{port} -to the character device @var{dev}. This option can be given multiple times. +to the character device @var{dev} or to a program executed by @var{cmd:command} +which gets spawned for each connection. This option can be given multiple times. + +You can either use a chardev directly and have that one used throughout Qemu's +lifetime, like in the following example: + +@example +# open 10.10.1.1:4321 on bootup, connect 10.0.2.100:1234 to it whenever +# the guest accesses it +qemu -net user,guestfwd=tcp:10.0.2.100:1234-tcp:10.10.1.1:4321 [...] +@end example + +Or you can execute a command on every TCP connection established by the guest, +so that Qemu behaves similar to an inetd process for that virtual server: + +@example +# call "netcat 10.10.1.1 4321" on every TCP connection to 10.0.2.100:1234 +# and connect the TCP stream to its stdin/stdout +qemu -net 'user,guestfwd=tcp:10.0.2.100:1234-cmd:netcat 10.10.1.1 4321' +@end example @end table |