qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: anatoly techtonik <techtonik@gmail.com>
Cc: Mike Lovell <mike@dev-zero.net>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-discuss] qemu-kvm: -netdev user: Parameter 'id' is missing
Date: Thu, 26 Jul 2012 10:25:21 +0100	[thread overview]
Message-ID: <CAJSP0QWUOEsxXKCASjPtBU7k1eKE1_fcBXGGGX50__7O9ZBCUA@mail.gmail.com> (raw)
In-Reply-To: <CAPkN8xJ3Br9PTkCy2Pn+eO0YM5-Mn7JJPdHMWS1-w_ubJZBcug@mail.gmail.com>

On Thu, Jul 26, 2012 at 9:21 AM, anatoly techtonik <techtonik@gmail.com> wrote:
> On Wed, Jul 25, 2012 at 6:00 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
>> On Tue, Jul 24, 2012 at 8:02 PM, anatoly techtonik <techtonik@gmail.com> wrote:
>>> On Tue, Jul 24, 2012 at 1:23 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
>>>> On Mon, Jul 23, 2012 at 10:41 PM, anatoly techtonik <techtonik@gmail.com> wrote:
>>>> A -netdev needs to be paired with a NIC -device.  That's why the
>>>> identifier is essential, it allows you to say -netdev
>>>> <type>,id=netdev0 -device <type>,netdev=netdev0.
>>>
>>> It still says "The id option can be used with the -device...", where
>>> "can be" looks like it should be replaced by "must".
>>
>> Strictly speaking "can be" is correct because -device id= is optional.
>>  You can also do:
>> -net user -device virtio-net-pci,vlan=0
>>
>> This is basically equivalent to:
>> -net user -net nic,model=virtio
>
> -net user  is deprecated, no?

Yes.  What I'm showing is that you can use -device without a netdev's
id.  So it isn't a "must" as you asked above.

But I think this detail is not helpful on the Networking wiki page.
The wiki edit I did yesterday removes the issue entirely.

>> What's going on here is that -device is used but with the legacy QEMU
>> "VLAN" feature that can be used to connect NICs and backends.
>>
>> Things aren't as simple as they should be but I think the problem here
>> is really the documentation.  We can try to improve it so that it
>> doesn't leave open questions like this, maybe without going into every
>> nasty detail.
>
> Yes, it would be nice if documentation was user story oriented, going
> gradually from the simplest use stories (tutorials) to more difficult:
> 1. download stuff from internet from guest (NAT) (OS updates, software
> installation)
> 2. run services on guest accessible from host (web server and stuff)
> without specialized configuration (i.e. port forwarding)
> 3. services on guest accessible from other guests (web development
> scenarios - guest servers for db, web, client on host)
> ..
> x. routers, vlans, networks, bridges and other hardcore hardware emulation stuff

Absolutely.  Especially a quickstart would be handy.  For many people
it's not necessary to understand how QEMU networking works, they just
want their VM to access the internet.

>>> Why is it impossible for -netdev to create NIC device automatically if
>>> not explicitly set? As a user I don't really know which net device do
>>> I need. This would greatly simplify user experience (and lower Qemu
>>> bounce rate).
>>
>> There was a similar discussion about -drive for block devices just the
>> other day.  I don't think there's a good answer except that QEMU
>> command-line has historic baggage and that everyone has a different
>> use case so it can be hard to come up with a good simplified
>> command-line option set.
>
> Do you maintain a list of use cases? It should be easy to forward
> people to it when they face with this problem on not-intuitive
> interface. Then outsiders can try to help with prototyping this
> interface too. For example, with Python's argparse.

I'm not aware of a list, sorry.

Stefan

      reply	other threads:[~2012-07-26  9:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAPkN8xLoZ+Ls+RWgDwp3p5zWe_TiYq9+3TbjRFEzAKZMXPYyyg@mail.gmail.com>
     [not found] ` <500DACED.9080805@dev-zero.net>
2012-07-23 21:41   ` [Qemu-devel] [Qemu-discuss] qemu-kvm: -netdev user: Parameter 'id' is missing anatoly techtonik
2012-07-24 10:23     ` Stefan Hajnoczi
2012-07-24 19:02       ` anatoly techtonik
2012-07-25 15:00         ` Stefan Hajnoczi
2012-07-25 15:53           ` Stefan Hajnoczi
2012-07-26  8:21           ` anatoly techtonik
2012-07-26  9:25             ` Stefan Hajnoczi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJSP0QWUOEsxXKCASjPtBU7k1eKE1_fcBXGGGX50__7O9ZBCUA@mail.gmail.com \
    --to=stefanha@gmail.com \
    --cc=mike@dev-zero.net \
    --cc=qemu-devel@nongnu.org \
    --cc=techtonik@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).