<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div><br>
</div>
<div>I think most hypervisors can assign MAC address dynamically on their own. I haven't used Xen so I am not sure about it, but KVM and VMware ESXi can auto-generate MAC addresses. Also, the VMware ESXi has a separate range for manually (non-ESXi) assigned
 MAC addresses [1] [2].</div>
<div><br>
</div>
<div>See: </div>
<div>1. <a href="http://kb.vmware.com/kb/507">http://kb.vmware.com/kb/507</a></div>
<div>2. <a href="http://libvirt.org/drvesx.html#macaddresses">http://libvirt.org/drvesx.html#macaddresses</a> </div>
<div><br>
</div>
<div><br>
</div>
<br>
<div>
<div>On Jan 17, 2012, at 10:50 AM, Javier Fontan wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div>I was not aware of kvm assigning MAC addresses. If that setup suits<br>
your needs then go for it, You should have no problem with it.<br>
<br>
On Tue, Jan 17, 2012 at 5:24 PM, Shantanu Pavgi <<a href="mailto:pavgi@uab.edu">pavgi@uab.edu</a>> wrote:<br>
<blockquote type="cite"><br>
</blockquote>
<blockquote type="cite">Thanks for the reply Javier.<br>
</blockquote>
<blockquote type="cite"><br>
</blockquote>
<blockquote type="cite">I was able to create a VM by specifying only network interface name in the NIC section. I left MAC address assignment over to the hypervisor (KVM) which assigns MAC address to a VM if it's not specified in the VM definition file. So
 in this case OpenNebula didn't have any knowledge of the MAC and IP address assigned to this VM. I am not sure whether this will impact OpenNebula's VM management functionality though. Any thoughts?<br>
</blockquote>
<blockquote type="cite"><br>
</blockquote>
<blockquote type="cite">Following is an example VM definition. OpenNebula version: 3.0.<br>
</blockquote>
<blockquote type="cite"><br>
</blockquote>
<blockquote type="cite">{{{<br>
</blockquote>
<blockquote type="cite"># Capacity section<br>
</blockquote>
<blockquote type="cite">NAME = ttylinux-01<br>
</blockquote>
<blockquote type="cite">MEMORY = 128<br>
</blockquote>
<blockquote type="cite">CPU = 1<br>
</blockquote>
<blockquote type="cite"><br>
</blockquote>
<blockquote type="cite"># OS and Boot section<br>
</blockquote>
<blockquote type="cite">OS = [<br>
</blockquote>
<blockquote type="cite"> ARCH = i686,<br>
</blockquote>
<blockquote type="cite"> BOOT = hd ]<br>
</blockquote>
<blockquote type="cite"><br>
</blockquote>
<blockquote type="cite">FEATURES = [ acpi = "no" ]<br>
</blockquote>
<blockquote type="cite"><br>
</blockquote>
<blockquote type="cite"># Graphics I/O<br>
</blockquote>
<blockquote type="cite">GRAPHICS = [<br>
</blockquote>
<blockquote type="cite"> TYPE = "vnc",<br>
</blockquote>
<blockquote type="cite"> PORT = "-1",<br>
</blockquote>
<blockquote type="cite"> keymap = "en-us" ]<br>
</blockquote>
<blockquote type="cite"><br>
</blockquote>
<blockquote type="cite"># Disk devices<br>
</blockquote>
<blockquote type="cite">DISK = [<br>
</blockquote>
<blockquote type="cite"> IMAGE_ID = "0" ]<br>
</blockquote>
<blockquote type="cite"><br>
</blockquote>
<blockquote type="cite"># Network interface<br>
</blockquote>
<blockquote type="cite">NIC = [<br>
</blockquote>
<blockquote type="cite">  BRIDGE = br0 ]<br>
</blockquote>
<blockquote type="cite">}}}<br>
</blockquote>
<blockquote type="cite"><br>
</blockquote>
<blockquote type="cite"><br>
</blockquote>
<blockquote type="cite">--<br>
</blockquote>
<blockquote type="cite">Shantanu<br>
</blockquote>
<blockquote type="cite"><br>
</blockquote>
<blockquote type="cite">On Jan 16, 2012, at 5:05 AM, Javier Fontan wrote:<br>
</blockquote>
<blockquote type="cite"><br>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">Hello,<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">Even if the VM's wont get the IP's form OpenNebula the MAC address<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">must be generated. Internally MAC addresses are tied to Virtual<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">Network leases so a place in a Virtual Network is needed. Just add a<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">class B or C network and everything should work ok.<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">You can also manually generate the mac addresses and you wont need the<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">Virtual Network, in VM template:<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">NIC=[MAC="00:02:01:23:45:67", IP="10.0.0.1", BRIDGE="br0"]<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">But this is more cumbersome as you will need to manually generate<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">different mac addresses for every interface.<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">Bye<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">On Mon, Jan 16, 2012 at 1:50 AM, Shantanu Pavgi <<a href="mailto:pavgi@uab.edu">pavgi@uab.edu</a>> wrote:<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">I am not following how OpenNebula handles network configuration for the VMs. I am trying to create a virtual network using network config file as follows:<br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">{{{<br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">NAME = "Test Network"<br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">TYPE = RANGED<br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">BRIDGE = br0<br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">PUBLIC=" yes"<br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">}}}<br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">In my test setup I have a DHCP server for IP address assignment. So I did not put NETWORK_ADDRESS and NETWORK_SIZE values, thinking OpenNebula doesn't need to know about it. However I got following error upon 'onvnet create' command.<br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">{{{<br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">[VirtualNetworkAllocate] Error allocating a new virtual network. No NETWORK_ADDRESS in template for Virtual Network.<br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">}}}<br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">I am not sure what values should I provide in a network definition file if IP address and MAC address assignment is not going to be handled by OpenNebula. How does OpenNebula use NETWORK_ADDRESS and NETWORK_SIZE values during VM deployment?<br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">--<br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">Thanks,<br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">Shantanu<br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">_______________________________________________<br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">Users mailing list<br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite"><a href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite"><a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">--<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">Javier Fontán Muiños<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">Project Engineer<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">OpenNebula - The Open Source Toolkit for Data Center Virtualization<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><a href="http://www.OpenNebula.org">www.OpenNebula.org</a> |
<a href="mailto:jfontan@opennebula.org">jfontan@opennebula.org</a> | @OpenNebula<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">_______________________________________________<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">Users mailing list<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><a href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
</blockquote>
</blockquote>
<blockquote type="cite"><br>
</blockquote>
<br>
<br>
<br>
-- <br>
Javier Fontán Muiños<br>
Project Engineer<br>
OpenNebula - The Open Source Toolkit for Data Center Virtualization<br>
<a href="http://www.OpenNebula.org">www.OpenNebula.org</a> | <a href="mailto:jfontan@opennebula.org">jfontan@opennebula.org</a> | @OpenNebula<br>
</div>
</blockquote>
</div>
<br>
</body>
</html>