[one-users] Ubuntu Cloud Images
Ricardo Duarte
rjtd21 at hotmail.com
Wed Oct 23 02:05:27 PDT 2013
Hi again,
Alternatively, you can try to run the following on the metadata server:
# route add -net <your instance network>/24 gw <your router ip>
If that does not work, you can also try to also disable ICMP redirects on your router:
# echo 0 > /proc/sys/net/ipv4/conf/all/send_redirects
And reverse path check on your hosts:
# echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
Regards,
Ricardo
From: rjtd21 at hotmail.com
To: tobias at tobru.ch
Date: Wed, 23 Oct 2013 08:58:43 +0000
CC: users at lists.opennebula.org
Subject: Re: [one-users] Ubuntu Cloud Images
Hi Tobias,
I would say that the NAT method will not work if both the metadata-server and the instances are on the same IP network.
You can try to do the following:
- On your router, add a new IP to the VLAN => 169.254.169.253/30
- On the metadata-server, add the IP 169.254.169.254/30 to the interface
- Edit the /etc/one/metadata.conf to listen on 169.254.169.254, and port 80
- Make sure your router forwards packets from your instance network to this network
To ensure metadata server is working fine, before making the changes, just change the IP address and port on the ec2-metadata script to the real ip and port of the server, and check if it returns any value.
Regards,
Ricardo Duarte
> Date: Wed, 23 Oct 2013 09:12:28 +0200
> From: tobias at tobru.ch
> To: rjtd21 at hotmail.com
> CC: users at lists.opennebula.org
> Subject: RE: [one-users] Ubuntu Cloud Images
>
> Hi,
>
> Thanks for the explanation.
>
> The Ubuntu Saucy Cloud image works out of the box without the metadata
> server. Cloud-init 0.7.3 is compatible with the OpenNebula
> contextualization system [1].
>
> But I'm trying to get the metadata server working anyway. The problem
> I'm facing is how I can make the IP 169.254.169.254 reachable... I've
> tried a NAT rule on the router, after that the connection was made to
> the metadata server, but never reached the VM back (both the VM and the
> metadata server are in the same VLAN). With tcpdump I saw that the
> packets reached the VM back but with a different source IP which
> confused curl.
> Now I'd like to do it with iptables, which I think is far more better
> than to rely on the router... I'm using Open vSwitch on the hosts and
> couldn't get the iptables rule described on [2] matching any packet
> flowing out of the VM. Is iptables compatible with Open vSwitch? Or has
> the NAT rule to be done with Open vSwitch tools? If yes, how?
>
> Cheers,
> Tobias
>
> [1]
> http://cloudinit.readthedocs.org/en/latest/topics/datasources.html#opennebula
> [2] https://bitbucket.org/ricardoduarte/opennebula-metadata
>
> On 21.10.2013 10:23, Ricardo Duarte wrote:
> > Hi there,
> >
> > The image will default to 169.254.169.254 IP address.
> > You either NAT it to the metadata server on your router, or redirect
> > it to the metadata server with IPtables on each host.
> > Please have a look at the "REDIRECT TO 169.254.169.254:80" section on
> > [1].
> > This will make everything (cloud-init, byobu, etc) work as if it was
> > running on EC2.
> >
> > You can try to set a instance-data DNS record, pointing to the
> > metadata-server, as some images also try to reach that if
> > 169.254.169.254 fails.
> > But be aware it will not work for every image.
> >
> > For the serial port I use the following, and it works:
> >
> > RAW = [ DATA="<devices><serial type='pty'><target
> > port='0'/></serial></devices>", TYPE="kvm" ]
> >
> > It looks similiar to yours, so I don't know what can be wrong,
> >
> > [1] https://bitbucket.org/ricardoduarte/opennebula-metadata
> >
> > Regards,
> > Ricardo Duarte
>
_______________________________________________
Users mailing list
Users at lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20131023/79133078/attachment-0002.htm>
More information about the Users
mailing list