Hi,<div><br></div><div>yes, you are missing this in your image template:</div><div>DRIVER = "qcow2"</div><div><br></div><div>you can do oneimage update <id> and insert it in the template and try again.</div>

<div><br>By the way, nice ubuntu-vm-builder command!</div><div><br></div><div>cheers,</div><div>Jaime</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Oct 31, 2012 at 9:38 PM, Malicious Scientist <span dir="ltr"><<a href="mailto:scientist.malicious@gmail.com" target="_blank">scientist.malicious@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Community,<br><br>I am performing a fresh install of OpenNebula 3 on Ubuntu 12.04.1 for testing and learning purposes. I'm using the distro packages. I think the installation is OK, the problem are the configuration files for the images, networks, virtual machines, etc. I want to use a qcow2 image of Ubuntu created by ubuntu-vm-builder. Is it possible? I'll repeat the steps that I took for the sake of completeness. <br>


<br>I'm using Ubuntu 12.04.1. For this testbed, I'm using a single machine that will act as the controller and single host. The network bridge is configured properly like this:<br><br>auto br0<br>iface br0 inet static<br>


    address 192.168.1.50<br>    network 192.168.1.0<br>    netmask 255.255.255.0<br>    broadcast 192.168.1.255<br>    gateway 192.168.1.1<br>    dns-nameserver 8.8.8.8<br>    bridge_ports eth0<br>    bridge_fd 9<br>    bridge_hello 2<br>


    bridge_maxage 12<br>    bridge_stp off<br><br>As you can see, it's a local network installation. I installed the OpenNebula packages with apt-get:<br><br>root@netune:~# apt-get install opennebula opennebula-node opennebula-tools opennebula-common<br>


<br>Now as 'oneadmin', I added 'netune' (my machine) as the sole host:<br><br>oneadmin@netune:~$ onehost create netune im_kvm vmm_kvm tm_ssh dummy<br>ID: 5 <br>oneadmin@netune:~$ onehost list<br>  ID NAME               RVM   TCPU   FCPU   ACPU   TMEM   FMEM   AMEM   STAT<br>


   5 netune               0    200    173    200   1.9G 596.6M   1.9G     on<br><br>I also configured SSH to allow login without password. After that, I created a virtual network:<br><br>oneadmin@netune:~$ cat vnet01.template <br>


NAME   = "LAN"<br>TYPE   = FIXED<br>BRIDGE = br0<br>LEASES = [IP=192.168.1.246]<br>LEASES = [IP=192.168.1.247]<br>LEASES = [IP=192.168.1.248]<br>oneadmin@netune:~$ onevnet create vnet01.template <br>ID: 6<br>oneadmin@netune:~$ onevnet list<br>


  ID USER     GROUP    NAME              TYPE BRIDGE  LEASES<br>   6 oneadmin oneadmin LAN                  F    br0       0<br><br>Now, the creation of the OS image. As I mentioned before, I used the ubuntu-vm-builder command:<br>


<br>root@netune:~# ubuntu-vm-builder kvm precise --domain ubuntuvirtual --dest ubuntuvirtual --arch amd64 --hostname ubuntuvirtual --mem 256 --user storm --pass storm --ip 192.168.1.246 --mask 255.255.255.0 --net 192.168.1.0 --bcast 192.168.1.255 --gw 192.168.1.1 --dns 8.8.8.8 --mirror <a href="http://ubuntu-archive.locaweb.com.br/ubuntu" target="_blank">http://ubuntu-archive.locaweb.com.br/ubuntu</a> --components main,universe --addpkg acpid --addpkg vim --addpkg openssh-server --addpkg avahi-daemon --libvirt qemu:///system ; <br>


(lots of output)<br>root@netune:~# ls ubuntuvirtual/<br>tmpfpcs0v.qcow2<br>root@netune:~# cp ubuntuvirtual/tmpfpcs0v.qcow2 /tmp/ubuntuvirtual.qcow2<br>root@netune:~# ls -l /tmp/ubuntuvirtual.qcow2 <br>-rw-r--r-- 1 root root 627834880 Out 31 16:35 /tmp/ubuntuvirtual.qcow2<br>


<br>Executing 'kvm /tmp/ubuntuvirtual.qcow2' brings the virtual machine up with kvm, all the configuration passed as parameters for ubuntu-vm-builder are built into the image. After that, I registered the image for OpenNebula:<br>


<br>oneadmin@netune:~$ cat image01.template <br>NAME = "Ubuntu"<br>PATH = /tmp/ubuntuvirtual.qcow2 <br>TYPE = OS<br>PUBLIC = YES<br>DESCRIPTION = "Ubuntu basic installation"<br>oneadmin@netune:~$ oneimage create image01.template <br>


ID: 0<br>oneadmin@netune:~$ oneimage list<br>  ID USER     GROUP    NAME            SIZE TYPE          REGTIME PER STAT  RVMS<br>   0 oneadmin oneadmin Ubuntu            0M   OS   10/31 16:45:01  No lock     0<br><br>With the network and image set, I created the virtual machine:<br>


<br>oneadmin@netune:~$ cat vm01.template <br>NAME = ubuntu<br>MEMORY = 256<br>CPU = 0.1<br>DISK = [ IMAGE_ID = 0 ]<br>DISK = [<br> TYPE = swap,<br> SIZE = 1024 ]<br>NIC = [ NETWORK_ID = 6, IP = 192.168.1.246 ]<br>GRAPHICS = [<br>


TYPE = "vnc",<br>LISTEN = "0.0.0.0" ]<br>oneadmin@netune:~$ onevm create vm01.template <br>ID: 12<br>oneadmin@netune:~$ onevm list<br>    ID USER     GROUP    NAME         STAT CPU     MEM        HOSTNAME        TIME<br>


    12 oneadmin oneadmin ubuntu       runn   0      0K          netune 00 00:03:14<br><br>The VM is running. But I cannot access through the network, it doesn't answer icmp requests on the designed IP (192.168.1.246). I tried VNC using virsh and vncviewer:<br>


<br>root@netune:~# virsh <br>virsh # list<br> Id Nome                 Estado<br>----------------------------------<br>  1 one-12               executando<br><br>virsh # vncdisplay 1<br>:12<br>root@netune:~# vncviewer <a href="http://127.0.0.1:12" target="_blank">127.0.0.1:12</a><br>


<br>The screen capture is on the link below. What I see is that the system does not find a bootable device. The message is very clear: "No bootable device." <br><br><a href="http://tinypic.com/r/2uqoeia/6" target="_blank">http://tinypic.com/r/2uqoeia/6</a><br>


<br>Question:<br><br>1) Can I use a qcow2 image created like described above?<br>2) Is the file vm01.template correct?<br><br>Thanks for your attention.<span class="HOEnZb"><font color="#888888"><br><br>[]'s<br><br><br>

<br><br>
</font></span><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
<br></blockquote></div><br></div><br clear="all"><div><br></div>-- <br>Jaime Melis<br>Project Engineer<br>OpenNebula - The Open Source Toolkit for Cloud Computing<br><a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:jmelis@opennebula.org" target="_blank">jmelis@opennebula.org</a><br>