From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NnekQ-0007sq-LO for qemu-devel@nongnu.org; Fri, 05 Mar 2010 16:07:50 -0500 Received: from [199.232.76.173] (port=52801 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NnekQ-0007rj-2z for qemu-devel@nongnu.org; Fri, 05 Mar 2010 16:07:50 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NnekO-0003H0-Om for qemu-devel@nongnu.org; Fri, 05 Mar 2010 16:07:49 -0500 Received: from mail-ew0-f214.google.com ([209.85.219.214]:52496) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NnekO-0003Gb-A1 for qemu-devel@nongnu.org; Fri, 05 Mar 2010 16:07:48 -0500 Received: by ewy6 with SMTP id 6so2822014ewy.17 for ; Fri, 05 Mar 2010 13:07:45 -0800 (PST) MIME-Version: 1.0 Sender: brian.thomason@gmail.com Date: Fri, 5 Mar 2010 21:07:45 +0000 Message-ID: <9cd4c8fc1003051307o5cf65642rd065d0da5f75c901@mail.gmail.com> From: Brian Thomason Content-Type: multipart/alternative; boundary=000e0cdf6d886428fc0481141b24 Subject: [Qemu-devel] [PATCH] better describe -net options List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --000e0cdf6d886428fc0481141b24 Content-Type: text/plain; charset=ISO-8859-1 The manpage reflects that multiple -net user calls may be made, but if this is done, it can cause the program to hang. Instead, multiple -net calls can be combined into one, and this patch adds that information to qemu-options.hx. Also, -net user may only be used in conjunction with -net nic. This is already implcitly stated, but this patch makes that statement more explicit. https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/474969 https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/453617 Signed-off-by: Brian Thomason --- qemu-options.hx | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index fd50add..724f434 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -952,7 +952,8 @@ for a list of available devices for your target. @item -net user[,@var{option}][,@var{option}][,...] Use the user mode network stack which requires no administrator -privilege to run. Valid options are: +privilege to run. Please note that this can be used only in conjunction with +@option{-net nic}. Valid options are: @table @option @item vlan=@var{n} @@ -1028,7 +1029,8 @@ the guest IP address @var{guestaddr} on guest port @var{guestport}. If @var{guestaddr} is not specified, its value is x.x.x.15 (default first address given by the built-in DHCP server). By specifying @var{hostaddr}, the rule can be bound to a specific host interface. If no connection type is set, TCP is -used. This option can be given multiple times. +used. This option can not be given multiple times, but multiple rules may +be combined. For example, to redirect host X11 connection from screen 1 to guest screen 0, use the following: @@ -1052,6 +1054,15 @@ telnet localhost 5555 Then when you use on the host @code{telnet localhost 5555}, you connect to the guest telnet server. +To combine two or more hostfwd rules, simply use a comma as a delimiter. For +example, to combine the two rules mentioned in the examples above, use the +following: + +@example +#on the host +qemu -net user,hostfwd=tcp:127.0.0.1:6001-:6000,hostfwd=tcp:5555-::23 [...] +@end example + @item guestfwd=[tcp]:@var{server}:@var{port}-@var{dev} 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. -- 1.6.3.3 --000e0cdf6d886428fc0481141b24 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable The manpage reflects that multiple -net user calls may be made,
but if t= his is done, it can cause the program to hang. Instead,
multiple -net ca= lls can be combined into one, and this patch adds
that information to qe= mu-options.hx. Also, -net user may only
be used in conjunction with -net nic.=A0 This is already implcitly
state= d, but this patch makes that statement more explicit.

https://bugs.l= aunchpad.net/ubuntu/+source/qemu-kvm/+bug/474969
= https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/453617

S= igned-off-by: Brian Thomason <brian.thomason@canonical.com>
---
=A0qemu-options.hx |=A0=A0 15 +++++++++++++--
=A01 files changed,= 13 insertions(+), 2 deletions(-)

diff --git a/qemu-options.hx b/qem= u-options.hx
index fd50add..724f434 100644
--- a/qemu-options.hx
+= ++ b/qemu-options.hx
@@ -952,7 +952,8 @@ for a list of available devices for your target.
=A0=
=A0@item -net user[,@var{option}][,@var{option}][,...]
=A0Use the us= er mode network stack which requires no administrator
-privilege to run.= Valid options are:
+privilege to run. Please note that this can be used only in conjunction wi= th
+@option{-net nic}. Valid options are:
=A0
=A0@table @option=A0@item vlan=3D@var{n}
@@ -1028,7 +1029,8 @@ the guest IP address @var= {guestaddr} on guest port @var{guestport}. If
=A0@var{guestaddr} is not specified, its value is x.x.x.15 (default first a= ddress
=A0given by the built-in DHCP server). By specifying @var{hostadd= r}, the rule can
=A0be bound to a specific host interface. If no connect= ion type is set, TCP is
-used. This option can be given multiple times.
+used. This option can n= ot be given multiple times, but multiple rules may
+be combined.
=A0<= br>=A0For example, to redirect host X11 connection from screen 1 to guest =A0screen 0, use the following:
@@ -1052,6 +1054,15 @@ telnet localhost = 5555
=A0Then when you use on the host @code{telnet localhost 5555}, you<= br>=A0connect to the guest telnet server.
=A0
+To combine two or more= hostfwd rules, simply use a comma as a delimiter. For
+example, to combine the two rules mentioned in the examples above, use the=
+following:
+
+@example
+#on the host
+qemu -net user,hostf= wd=3Dtcp:127.0.0.1:6001-:6000,hostfwd=3Dtcp:5555-::23 [...]
+@end exampl= e
+
=A0@item guestfwd=3D[tcp]:@var{server}:@var{port}-@var{dev}
=A0Forw= ard guest TCP connections to the IP address @var{server} on port @var{port}=
=A0to the character device @var{dev}. This option can be given multiple= times.
--
1.6.3.3

--000e0cdf6d886428fc0481141b24--