From owner-freebsd-virtualization@FreeBSD.ORG Sat May 16 19:02:04 2015 Return-Path: Delivered-To: virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1DE6837A for ; Sat, 16 May 2015 19:02:04 +0000 (UTC) Received: from alto.onthenet.com.au (alto2.onthenet.com.au [203.13.68.14]) by mx1.freebsd.org (Postfix) with ESMTP id D10D617B6 for ; Sat, 16 May 2015 19:02:03 +0000 (UTC) Received: from iredmail.onthenet.com.au (iredmail.onthenet.com.au [203.13.68.150]) by alto.onthenet.com.au (Postfix) with ESMTP id 7AC5D1271D for ; Sun, 17 May 2015 05:01:56 +1000 (EST) Received: from localhost (iredmail.onthenet.com.au [127.0.0.1]) by iredmail.onthenet.com.au (Postfix) with ESMTP id 74E6C2810BA for ; Sun, 17 May 2015 05:01:56 +1000 (EST) X-Amavis-Modified: Mail body modified (using disclaimer) - iredmail.onthenet.com.au X-Virus-Scanned: amavisd-new at iredmail.onthenet.com.au Received: from iredmail.onthenet.com.au ([127.0.0.1]) by localhost (iredmail.onthenet.com.au [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pkk-4em7F1Kh for ; Sun, 17 May 2015 05:01:56 +1000 (EST) Received: from Peters-MacBook-Pro.local (c-67-180-92-13.hsd1.ca.comcast.net [67.180.92.13]) by iredmail.onthenet.com.au (Postfix) with ESMTPSA id B49B6280F62; Sun, 17 May 2015 05:01:54 +1000 (EST) Message-ID: <5557941F.9040608@freebsd.org> Date: Sat, 16 May 2015 12:01:51 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Allan Jude CC: virtualization@freebsd.org Subject: Re: bhyve code question, pci_virtio_net.c References: <55577814.6040202@freebsd.org> In-Reply-To: <55577814.6040202@freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 May 2015 19:02:04 -0000 Hi Allan, > 1) According to the comment, the mac address should be based on the md5 > of the DEVICE name, not the VM name. Which is correct? Which is more > desirable? The comment may not be specific enough - dev name meant /dev/vmm/, which is the same as the VM name. > Would it make sense to include more unique information in this hash? > like the host's UUID or something, to prevent the chance of more than 1 > VM on the same LAN having the same MAC if they have the same VM Name? Yes: see the discussion at http://lists.freebsd.org/pipermail/freebsd-virtualization/2014-February/002187.html The issue was the changing the algorithm breaks existing Linux VMs which base configuration on MAC addresses. Using the host fixes one issue but creates another in that starting a VM on another host then gives a different MAC. However, there is always the option to set the MAC address manually if you feel there will be issues with collisions, using VMs on different hosts, etc. > 2) Should bhyve instead use the FreeBSD assigned OUI for these MAC > addresses? Yes, though switching to that would have had the same issue with breaking Linux guests. My rough plan to move forward with this is that any new non-virtio NIC emulation will get the FreeBSD OUI and perhaps a different default algorithm. virtio-net will continue to use the existing one, but maybe in the future a "legacy-mac" option will be required to use the old algorithm, and then it can be phased out. Yet another option is an auto-generated MAC is placed in a config file on first boot, ala VMWare. That could be the solution when config file work arrives. later, Peter.