From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=40954 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBYjM-0005f7-Me for qemu-devel@nongnu.org; Mon, 10 May 2010 15:33:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBYjL-0002Hb-1g for qemu-devel@nongnu.org; Mon, 10 May 2010 15:33:32 -0400 Received: from mail-qy0-f188.google.com ([209.85.221.188]:40014) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBYjK-0002HV-Ur for qemu-devel@nongnu.org; Mon, 10 May 2010 15:33:31 -0400 Received: by qyk26 with SMTP id 26so6406573qyk.19 for ; Mon, 10 May 2010 12:33:30 -0700 (PDT) Message-ID: <4BE85F87.1010000@codemonkey.ws> Date: Mon, 10 May 2010 14:33:27 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC] default mac address issue References: <4BE8050F02000048000952DA@sinclair.provo.novell.com> In-Reply-To: <4BE8050F02000048000952DA@sinclair.provo.novell.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bruce Rogers Cc: qemu-devel@nongnu.org Hi Bruce, On 05/10/2010 02:07 PM, Bruce Rogers wrote: > I know this behavior has worked this way all along, but I wanted to bring up the following concern and float a few ideas about possible solutions. Please provide your perspective, opinion, etc. > > qemu (or qemu-kvm) users can easily get into trouble when they don't specifying the mac address for their vm's nic and don't realize that multiple vm's running this way on the same network segment are colliding, since they all get a default mac address that is the same. They may be under the assumption that a random mac would be the default, as in many higher level tools for vm creation > This is certainly an important issue but it's one that's difficult to resolve. > Does it make sense to do any of the following: > > 1) have qemu print a warning to stdout/stderr that the default mac address is being used and that it will interfere with other vms running the same way on a common network segment > This is definitely reasonable. > 2) what about changing the default behavior to randomizing the mac, and provide the legacy behavior with "-net nic,macaddr=default" or just "-use-default-mac" > > (or, as a flip side to #2): > > 3) to at least make it easy for people to get around the problem, and just > use qem directly (without additional tools to launch qemu), add an option such as "-net nic,macaddr=randomize" or "-use-random-mac" which randomizes the mac for you > each time the machine is brought up, and hence avoids possible collisions. > A random mac address is almost always wrong. If you run a guest twice with this option, it's usually enough to trigger a new network detection which which rename the network device to ethN + 1. The result would be broken networking for naive users since distros don't bother configuring interfaces that weren't present during installation. Regards, Anthony Liguori > Of course having the same vm come up with a different mac each time is an issue for some guest os's, but for some usages, that is not a problem. > > I imagine the concensus would be that the current behavior is appropriate, and it's up to management tools to do the randomization, but I think there is perhaps a place for randomization within qemu itself. I'm interested to hear what you think. > > Bruce > > > >