qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option


From: Anthony Liguori
Subject: Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option
Date: Tue, 13 Oct 2009 15:43:15 -0500
User-agent: Thunderbird 2.0.0.23 (X11/20090825)


I still don't like the concept though.  Configuring a second nic would
be different from configuring the first nic, because for the first
you'll modify the default device, the second is added instead.
libvirt folks will hate us for doing this.

Having to use -set for configuring the first device of a kind, and
-device for the second is a bad user interface.  It's made worse by the
fact that you need -set only for some kinds of devices, namely the kinds
where QEMU provides a default.

The guest already has a nic, if you want to modify an existing nic, then you use -set. If you want to add a second nic, you use -device. This isn't two difference behaviors.

I agree with Gerd that we should distinguish between required and
optional devices.  It's fine to require -set for modifying required
devices like RTC.  But when I configure my first and second NIC, I don't
really want to know that I'm actually modifying the first NIC and adding
the second NIC.

I think what you're arguing for is a truly bare bones machine type where there are no assumptions about having a first nic.

But let's look at this from a much higher level. What is a user typically going to want to do? They're probably going to want to change the networking settings globally. They'll either want to always use tap and use the default network device or they're going to want to always have two nics because they have to physical devices with separate networks.

A user would either create a new machine type to use for all of their machines, or they would modify a global host config to change from slirp to tap. It shouldn't be the common case that they are manually specifying -device command line options. -device is pretty obtuse and really is an expert option for things like libvirt and as a placeholder for a proper config.

What about this: give the user a default FOO (for FOO in serial, NIC,
...) if he didn't configure one (no matter how, be it -device or some
legacy option to ask for FOOs).  This way, you ask for your first FOO
exactly like any other: -device.

You cannot express the concept "give a user FOO if they didn't ask for one" in a machine config file. That forces machine information to be baked into qemu which would be unfortunate. It suggests that you need another mechanism to configure what the type of these defaults are.

Regards,

Anthony Liguori




reply via email to

[Prev in Thread] Current Thread [Next in Thread]