Hi Peter,

On 11.12.2017 23:04, Peter Maydell wrote:
> On 7 December 2017 at 18:02, Thomas Huth <th...@redhat.com> wrote:
>> These options likely do not work as expected as soon as the user
>> tries to use more than one network interface at once. The parameters
>> have been marked as deprecated since QEMU v2.6, so users had plenty
>> of time to move their scripts to the new syntax. Time to remove the
>> old parameters now.
> 
> The deprecation message says:
>                error_report("The -redir option is deprecated. "
>                             "Please use '-netdev user,hostfwd=...' instead.");
> 
> How does this work for systems which have embedded ethernet
> devices and can't use -netdev ?

Of course it should work the same way as you currently can configure all
embedded ethernet devices:

 -net nic -net user,hostfwd=...

By the way, I think our documentation is really lacking some proper
description how to deal with on-board devices ...

> This is one reason I haven't bothered to update my scripts yet

-redir is likely not doing what you expect as soon as you are using two
or more (embedded or non-embedded) NICs on a machine, so you really
should not use that option anymore.

> The message also doesn't point out that if you were previously
> using -net + -redir you need to switch to -device + -netdev,
> since -net + -netdev doesn't work AFAIK.

I haven't tried, but I think you can also use:

 -netdev user,id=u1,hostfwd=... -net nic,netdev=u1

Or did you run into problems here?

Anyway, looks like we really have to improve our documentation about
"-net nic" ... yet another item for my TODO list (unless somebody else
wants to have a try)...

 Thomas

Reply via email to