[one-users] DNS search domains and rc.local not being read in VMs

2013-09-26 Thread steele, jerry
Hello,

I posted a few days ago about network configuration seemingly not being picked 
up properly - I think that was mainly due to my contextualisation packages 
being for the wrong version, and so the context CDROM device wasn't being 
mounted.

So now I have a separate,, but related issue.

I need to be able to have DNS search domains in my /etc/resolv.conf. I tried to 
achieve this by adding a SEARCH attribute to the virtual network template, but 
it doesn't seem to be picked up (looking in the context scripts, there's 
nothing there to pick it up, so that's kind of expected). I then tried to add 
it in /etc/rc.local, along with some lines to correctly set the hostname based 
on IP,  but this doesn't appear to be being picked up either.

Could anyone tell me what might be going wrong here? Could it be the case that 
rc.local is not being run for some reason at boot? When I test the VM outside 
ONE, rc.local runs fine...

Any help greatly appreciated.

Thanks
__ __ __


Jerry Steele
IT Support Specialist
Subsurface Imaging

CGGVeritas Services (UK) Ltd
Crompton Way
Crawley
W Sussex
RH10 9QN

T  +44 (0)1293 683264 (Internal: 233264)
M +44 (0)7920 237105

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.

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
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


Re: [one-users] Incorrect netmask on virtual machines

2013-09-25 Thread steele, jerry
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:coder@gmail.com]
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 
mailto:jerry.ste...@cgg.com>> 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: 
users-boun...@lists.opennebula.org<mailto:users-boun...@lists.opennebula.org> 
[mailto:users-boun...@lists.opennebula.org<mailto:users-boun...@lists.opennebula.org>]
 On Behalf Of steele, jerry
Sent: 24 September 2013 12:47
To: users@lists.opennebula.org<mailto:users@lists.opennebula.org>
Subject: Re: [one-users] Incorrect netmask on virtual machines

Hi Javier,

The output of "onevm show " 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: 
users-boun...@lists.opennebula.org<mailto:users-boun...@lists.opennebula.org> 
[mailto:users-boun...@lists.opennebula.org<mailto:users-boun...@lists.opennebula.org>]
 On Behalf Of Javier Fontan
Sent: 24 September 2013 10:40
To: steele, jerry
Cc: users@lists.opennebula.org<mailto:users@lists.opennebula.org>
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 " the context section has the values it is supposed to 
have.

On Thu, Sep 19, 2013 at 3:26 PM, steele, jerry 
mailto:jerry.ste...@cgg.com>> 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

Re: [one-users] Incorrect netmask on virtual machines

2013-09-24 Thread steele, jerry
...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: users-boun...@lists.opennebula.org 
[mailto:users-boun...@lists.opennebula.org] On Behalf Of steele, jerry
Sent: 24 September 2013 12:47
To: users@lists.opennebula.org
Subject: Re: [one-users] Incorrect netmask on virtual machines

Hi Javier,

The output of "onevm show " 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: users-boun...@lists.opennebula.org 
[mailto:users-boun...@lists.opennebula.org] On Behalf Of Javier Fontan
Sent: 24 September 2013 10:40
To: steele, jerry
Cc: users@lists.opennebula.org
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 " the context section has the values it is supposed to 
have.

On Thu, Sep 19, 2013 at 3:26 PM, steele, jerry  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 a

Re: [one-users] Incorrect netmask on virtual machines

2013-09-24 Thread steele, jerry
Hi Javier,

The output of "onevm show " 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: users-boun...@lists.opennebula.org 
[mailto:users-boun...@lists.opennebula.org] On Behalf Of Javier Fontan
Sent: 24 September 2013 10:40
To: steele, jerry
Cc: users@lists.opennebula.org
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 " the context section has the values it is supposed to 
have.

On Thu, Sep 19, 2013 at 3:26 PM, steele, jerry  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:jfon...@opennebula.org]
> Sent: 19 September 2013 13:56
> To: steele, jerry
> Cc: users@lists.opennebula.org
> 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:

Re: [one-users] Incorrect netmask on virtual machines

2013-09-19 Thread steele, jerry
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:jfon...@opennebula.org]
Sent: 19 September 2013 13:56
To: steele, jerry
Cc: users@lists.opennebula.org
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  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 68326

[one-users] Incorrect netmask on virtual machines

2013-09-17 Thread steele, jerry
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 (Internal: 233264)
M +44 (0)7920 237105

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
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org