From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuKK0-0003DF-8B for qemu-devel@nongnu.org; Thu, 26 Jul 2012 05:25:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SuKJv-0007Nh-In for qemu-devel@nongnu.org; Thu, 26 Jul 2012 05:25:27 -0400 Received: from mail-lb0-f173.google.com ([209.85.217.173]:56100) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuKJv-0007NO-B6 for qemu-devel@nongnu.org; Thu, 26 Jul 2012 05:25:23 -0400 Received: by lbok6 with SMTP id k6so1283340lbo.4 for ; Thu, 26 Jul 2012 02:25:21 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <500DACED.9080805@dev-zero.net> Date: Thu, 26 Jul 2012 10:25:21 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Qemu-devel] [Qemu-discuss] qemu-kvm: -netdev user: Parameter 'id' is missing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anatoly techtonik Cc: Mike Lovell , qemu-devel@nongnu.org On Thu, Jul 26, 2012 at 9:21 AM, anatoly techtonik wrote: > On Wed, Jul 25, 2012 at 6:00 PM, Stefan Hajnoczi wrote: >> On Tue, Jul 24, 2012 at 8:02 PM, anatoly techtonik wrote: >>> On Tue, Jul 24, 2012 at 1:23 PM, Stefan Hajnoczi wrote: >>>> On Mon, Jul 23, 2012 at 10:41 PM, anatoly techtonik wrote: >>>> A -netdev needs to be paired with a NIC -device. That's why the >>>> identifier is essential, it allows you to say -netdev >>>> ,id=netdev0 -device ,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