<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
<!--
@font-face
        {font-family:Wingdings}
@font-face
        {font-family:Wingdings}
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Tahoma}
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:8.0pt;
        font-family:"Tahoma","sans-serif"}
span.hoenzb
        {}
span.EmailStyle18
        {font-family:"Calibri","sans-serif";
        color:#1F497D}
span.BalloonTextChar
        {font-family:"Tahoma","sans-serif"}
.MsoChpDefault
        {font-family:"Calibri","sans-serif"}
@page WordSection1
        {margin:72.0pt 72.0pt 72.0pt 72.0pt}
div.WordSection1
        {}
-->
</style>
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">I think I found the issue.</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">The /etc/init.d/vmcontext script contains these lines:</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">if [ -e "/dev/disk/by-label/CONTEXT" ]; then</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">    mount -t iso9660 -L CONTEXT -o ro /mnt</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 changed these to:</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">if [ -e "/dev/disk/by-label/CDROM" ]; then</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">    mount -t iso9660 -L CDROM -o ro /mnt</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">..after investigating the /dev/disk/by-label directory, and seeing that the context emulated CD had that label. It seems to work now, but I have one more
 issue – I need serach domains to be included in the resolv.conf. I have defined them in the virtual network template, but they don’t seem to be making it into the resolv.conf on boot. I guess I can work this out by poring over the context scripts some more…
</span><span style="font-size:11.0pt; font-family:Wingdings; color:#1F497D">J</span><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">Please let me know if there’s anywhere I should be looking…</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">Thanks</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">Jerry</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"><b><span lang="EN-US" style="font-size:10.0pt; font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt; font-family:"Tahoma","sans-serif""> Nistor Andrei [mailto:coder.tux@gmail.com]
<br>
<b>Sent:</b> 24 September 2013 15:29<br>
<b>To:</b> steele, jerry<br>
<b>Subject:</b> Re: [one-users] Incorrect netmask on virtual machines</span></p>
<p class="MsoNormal"> </p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">This happened to me when I imported a CentOS image from the marketplace. It had one-context 3.8 installed, but I was running opennebula 4.2.
</p>
</div>
<p class="MsoNormal">It seems there's a difference in the way network context variables were passed between those versions, so updating one-context in the VM might fix it for you.</p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"> </p>
<div>
<p class="MsoNormal">On Tue, Sep 24, 2013 at 5:07 PM, steele, jerry <<a href="mailto:Jerry.Steele@cgg.com" target="_blank">Jerry.Steele@cgg.com</a>> wrote:</p>
<p class="MsoNormal">...in fact, some further investigation shows that the network context variables don't' seem to be getting passed by to the 00-network script, meaning that it's just putting the defaults in there, rather than the variables I've specified
 (so, e.g. for the gateway, take the first three quads of the network address, and put a ".1" after it, or the default netmask is "255.255.255.0").<br>
<br>
Anyone know why *this* might be happening?<br>
<br>
Thanks<br>
<span style="color:#888888"><br>
<span class="hoenzb">Jerry</span></span></p>
<div>
<div>
<p class="MsoNormal"><br>
<br>
-----Original Message-----<br>
From: <a href="mailto:users-bounces@lists.opennebula.org">users-bounces@lists.opennebula.org</a> [mailto:<a href="mailto:users-bounces@lists.opennebula.org">users-bounces@lists.opennebula.org</a>] On Behalf Of steele, jerry<br>
Sent: 24 September 2013 12:47<br>
To: <a href="mailto:users@lists.opennebula.org">users@lists.opennebula.org</a><br>
Subject: Re: [one-users] Incorrect netmask on virtual machines<br>
<br>
Hi Javier,<br>
<br>
The output of "onevm show <network id>" does give the correct information, however, I have noticed that in the CONTEXT=[] statement, I have the variable ETH0_NETWORK set to "10.54.136.0", and looking at the context script in the (Debian) VM - /etc/one-context.d/00-network
 - it seems to take that and use it to generate netmask and default gateway from the VM, thus ending up with the both an incorrect netmask, and an incorrect gateway.<br>
<br>
Why would this be happening?<br>
<br>
Thanks<br>
<br>
Jerry<br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:users-bounces@lists.opennebula.org">users-bounces@lists.opennebula.org</a> [mailto:<a href="mailto:users-bounces@lists.opennebula.org">users-bounces@lists.opennebula.org</a>] On Behalf Of Javier Fontan<br>
Sent: 24 September 2013 10:40<br>
To: steele, jerry<br>
Cc: <a href="mailto:users@lists.opennebula.org">users@lists.opennebula.org</a><br>
Subject: Re: [one-users] Incorrect netmask on virtual machines<br>
<br>
Are you getting correct data in your deployed VM? That is, that in the output of "onevm show <vmid>" the context section has the values it is supposed to have.<br>
<br>
On Thu, Sep 19, 2013 at 3:26 PM, steele, jerry <<a href="mailto:Jerry.Steele@cgg.com">Jerry.Steele@cgg.com</a>> wrote:<br>
> Hi Javier,<br>
><br>
> Thanks for your reply. Unfortunately, I'm on version 4.0.1 due to OS<br>
> restrictions, I guess the Sunstone interface gets a bit better as time<br>
> goes on :)<br>
><br>
> Hello, I have this network context in the template:<br>
>>>><br>
> ETH0_DNS        $NETWORK[DNS,NETWORK_ID="3"]<br>
> SSH_PUBLIC_KEY  $USER[SSH_PUBLIC_KEY]<br>
> ETH0_IP         $NIC[IP,NETWORK_ID="3"]<br>
> ETH0_IPV6       $NIC[IP6_GLOBAL,NETWORK_ID="3"]<br>
> ETH0_GATEWAY    $NETWORK[GATEWAY,NETWORK_ID="3"]<br>
> ETH0_NETWORK    $NETWORK[NETWORK_ADDRESS,NETWORK_ID="3"]<br>
> ETH0_GATEWAY6   $NETWORK[GATEWAY6,NETWORK_ID="3"]<br>
> ETH0_CONTEXT_FORCE_IPV4         $NETWORK[CONTEXT_FORCE_IPV4,NETWORK_ID="3"]<br>
> ETH0_MASK       $NETWORK[NETWORK_MASK,NETWORK_ID="3"]<br>
> <<<<br>
> So I guess it would be wise to also show the virtual network description:<br>
>>>><br>
> VIRTUAL NETWORK 3 INFORMATION<br>
> ID             : 3<br>
> NAME           : VLAN 44 Bridge<br>
> USER           : oneadmin<br>
> GROUP          : oneadmin<br>
> CLUSTER        : -<br>
> TYPE           : FIXED<br>
> BRIDGE         : br0<br>
> VLAN           : No<br>
> USED LEASES    : 2<br>
><br>
> PERMISSIONS<br>
> OWNER          : um-<br>
> GROUP          : ---<br>
> OTHER          : ---<br>
><br>
> VIRTUAL NETWORK TEMPLATE<br>
> DNS="10.54.128.235,10.50.16.235,10.50.16.231"<br>
> GATEWAY="10.54.143.254"<br>
> NETWORK_MASK="255.255.248.0"<br>
><br>
> USED LEASES<br>
> LEASE=[ MAC="02:00:0a:36:88:98", IP="10.54.136.152",<br>
> IP6_LINK="fe80::400:aff:fe36:8898", USED="1", VID="23" ] LEASE=[<br>
> MAC="02:00:0a:36:88:99", IP="10.54.136.153",<br>
> IP6_LINK="fe80::400:aff:fe36:8899", USED="1", VID="24" ]<br>
><br>
> FREE LEASES<br>
> LEASE=[ MAC="02:00:0a:36:88:96", IP="10.54.136.150",<br>
> IP6_LINK="fe80::400:aff:fe36:8896", USED="0", VID="-1" ] LEASE=[<br>
> MAC="02:00:0a:36:88:97", IP="10.54.136.151",<br>
> IP6_LINK="fe80::400:aff:fe36:8897", USED="0", VID="-1" ] LEASE=[<br>
> MAC="02:00:0a:36:88:9a", IP="10.54.136.154",<br>
> IP6_LINK="fe80::400:aff:fe36:889a", USED="0", VID="-1" ] LEASE=[<br>
> MAC="02:00:0a:36:88:9b", IP="10.54.136.155",<br>
> IP6_LINK="fe80::400:aff:fe36:889b", USED="0", VID="-1" ] LEASE=[<br>
> MAC="02:00:0a:36:88:9c", IP="10.54.136.156",<br>
> IP6_LINK="fe80::400:aff:fe36:889c", USED="0", VID="-1" ] LEASE=[<br>
> MAC="02:00:0a:36:88:9d", IP="10.54.136.157",<br>
> IP6_LINK="fe80::400:aff:fe36:889d", USED="0", VID="-1" ] <<<<br>
><br>
> The leases are set so that the VMs may only use a few addresses, as this is on our LAN, and only a few IPs are available, not the entire range.<br>
><br>
> There's probably some mistakes there in the config somewhere, but not sure where they are.<br>
><br>
> Thanks<br>
><br>
> Jerry<br>
><br>
><br>
> -----Original Message-----<br>
> From: Javier Fontan [mailto:<a href="mailto:jfontan@opennebula.org">jfontan@opennebula.org</a>]<br>
> Sent: 19 September 2013 13:56<br>
> To: steele, jerry<br>
> Cc: <a href="mailto:users@lists.opennebula.org">users@lists.opennebula.org</a><br>
> Subject: Re: [one-users] Incorrect netmask on virtual machines<br>
><br>
> I suppose you already have contextualization package installed in you VM as you are getting the correct IP.<br>
><br>
> The problem most probably comes because the VM (template) does not<br>
> have a CONTEXT section with network information. If you are using<br>
> Sunstone and OpenNebula 4.2 you can add that information checking<br>
> Context->Add network contextualization in the template creation<br>
> wizzard.<br>
><br>
> On Tue, Sep 17, 2013 at 11:10 AM, steele, jerry <<a href="mailto:Jerry.Steele@cgg.com">Jerry.Steele@cgg.com</a>> wrote:<br>
>> Hello,<br>
>><br>
>><br>
>><br>
>> I'm fairly new to Opennebula - I've just set up my first trio of test<br>
>> machines.<br>
>><br>
>><br>
>><br>
>> I'd like the VMs to appear on my LAN, and as such have set up a<br>
>> virtual network to dole out a pool of addresses to any VMs that I create.<br>
>><br>
>><br>
>><br>
>> I've set a netmask of 255.255.248.0 in the virtual network template,<br>
>> however, when the VMs get created, their NICs are configured with a<br>
>> netmask of 255.255.255.0. I can ping other machines on my network<br>
>> withink that range of IPs - so I know the VMs are on the network -<br>
>> but that doesn't really help me much.<br>
>><br>
>><br>
>><br>
>> I think it's something to do with contextualisation, or maybe the<br>
>> network config on the host system, but my lack of experience has me<br>
>> at a disadvantage here, I'm afraid.<br>
>><br>
>><br>
>><br>
>> Rather than reproduce lots of console output here, could anyone who<br>
>> wants to know more for troubleshooting purposes, please let me know what to provide?<br>
>><br>
>><br>
>><br>
>> Many Thanks<br>
>><br>
>><br>
>><br>
>> _____ ______ ______<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> Jerry Steele<br>
>><br>
>> IT Support Specialist<br>
>><br>
>> Subsurface Imaging<br>
>><br>
>><br>
>><br>
>> CGGVeritas Services (UK) Ltd<br>
>><br>
>> Crompton Way<br>
>><br>
>> Crawley<br>
>><br>
>> W Sussex<br>
>><br>
>> RH10 9QN<br>
>><br>
>><br>
>><br>
>> T              <a href="tel:%2B44%20%280%291293%20683264">+44 (0)1293 683264</a> (Internal: 233264)<br>
>><br>
>> M             <a href="tel:%2B44%20%280%297920%20237105">+44 (0)7920 237105</a><br>
>><br>
>><br>
>><br>
>> <a href="http://www.cgg.com" target="_blank">www.cgg.com</a><br>
>><br>
>><br>
>><br>
>> This email and any accompanying attachments are confidential. The<br>
>> information is intended solely for the use of the individual to whom<br>
>> it is addressed.<br>
>> Any review,<br>
>> disclosure, copying, distribution, or use of the email by others is<br>
>> strictly prohibited.<br>
>><br>
>><br>
>><br>
>><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><br>
>><br>
><br>
><br>
><br>
> --<br>
> Join us at OpenNebulaConf2013 in Berlin from the 24th to the 26th of September 2013!<br>
><br>
> Javier Fontán Muiños<br>
> Developer<br>
> OpenNebula - The Open Source Toolkit for Data Center Virtualization<br>
> <a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | @OpenNebula |
<a href="http://github.com/jfontan" target="_blank">github.com/jfontan</a><br>
><br>
> This email and any accompanying attachments are confidential. If you<br>
> received this email by mistake, please delete it from your system. Any review, disclosure, copying, distribution, or use of the email by others is strictly prohibited.<br>
><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><br>
<br>
<br>
<br>
--<br>
Join us at OpenNebulaConf2013 in Berlin from the 24th to the 26th of September 2013!<br>
<br>
Javier Fontán Muiños<br>
Developer<br>
OpenNebula - The Open Source Toolkit for Data Center Virtualization <a href="http://www.OpenNebula.org" target="_blank">
www.OpenNebula.org</a> | @OpenNebula | <a href="http://github.com/jfontan" target="_blank">
github.com/jfontan</a> _______________________________________________<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><br>
<br>
This email and any accompanying attachments are confidential. If you received this email by mistake, please delete it from your system. Any review, disclosure, copying, distribution, or use of the email by others is strictly prohibited.<br>
<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><br>
<br>
This email and any accompanying attachments are confidential. If you received this email by mistake, please delete<br>
it from your system. Any review, disclosure, copying, distribution, or use of the email by others is strictly prohibited.<br>
<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>
</div>
</div>
</div>
<p class="MsoNormal"> </p>
</div>
</div>
<p class="MsoNormal"><i><span lang="EN-GB" style="font-size:7.0pt; font-family:"Arial","sans-serif"; color:#6A737B">This email and any accompanying attachments are confidential. If you received this email by mistake, please delete<br>
it from your system. Any review, disclosure, copying, distribution, or use of the email by others is strictly prohibited.</span></i></p>
</body>
</html>