<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi there,<br><br>The image will default to 169.254.169.254 IP address.<br>You either NAT it to the metadata server on your router, or redirect it to the metadata server with IPtables on each host.<br>Please have a look at the "REDIRECT TO 169.254.169.254:80" section on [1]. <br>This will make everything (cloud-init, byobu, etc) work as if it was running on EC2.<br><br>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.<br>But be aware it will not work for every image. <br><br>For the serial port I use the following, and it works:<br><br>RAW             = [ DATA="<devices><serial type='pty'><target port='0'/></serial></devices>", TYPE="kvm" ]<br><br>It looks similiar to yours, so I don't know what can be wrong,<br><br>[1] https://bitbucket.org/ricardoduarte/opennebula-metadata<br><br>Regards,<br>Ricardo Duarte<br><br><div>> Date: Fri, 18 Oct 2013 22:36:18 +0200<br>> From: tobias@tobru.ch<br>> To: rjtd21@hotmail.com<br>> CC: users@lists.opennebula.org<br>> Subject: RE: [one-users] Ubuntu Cloud Images<br>> <br>> Hi,<br>> <br>> Thanks for the fast reply.<br>> <br>> > Assuming you are using a KVM hypervisor,<br>> <br>> Yes, I'm using KVM with libivrt.<br>> <br>> > you will need:<br>> > <br>> > - A serial port on your VM [1].<br>> > - DHCP on the network (just do a static One Mac to IP)<br>> > - Opennebula-metadata server [2]<br>> > <br>> > They will work without any changes afterwards, and you can even use<br>> > cloud-init to contextualize them.<br>> > <br>> > If you need more than the 2GB they have, just increase the size of the<br>> > qcow2.<br>> > <br>> > qemu-img resize filename [+ | -]size<br>> > No need to change the filesystem inside of it. Cloud-init will<br>> > increase the size of the ext fs to the qcow size.<br>> <br>> I've tried to get it running using your hints, but I seem to miss <br>> several things. Here's what I did until now:<br>> <br>> * Installed and started opennebula-metadata server. Verified that it's <br>> running:<br>> oneadmin 11123  0.0  1.3 179076 26812 ?        Sl   21:01   0:02 ruby <br>> /usr/lib/one/ruby/cloud/metadata/metadata-server.rb<br>> tcp        0      0 0.0.0.0:8775            0.0.0.0:*               <br>> LISTEN      11123/ruby<br>> <br>> * Downloaded <br>> http://cloud-images.ubuntu.com/saucy/current/saucy-server-cloudimg-amd64-disk1.img<br>> <br>> * Imported the .img file into the image store: oneimage create -d 101 <br>> --name saucy-cloud-amd64 --path <br>> /tmp/saucy-server-cloudimg-amd64-disk1.img --type OS<br>> <br>> * Created a template:<br>> <br>> CONTEXT=[<br>>    NETWORK="YES" ]<br>> CPU="1"<br>> DISK=[<br>>    IMAGE_ID="41" ]<br>> GRAPHICS=[<br>>    LISTEN="0.0.0.0",<br>>    TYPE="VNC" ]<br>> MEMORY="1024"<br>> NIC=[<br>>    NETWORK_ID="0" ]<br>> OS=[<br>>    ARCH="x86_64" ]<br>> RAW=[<br>>    DATA="<serial type='pty'><target port='0'/></serial><console <br>> type='pty'><target type='serial' port='0'/></console>",<br>>    TYPE="kvm" ]<br>> <br>> * Instantied a VM with this template: onetemplate instantiate 19 --name <br>> ucitest<br>> <br>> The VM is now running and booted from the cloud image (I see this using <br>> the VNC console). But:<br>> * Looking at the generated libvirt XML, the two parameters "serial" and <br>> "console" are missing. What could be wrong with the template?<br>> * The VM seems not to get data from the metadata server. How does the VM <br>> find the metadata server? The DHCP server assigned an IP to this VM and <br>> the IP is pingable. But how does the VM know the IP to contact for the <br>> metadata? Are there any other parameters which must be passed on? How <br>> can I set a password to log into the VM?<br>> <br>> Some other questions: Could the disk be automatically resized using <br>> http://dev.opennebula.org/issues/1727? Will the metadata server find <br>> it's way into the opennebula distribution?<br>> <br>> Thanks for clarifying things...<br>> <br>> Cheers,<br>> Tobias<br>> <br></div>                                        </div></body>
</html>