[one-users] Ubuntu Cloud Images

Tobias Brunner tobias at tobru.ch
Wed Oct 23 00:12:28 PDT 2013


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




More information about the Users mailing list