[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-discuss] qemu-kvm: -netdev user: Parameter 'id' i
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [Qemu-discuss] qemu-kvm: -netdev user: Parameter 'id' is missing |
Date: |
Thu, 26 Jul 2012 10:25:21 +0100 |
On Thu, Jul 26, 2012 at 9:21 AM, anatoly techtonik <address@hidden> wrote:
> On Wed, Jul 25, 2012 at 6:00 PM, Stefan Hajnoczi <address@hidden> wrote:
>> On Tue, Jul 24, 2012 at 8:02 PM, anatoly techtonik <address@hidden> wrote:
>>> On Tue, Jul 24, 2012 at 1:23 PM, Stefan Hajnoczi <address@hidden> wrote:
>>>> On Mon, Jul 23, 2012 at 10:41 PM, anatoly techtonik <address@hidden> 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