[one-users] Ubuntu Cloud Images
Ricardo Duarte
rjtd21 at hotmail.com
Mon Oct 21 01:29:15 PDT 2013
Hi,
I forgot that if you use instance-data, you should set the opennebula-metadata port to 8773 (it defaults to 8775).
Cloud-init will then try:
1. http://169.254.169.254
2. http://instance-data:8773
To check if metadata-server is working, please use the following application from a running instance:
http://aws.amazon.com/code/1825
Regards,
Ricardo Duarte
From: rjtd21 at hotmail.com
To: tobias at tobru.ch
Date: Mon, 21 Oct 2013 08:23:45 +0000
CC: users at lists.opennebula.org
Subject: Re: [one-users] Ubuntu Cloud Images
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
> Date: Fri, 18 Oct 2013 22:36:18 +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 fast reply.
>
> > Assuming you are using a KVM hypervisor,
>
> Yes, I'm using KVM with libivrt.
>
> > you will need:
> >
> > - A serial port on your VM [1].
> > - DHCP on the network (just do a static One Mac to IP)
> > - Opennebula-metadata server [2]
> >
> > They will work without any changes afterwards, and you can even use
> > cloud-init to contextualize them.
> >
> > If you need more than the 2GB they have, just increase the size of the
> > qcow2.
> >
> > qemu-img resize filename [+ | -]size
> > No need to change the filesystem inside of it. Cloud-init will
> > increase the size of the ext fs to the qcow size.
>
> I've tried to get it running using your hints, but I seem to miss
> several things. Here's what I did until now:
>
> * Installed and started opennebula-metadata server. Verified that it's
> running:
> oneadmin 11123 0.0 1.3 179076 26812 ? Sl 21:01 0:02 ruby
> /usr/lib/one/ruby/cloud/metadata/metadata-server.rb
> tcp 0 0 0.0.0.0:8775 0.0.0.0:*
> LISTEN 11123/ruby
>
> * Downloaded
> http://cloud-images.ubuntu.com/saucy/current/saucy-server-cloudimg-amd64-disk1.img
>
> * Imported the .img file into the image store: oneimage create -d 101
> --name saucy-cloud-amd64 --path
> /tmp/saucy-server-cloudimg-amd64-disk1.img --type OS
>
> * Created a template:
>
> CONTEXT=[
> NETWORK="YES" ]
> CPU="1"
> DISK=[
> IMAGE_ID="41" ]
> GRAPHICS=[
> LISTEN="0.0.0.0",
> TYPE="VNC" ]
> MEMORY="1024"
> NIC=[
> NETWORK_ID="0" ]
> OS=[
> ARCH="x86_64" ]
> RAW=[
> DATA="<serial type='pty'><target port='0'/></serial><console
> type='pty'><target type='serial' port='0'/></console>",
> TYPE="kvm" ]
>
> * Instantied a VM with this template: onetemplate instantiate 19 --name
> ucitest
>
> The VM is now running and booted from the cloud image (I see this using
> the VNC console). But:
> * Looking at the generated libvirt XML, the two parameters "serial" and
> "console" are missing. What could be wrong with the template?
> * The VM seems not to get data from the metadata server. How does the VM
> find the metadata server? The DHCP server assigned an IP to this VM and
> the IP is pingable. But how does the VM know the IP to contact for the
> metadata? Are there any other parameters which must be passed on? How
> can I set a password to log into the VM?
>
> Some other questions: Could the disk be automatically resized using
> http://dev.opennebula.org/issues/1727? Will the metadata server find
> it's way into the opennebula distribution?
>
> Thanks for clarifying things...
>
> Cheers,
> Tobias
>
_______________________________________________
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/20131021/049615d2/attachment-0002.htm>
More information about the Users
mailing list