* [Qemu-devel] [PATCH] better describe -net options
@ 2010-03-05 21:07 Brian Thomason
2010-03-17 15:32 ` Anthony Liguori
0 siblings, 1 reply; 4+ messages in thread
From: Brian Thomason @ 2010-03-05 21:07 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 2392 bytes --]
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 <brian.thomason@canonical.com>
---
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
[-- Attachment #2: Type: text/html, Size: 2805 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] better describe -net options
2010-03-05 21:07 [Qemu-devel] [PATCH] better describe -net options Brian Thomason
@ 2010-03-17 15:32 ` Anthony Liguori
2010-03-17 16:13 ` Jamie Lokier
0 siblings, 1 reply; 4+ messages in thread
From: Anthony Liguori @ 2010-03-17 15:32 UTC (permalink / raw)
To: Brian Thomason; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 2841 bytes --]
On 03/05/2010 03:07 PM, Brian Thomason wrote:
> 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.
Actually, the problem is that the user created a loop. It's actually
valid to have something like:
-net user -net dump,file=foo.pcap -net nic
But having -net user -net user creates a loop.
Regards,
Anthony Liguori
>
> 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 <brian.thomason@canonical.com
> <mailto:brian.thomason@canonical.com>>
> ---
> 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
>
[-- Attachment #2: Type: text/html, Size: 3797 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] better describe -net options
2010-03-17 15:32 ` Anthony Liguori
@ 2010-03-17 16:13 ` Jamie Lokier
2010-03-17 16:40 ` Anthony Liguori
0 siblings, 1 reply; 4+ messages in thread
From: Jamie Lokier @ 2010-03-17 16:13 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel, Brian Thomason
Anthony Liguori wrote:
>
> On 03/05/2010 03:07 PM, Brian Thomason wrote:
>
> 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.
>
> Actually, the problem is that the user created a loop. It's actually
> valid to have something like:
> -net user -net dump,file=foo.pcap -net nic
> But having -net user -net user creates a loop.
When I used -net user -net user, it didn't hang: QEMU crashed with a
stack overflow.
It crashed after a doing a successful full OS install, because
everything was fine until the first network packet.
That's not nice, even if it is user error.
-- Jamie
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] better describe -net options
2010-03-17 16:13 ` Jamie Lokier
@ 2010-03-17 16:40 ` Anthony Liguori
0 siblings, 0 replies; 4+ messages in thread
From: Anthony Liguori @ 2010-03-17 16:40 UTC (permalink / raw)
To: Jamie Lokier; +Cc: qemu-devel, Brian Thomason
On 03/17/2010 11:13 AM, Jamie Lokier wrote:
> Anthony Liguori wrote:
>
>> On 03/05/2010 03:07 PM, Brian Thomason wrote:
>>
>> 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.
>>
>> Actually, the problem is that the user created a loop. It's actually
>> valid to have something like:
>> -net user -net dump,file=foo.pcap -net nic
>> But having -net user -net user creates a loop.
>>
> When I used -net user -net user, it didn't hang: QEMU crashed with a
> stack overflow.
>
> It crashed after a doing a successful full OS install, because
> everything was fine until the first network packet.
>
> That's not nice, even if it is user error.
>
Well we should dedicate this case in the code and throw an error.
Regards,
Anthony Liguori
> -- Jamie
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-03-17 16:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-05 21:07 [Qemu-devel] [PATCH] better describe -net options Brian Thomason
2010-03-17 15:32 ` Anthony Liguori
2010-03-17 16:13 ` Jamie Lokier
2010-03-17 16:40 ` Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).