I'm glad we found it. I went ahead and opened a ticket in redmine to add the mac automatically: http://dev.opennebula.org/issues/2413
Regards -- Carlos Martín, MSc Project Engineer OpenNebula - Flexible Enterprise Cloud Made Simple www.OpenNebula.org | cmar...@opennebula.org | @OpenNebula<http://twitter.com/opennebula><cmar...@opennebula.org> On Mon, Oct 28, 2013 at 3:17 PM, Michael Curran < michael.cur...@connectsolutions.com> wrote: > Thanks Carlos!!! The --all is what I really needed...missed that in the > readings, just dirty sightedness on my part! > > > > > Sent from my Android phone using TouchDown (www.nitrodesk.com) > > -----Original Message----- > *From:* Carlos Martín Sánchez [cmar...@opennebula.org] > *Received:* Monday, 28 Oct 2013, 8:24am > *To:* Michael Curran [michael.cur...@connectsolutions.com] > *CC:* users [users@lists.opennebula.org] > *Subject:* Re: [one-users] context mac address > > Hi, > > On Fri, Oct 25, 2013 at 8:40 PM, Michael Curran < > michael.cur...@connectsolutions.com> wrote: > >> I have tried Carlos’ suggestion below and also these now >> >> ETH0_MAC="$NIC[MAC,ID=\"0\"]" >> ETH0_MAC="$VMNIC[MAC,ID=\"0\"]" >> ETH0_MAC="$VM_NIC[MAC,ID=\"0\"]" >> >> With no such luck in finding the MAC so I can do MAC matching to assign >> IP’s across multiple NICs based on that MAC > > > The example I gave in my first email is working for me. > > For this template: > > CPU="0.1" > MEMORY="128" > NIC=[ > NETWORK_ID="0" ] > CONTEXT=[ > ETH0_MAC="$NIC[MAC, NETWORK_ID=\"0\"]", > NETWORK="yes" ] > > I get this VM: > > [...] > CONTEXT=[ > DISK_ID="0", > ETH0_DNS="192.168.0.1", > ETH0_GATEWAY="192.168.0.1", > ETH0_IP="192.168.0.3", > ETH0_MAC="02:00:c0:a8:00:03", > ETH0_MASK="255.255.255.0", > ETH0_NETWORK="192.168.0.0", > NETWORK="yes", > TARGET="hda" ] > > > The contextualization variables syntax is explained here [1]. >> > [1] http://opennebula.org/documentation:rel4.2:cong >> That page is explanatory on how to put them together, but not how to >> obtain what is available – maybe MAC isn’t available with $NIC ?? > > > > What is the correct variable pattern to use – is there a comprehensive >> list of these variables listed somewhere? > > > No, we don't have a complete list of variables, because you can use any > attribute. To see all your available attributes, instantiate a VM, and use > the --all or -x options of onevm show. > > For example, I get this output for the previous VM: > > $ onevm show 1 --all > [...] > VM NICS > > ID NETWORK VLAN BRIDGE IP MAC > > 0 ranged no virbr0 192.168.0.3 > 02:00:c0:a8:00:03 > fe80::400:c0ff:fea8:3 > > VIRTUAL MACHINE TEMPLATE > [...] > NIC=[ > BRIDGE="virbr0", > IP="192.168.0.3", > IP6_LINK="fe80::400:c0ff:fea8:3", > MAC="02:00:c0:a8:00:03", > NETWORK="ranged", > NETWORK_ID="0", > NIC_ID="0", > VLAN="NO" ] > > This means that I can use any of the following expressions inside the > CONTEXT section: > ETH0_IPV6="$NIC[IP6_LINK, NIC_ID=\"0\"]", > ETH0_MAC="$NIC[MAC, NETWORK=\"ranged\"]", > ETH0_NETWORK_NAME="$NIC[NETWORK, BRIDGE=\"virbr0\"]" > > > > But instead of doing this, maybe we should add the ETHx_MAC attribute > with the rest of the network contextualization, when the > CONTEXT/NETWORK=YES attribute is found. This could be easily added to the > next release. > > Regards > -- > Carlos Martín, MSc > Project Engineer > OpenNebula - Flexible Enterprise Cloud Made Simple > www.OpenNebula.org | cmar...@opennebula.org | > @OpenNebula<http://twitter.com/opennebula><cmar...@opennebula.org> > > > On Fri, Oct 25, 2013 at 8:40 PM, Michael Curran < > michael.cur...@connectsolutions.com> wrote: > >> Just to make sure I am clear on what I am looking for , this is the set >> of fields in the onevm show <vmid>**** >> >> ** ** >> >> *VM NICS* >> >> *ID NETWORK VLAN BRIDGE IP MAC* >> >> 0 private1_10.7.0.0 yes private_1 10.7.3.248 >> 02:00:0a:07:03:f8**** >> >> fe80::400:aff:fe07:3f8**** >> >> 1 private1_10.7.0.0 yes private_1 10.7.3.249 >> 02:00:0a:07:03:f9**** >> >> fe80::400:aff:fe07:3f9**** >> >> ** ** >> >> ** ** >> >> I want to create my own context variable that references ETH0_MAC – the >> mac address in the last colume**** >> >> ** ** >> >> I have tried Carlos’ suggestion below and also these now**** >> >> ** ** >> >> ETH0_MAC="$NIC[MAC,ID=\"0\"]"**** >> >> ETH0_MAC="$VMNIC[MAC,ID=\"0\"]"**** >> >> ETH0_MAC="$VM_NIC[MAC,ID=\"0\"]"**** >> >> ** ** >> >> With no such luck in finding the MAC so I can do MAC matching to assign >> IP’s across multiple NICs based on that MAC **** >> >> ** ** >> >> What is the correct variable pattern to use – is there a comprehensive >> list of these variables listed somewhere? **** >> >> ** ** >> >> Michael Curran | connectsolutions | Lead Network Architect**** >> >> Phone 614.568.2285 | Mobile 614.403.6320 | www.connectsolutions.com**** >> >> ** ** >> >> *From:* users-boun...@lists.opennebula.org [mailto: >> users-boun...@lists.opennebula.org] *On Behalf Of *Michael Curran >> *Sent:* Friday, October 25, 2013 1:26 PM >> *To:* Carlos Martín Sánchez >> >> *Cc:* users >> *Subject:* Re: [one-users] context mac address**** >> >> ** ** >> >> I tried that as you wrote it and I have tried a few of my own variables >> that did not work either.**** >> >> **** >> >> I would love to see a comprehensive list of variables to use, and I’m >> just not finding one.**** >> >> **** >> >> That page is explanatory on how to put them together, but not how to >> obtain what is available – maybe MAC isn’t available with $NIC ??**** >> >> **** >> >> Michael Curran | connectsolutions | Lead Network Architect**** >> >> Phone 614.568.2285 | Mobile 614.403.6320 | www.connectsolutions.com**** >> >> **** >> >> *From:* Carlos Martín Sánchez >> [mailto:cmar...@opennebula.org<cmar...@opennebula.org>] >> >> *Sent:* Friday, October 25, 2013 12:53 PM >> *To:* Michael Curran >> *Cc:* users >> *Subject:* Re: [one-users] context mac address**** >> >> **** >> >> Hi,**** >> >> **** >> >> Do you mean like this?**** >> >> ETH0_NIC = "$NIC[MAC, NETWORK_ID=\"0\"]"**** >> >> **** >> >> The contextualization variables syntax is explained here [1].**** >> >> **** >> >> Regards**** >> >> **** >> >> [1] http://opennebula.org/documentation:rel4.2:cong**** >> >> **** >> >> --**** >> >> Carlos Martín, MSc >> Project Engineer**** >> >> OpenNebula - Flexible Enterprise Cloud Made Simple**** >> >> www.OpenNebula.org | cmar...@opennebula.org | >> @OpenNebula<http://twitter.com/opennebula> >> **** >> >> **** >> >> On Fri, Oct 25, 2013 at 6:42 PM, Michael Curran < >> michael.cur...@connectsolutions.com> wrote:**** >> >> I’m working on contextualizing a windows VM with multiple NIC’s during >> VM creation**** >> >> **** >> >> Does anyone know the correct Variable for the MAC by network ID number? I >> just want to add it to context settings in the VM Template so it picks it >> up everytime.**** >> >> **** >> >> Michael Curran | connectsolutions | Lead Network Architect**** >> >> Phone 614.568.2285 | Mobile 614.403.6320 | www.connectsolutions.com**** >> >> **** >> >> >> _______________________________________________ >> Users mailing list >> Users@lists.opennebula.org >> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org**** >> >> **** >> > >
_______________________________________________ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org