<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
<!--
@font-face
{font-family:SimSun}
@font-face
{font-family:SimSun}
@font-face
{font-family:Calibri}
@font-face
{font-family:"Lucida Console"}
@font-face
{font-family:SimSun}
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif"}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{margin:0cm;
margin-bottom:.0001pt;
font-size:9.0pt;
font-family:SimSun}
span.EmailStyle17
{font-family:"Calibri","sans-serif";
color:#1F497D}
span.EmailStyle18
{font-family:"Calibri","sans-serif";
color:#1F497D}
span.EmailStyle19
{font-family:"Calibri","sans-serif";
color:#1F497D}
span.Char
{font-family:SimSun}
.MsoChpDefault
{font-size:10.0pt}
@page WordSection1
{margin:72.0pt 72.0pt 72.0pt 72.0pt}
div.WordSection1
{}
-->
</style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:11pt; color:black">I thought about this too, but then I have to keep multiple scripts for each template based on number of nics , instead of creating one script that walks through the nics
by Mac address<br>
<br>
Sent from my Android phone using TouchDown (www.nitrodesk.com)<br>
<br>
<span style="color:black">-----Original Message----- <br>
<b>From:</b> Sam Song [samsong8610@gmail.com]<br>
<b>Received:</b> Friday, 25 Oct 2013, 10:13pm<br>
<b>To:</b> users@lists.opennebula.org [users@lists.opennebula.org]<br>
<b>Subject:</b> [one-users] 答复: context mac address<br>
<br>
</span></span>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Hi,</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Could you use ETH0_IP and ETH1_IP to set correct IP to two NICs?</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">In my opinion, the NIC with ID 0 will be the NIC interface eth0 in the guest OS, and NIC with ID 1 will be eth1. So it is no need to bother MAC.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Sam</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<div>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="ZH-CN" style="font-size:10.0pt; font-family:SimSun">发件人</span></b><b><span style="font-size:10.0pt; font-family:SimSun">:</span></b><span style="font-size:10.0pt; font-family:SimSun"> users-bounces@lists.opennebula.org [mailto:users-bounces@lists.opennebula.org]
<b><span lang="ZH-CN">代表 </span></b>Michael Curran<br>
<b><span lang="ZH-CN">发送时间</span>:</b> 2013<span lang="ZH-CN">年</span>10<span lang="ZH-CN">月</span>26<span lang="ZH-CN">日</span> 2:41<br>
<b><span lang="ZH-CN">收件人</span>:</b> Michael Curran; Carlos Mart<span lang="ZH-CN">í</span>n S<span lang="ZH-CN">á</span>nchez<br>
<b><span lang="ZH-CN">抄送</span>:</b> users<br>
<b><span lang="ZH-CN">主题</span>:</b> Re: [one-users] context mac address</span></p>
</div>
</div>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Just to make sure I am clear on what I am looking for , this is the set of fields in the onevm show <vmid></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal" style="text-autospace:none"><b><span style="font-size:14.0pt; font-family:"Lucida Console"">VM NICS</span></b></p>
<p class="MsoNormal" style="text-autospace:none"><b><u><span style="font-size:14.0pt; font-family:"Lucida Console"">ID NETWORK VLAN BRIDGE IP MAC</span></u></b></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt; font-family:"Lucida Console""> 0 private1_10.7.0.0 yes private_1 10.7.3.248 02:00:0a:07:03:f8</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt; font-family:"Lucida Console""> fe80::400:aff:fe07:3f8</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt; font-family:"Lucida Console""> 1 private1_10.7.0.0 yes private_1 10.7.3.249 02:00:0a:07:03:f9</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt; font-family:"Lucida Console""> fe80::400:aff:fe07:3f9</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">I want to create my own context variable that references ETH0_MAC – the mac address in the last colume</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">I have tried Carlos’ suggestion below and also these now</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:14.0pt; font-family:"Lucida Console"">ETH0_MAC="$NIC[MAC,ID=\"0\"]"</span><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"></span></p>
<p class="MsoNormal"><span style="font-size:14.0pt; font-family:"Lucida Console"">ETH0_MAC="$VMNIC[MAC,ID=\"0\"]"</span></p>
<p class="MsoNormal"><span style="font-size:14.0pt; font-family:"Lucida Console"">ETH0_MAC="$VM_NIC[MAC,ID=\"0\"]"</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">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
</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">What is the correct variable pattern to use – is there a comprehensive list of these variables listed somewhere?
</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Michael Curran | connectsolutions | Lead Network Architect</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Phone 614.568.2285 | Mobile 614.403.6320 |
<a href="http://www.connectsolutions.com"><span style="color:#0563C1">www.connectsolutions.com</span></a></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"">From:</span></b><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"">
<a href="mailto:users-bounces@lists.opennebula.org">users-bounces@lists.opennebula.org</a> [<a href="mailto:users-bounces@lists.opennebula.org">mailto:users-bounces@lists.opennebula.org</a>]
<b>On Behalf Of </b>Michael Curran<br>
<b>Sent:</b> Friday, October 25, 2013 1:26 PM<br>
<b>To:</b> Carlos Martín Sánchez<br>
<b>Cc:</b> users<br>
<b>Subject:</b> Re: [one-users] context mac address</span></p>
</div>
</div>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">I tried that as you wrote it and I have tried a few of my own variables that did not work either.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">I would love to see a comprehensive list of variables to use, and I’m just not finding one.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">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 ??</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Michael Curran | connectsolutions | Lead Network Architect</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Phone 614.568.2285 | Mobile 614.403.6320 |
<a href="http://www.connectsolutions.com"><span style="color:#0563C1">www.connectsolutions.com</span></a></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"">From:</span></b><span style="font-size:11.0pt; font-family:"Calibri","sans-serif""> Carlos Martín Sánchez [<a href="mailto:cmartin@opennebula.org">mailto:cmartin@opennebula.org</a>]
<br>
<b>Sent:</b> Friday, October 25, 2013 12:53 PM<br>
<b>To:</b> Michael Curran<br>
<b>Cc:</b> users<br>
<b>Subject:</b> Re: [one-users] context mac address</span></p>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal">Hi,</p>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">Do you mean like this?</p>
</div>
<div>
<p class="MsoNormal">ETH0_NIC = "$NIC[MAC, NETWORK_ID=\"0\"]"</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">The contextualization variables syntax is explained here [1].</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">Regards</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">[1] <a href="http://opennebula.org/documentation:rel4.2:cong">http://opennebula.org/documentation:rel4.2:cong</a></p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<div>
<div>
<p class="MsoNormal">--</p>
<div>
<p class="MsoNormal">Carlos Martín, MSc<br>
Project Engineer</p>
</div>
<div>
<p class="MsoNormal">OpenNebula - Flexible Enterprise Cloud Made Simple</p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#888888"><a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> |
<a href="mailto:cmartin@opennebula.org" target="_blank">cmartin@opennebula.org</a> |
<a href="http://twitter.com/opennebula" target="_blank">@OpenNebula</a></span></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"> </p>
<div>
<p class="MsoNormal">On Fri, Oct 25, 2013 at 6:42 PM, Michael Curran <<a href="mailto:michael.curran@connectsolutions.com" target="_blank">michael.curran@connectsolutions.com</a>> wrote:</p>
<blockquote style="border:none; border-left:solid #CCCCCC 1.0pt; padding:0cm 0cm 0cm 6.0pt; margin-left:4.8pt; margin-top:5.0pt; margin-right:0cm; margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="">I’m working on contextualizing a windows VM with multiple NIC’s during VM creation</p>
<p class="MsoNormal" style=""> </p>
<p class="MsoNormal" style="">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.</p>
<p class="MsoNormal" style=""> </p>
<p class="MsoNormal" style="">Michael Curran | connectsolutions | Lead Network Architect</p>
<p class="MsoNormal" style="">Phone <a href="tel:614.568.2285" target="_blank">614.568.2285</a> | Mobile
<a href="tel:614.403.6320" target="_blank">614.403.6320</a> | <a href="http://www.connectsolutions.com" target="_blank">
<span style="color:#0563C1">www.connectsolutions.com</span></a></p>
<p class="MsoNormal" style=""> </p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a></p>
</blockquote>
</div>
<p class="MsoNormal"> </p>
</div>
</div>
</div>
</div>
</body>
</html>