I think I found the issue.
The /etc/init.d/vmcontext script contains these lines:
if [ -e "/dev/disk/by-label/CONTEXT" ]; then
mount -t iso9660 -L CONTEXT -o ro /mnt
..I changed these to:
if [ -e "/dev/disk/by-label/CDROM" ]; then
mount -t iso9660 -L CDROM -o ro /mnt
..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… ☺
Please let me know if there’s anywhere I should be looking…
Thanks
Jerry
From: Nistor Andrei [mailto:[email protected]]
Sent: 24 September 2013 15:29
To: steele, jerry
Subject: Re: [one-users] Incorrect netmask on virtual machines
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.
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.
On Tue, Sep 24, 2013 at 5:07 PM, steele, jerry
<[email protected]<mailto:[email protected]>> wrote:
...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").
Anyone know why *this* might be happening?
Thanks
Jerry
-----Original Message-----
From:
[email protected]<mailto:[email protected]>
[mailto:[email protected]<mailto:[email protected]>]
On Behalf Of steele, jerry
Sent: 24 September 2013 12:47
To: [email protected]<mailto:[email protected]>
Subject: Re: [one-users] Incorrect netmask on virtual machines
Hi Javier,
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.
Why would this be happening?
Thanks
Jerry
-----Original Message-----
From:
[email protected]<mailto:[email protected]>
[mailto:[email protected]<mailto:[email protected]>]
On Behalf Of Javier Fontan
Sent: 24 September 2013 10:40
To: steele, jerry
Cc: [email protected]<mailto:[email protected]>
Subject: Re: [one-users] Incorrect netmask on virtual machines
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.
On Thu, Sep 19, 2013 at 3:26 PM, steele, jerry
<[email protected]<mailto:[email protected]>> wrote:
> Hi Javier,
>
> Thanks for your reply. Unfortunately, I'm on version 4.0.1 due to OS
> restrictions, I guess the Sunstone interface gets a bit better as time
> goes on :)
>
> Hello, I have this network context in the template:
>>>>
> ETH0_DNS $NETWORK[DNS,NETWORK_ID="3"]
> SSH_PUBLIC_KEY $USER[SSH_PUBLIC_KEY]
> ETH0_IP $NIC[IP,NETWORK_ID="3"]
> ETH0_IPV6 $NIC[IP6_GLOBAL,NETWORK_ID="3"]
> ETH0_GATEWAY $NETWORK[GATEWAY,NETWORK_ID="3"]
> ETH0_NETWORK $NETWORK[NETWORK_ADDRESS,NETWORK_ID="3"]
> ETH0_GATEWAY6 $NETWORK[GATEWAY6,NETWORK_ID="3"]
> ETH0_CONTEXT_FORCE_IPV4 $NETWORK[CONTEXT_FORCE_IPV4,NETWORK_ID="3"]
> ETH0_MASK $NETWORK[NETWORK_MASK,NETWORK_ID="3"]
> <<<
> So I guess it would be wise to also show the virtual network description:
>>>>
> VIRTUAL NETWORK 3 INFORMATION
> ID : 3
> NAME : VLAN 44 Bridge
> USER : oneadmin
> GROUP : oneadmin
> CLUSTER : -
> TYPE : FIXED
> BRIDGE : br0
> VLAN : No
> USED LEASES : 2
>
> PERMISSIONS
> OWNER : um-
> GROUP : ---
> OTHER : ---
>
> VIRTUAL NETWORK TEMPLATE
> DNS="10.54.128.235,10.50.16.235,10.50.16.231"
> GATEWAY="10.54.143.254"
> NETWORK_MASK="255.255.248.0"
>
> USED LEASES
> LEASE=[ MAC="02:00:0a:36:88:98", IP="10.54.136.152",
> IP6_LINK="fe80::400:aff:fe36:8898", USED="1", VID="23" ] LEASE=[
> MAC="02:00:0a:36:88:99", IP="10.54.136.153",
> IP6_LINK="fe80::400:aff:fe36:8899", USED="1", VID="24" ]
>
> FREE LEASES
> LEASE=[ MAC="02:00:0a:36:88:96", IP="10.54.136.150",
> IP6_LINK="fe80::400:aff:fe36:8896", USED="0", VID="-1" ] LEASE=[
> MAC="02:00:0a:36:88:97", IP="10.54.136.151",
> IP6_LINK="fe80::400:aff:fe36:8897", USED="0", VID="-1" ] LEASE=[
> MAC="02:00:0a:36:88:9a", IP="10.54.136.154",
> IP6_LINK="fe80::400:aff:fe36:889a", USED="0", VID="-1" ] LEASE=[
> MAC="02:00:0a:36:88:9b", IP="10.54.136.155",
> IP6_LINK="fe80::400:aff:fe36:889b", USED="0", VID="-1" ] LEASE=[
> MAC="02:00:0a:36:88:9c", IP="10.54.136.156",
> IP6_LINK="fe80::400:aff:fe36:889c", USED="0", VID="-1" ] LEASE=[
> MAC="02:00:0a:36:88:9d", IP="10.54.136.157",
> IP6_LINK="fe80::400:aff:fe36:889d", USED="0", VID="-1" ] <<<
>
> 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.
>
> There's probably some mistakes there in the config somewhere, but not sure
> where they are.
>
> Thanks
>
> Jerry
>
>
> -----Original Message-----
> From: Javier Fontan
> [mailto:[email protected]<mailto:[email protected]>]
> Sent: 19 September 2013 13:56
> To: steele, jerry
> Cc: [email protected]<mailto:[email protected]>
> Subject: Re: [one-users] Incorrect netmask on virtual machines
>
> I suppose you already have contextualization package installed in you VM as
> you are getting the correct IP.
>
> The problem most probably comes because the VM (template) does not
> have a CONTEXT section with network information. If you are using
> Sunstone and OpenNebula 4.2 you can add that information checking
> Context->Add network contextualization in the template creation
> wizzard.
>
> On Tue, Sep 17, 2013 at 11:10 AM, steele, jerry
> <[email protected]<mailto:[email protected]>> wrote:
>> Hello,
>>
>>
>>
>> I'm fairly new to Opennebula - I've just set up my first trio of test
>> machines.
>>
>>
>>
>> I'd like the VMs to appear on my LAN, and as such have set up a
>> virtual network to dole out a pool of addresses to any VMs that I create.
>>
>>
>>
>> I've set a netmask of 255.255.248.0 in the virtual network template,
>> however, when the VMs get created, their NICs are configured with a
>> netmask of 255.255.255.0. I can ping other machines on my network
>> withink that range of IPs - so I know the VMs are on the network -
>> but that doesn't really help me much.
>>
>>
>>
>> I think it's something to do with contextualisation, or maybe the
>> network config on the host system, but my lack of experience has me
>> at a disadvantage here, I'm afraid.
>>
>>
>>
>> Rather than reproduce lots of console output here, could anyone who
>> wants to know more for troubleshooting purposes, please let me know what to
>> provide?
>>
>>
>>
>> Many Thanks
>>
>>
>>
>> _____ ______ ______
>>
>>
>>
>>
>>
>> Jerry Steele
>>
>> IT Support Specialist
>>
>> Subsurface Imaging
>>
>>
>>
>> CGGVeritas Services (UK) Ltd
>>
>> Crompton Way
>>
>> Crawley
>>
>> W Sussex
>>
>> RH10 9QN
>>
>>
>>
>> T +44 (0)1293 683264<tel:%2B44%20%280%291293%20683264>
>> (Internal: 233264)
>>
>> M +44 (0)7920 237105<tel:%2B44%20%280%297920%20237105>
>>
>>
>>
>> www.cgg.com<http://www.cgg.com>
>>
>>
>>
>> This email and any accompanying attachments are confidential. The
>> information is intended solely for the use of the individual to whom
>> it is addressed.
>> Any review,
>> disclosure, copying, distribution, or use of the email by others is
>> strictly prohibited.
>>
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> [email protected]<mailto:[email protected]>
>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>
>
>
>
> --
> Join us at OpenNebulaConf2013 in Berlin from the 24th to the 26th of
> September 2013!
>
> Javier Fontán Muiños
> Developer
> OpenNebula - The Open Source Toolkit for Data Center Virtualization
> www.OpenNebula.org<http://www.OpenNebula.org> | @OpenNebula |
> github.com/jfontan<http://github.com/jfontan>
>
> 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.
>
> _______________________________________________
> Users mailing list
> [email protected]<mailto:[email protected]>
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
--
Join us at OpenNebulaConf2013 in Berlin from the 24th to the 26th of September
2013!
Javier Fontán Muiños
Developer
OpenNebula - The Open Source Toolkit for Data Center Virtualization
www.OpenNebula.org<http://www.OpenNebula.org> | @OpenNebula |
github.com/jfontan<http://github.com/jfontan>
_______________________________________________
Users mailing list
[email protected]<mailto:[email protected]>
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
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.
_______________________________________________
Users mailing list
[email protected]<mailto:[email protected]>
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
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.
_______________________________________________
Users mailing list
[email protected]<mailto:[email protected]>
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
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.
_______________________________________________
Users mailing list
[email protected]
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org