Revision b412eb61 qemu-options.hx
b/qemu-options.hx | ||
---|---|---|
1421 | 1421 |
connect to the guest telnet server. |
1422 | 1422 |
|
1423 | 1423 |
@item guestfwd=[tcp]:@var{server}:@var{port}-@var{dev} |
1424 |
@item guestfwd=[tcp]:@var{server}:@var{port}-@var{cmd:command} |
|
1424 | 1425 |
Forward guest TCP connections to the IP address @var{server} on port @var{port} |
1425 |
to the character device @var{dev}. This option can be given multiple times. |
|
1426 |
to the character device @var{dev} or to a program executed by @var{cmd:command} |
|
1427 |
which gets spawned for each connection. This option can be given multiple times. |
|
1428 |
|
|
1429 |
You can either use a chardev directly and have that one used throughout Qemu's |
|
1430 |
lifetime, like in the following example: |
|
1431 |
|
|
1432 |
@example |
|
1433 |
# open 10.10.1.1:4321 on bootup, connect 10.0.2.100:1234 to it whenever |
|
1434 |
# the guest accesses it |
|
1435 |
qemu -net user,guestfwd=tcp:10.0.2.100:1234-tcp:10.10.1.1:4321 [...] |
|
1436 |
@end example |
|
1437 |
|
|
1438 |
Or you can execute a command on every TCP connection established by the guest, |
|
1439 |
so that Qemu behaves similar to an inetd process for that virtual server: |
|
1440 |
|
|
1441 |
@example |
|
1442 |
# call "netcat 10.10.1.1 4321" on every TCP connection to 10.0.2.100:1234 |
|
1443 |
# and connect the TCP stream to its stdin/stdout |
|
1444 |
qemu -net 'user,guestfwd=tcp:10.0.2.100:1234-cmd:netcat 10.10.1.1 4321' |
|
1445 |
@end example |
|
1426 | 1446 |
|
1427 | 1447 |
@end table |
1428 | 1448 |
|
Also available in: Unified diff