From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: [PATCH]: xl: use libuuid to generate random UUID's Date: Tue, 10 Aug 2010 12:38:09 -0700 Message-ID: <4C61AAA1.5000600@goop.org> References: <1280944162.18490.219.camel@qabil.uk.xensource.com> <4FA716B1526C7C4DB0375C6DADBC4EA37AD0596B2F@LONPMAILBOX01.citrite.net> <4C5A21A3.3020601@goop.org> <1281437086.24292.3882.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1281437086.24292.3882.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell Cc: Ian Pratt , Xen Devel , Ian Jackson , "Gianni Tedesco (3P)" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On 08/10/2010 03:44 AM, Ian Campbell wrote: > On Thu, 2010-08-05 at 03:27 +0100, Jeremy Fitzhardinge wrote: >> On 08/04/2010 07:19 PM, Ian Pratt wrote: >>> The best approach is to generate locally administered MAC addresses >> hence giving us 46 bits of freedom rather than XenSource registered >> OUI addresses which have just 24 bits -- collisions will be *much* >> less likely. Further, it's best not to generate random addresses every >> time, but to derive the MAC address from a good hash of the VM UUID >> and the NIC number so that they are deterministic. >> >> Yes! I've been doing that manually (where my hash is '+'), but its >> irritating to keep doing over and over. > Where I care about a stable MAC I use > vif = [ 'mac=xx:xx:xx:xx:xx:xx' ] > in my domain config file. AFAICT that is the only 100% reliable way to > get a stable MAC address since the other schemes all have some corner > case or other... I always manually set a uuid in the domain (well, uuid-gen), and I'd like the mac to be derived from that. J