Hi Jaime, Thanks. The VM is up and running, including network access.
[]'s On Fri, Nov 2, 2012 at 6:53 AM, Jaime Melis <[email protected]> wrote: > Hi, > > yes, you are missing this in your image template: > DRIVER = "qcow2" > > you can do oneimage update <id> and insert it in the template and try > again. > > By the way, nice ubuntu-vm-builder command! > > cheers, > Jaime > > > On Wed, Oct 31, 2012 at 9:38 PM, Malicious Scientist < > [email protected]> wrote: > >> Hello Community, >> >> 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. >> >> 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: >> >> auto br0 >> iface br0 inet static >> address 192.168.1.50 >> network 192.168.1.0 >> netmask 255.255.255.0 >> broadcast 192.168.1.255 >> gateway 192.168.1.1 >> dns-nameserver 8.8.8.8 >> bridge_ports eth0 >> bridge_fd 9 >> bridge_hello 2 >> bridge_maxage 12 >> bridge_stp off >> >> As you can see, it's a local network installation. I installed the >> OpenNebula packages with apt-get: >> >> root@netune:~# apt-get install opennebula opennebula-node >> opennebula-tools opennebula-common >> >> Now as 'oneadmin', I added 'netune' (my machine) as the sole host: >> >> oneadmin@netune:~$ onehost create netune im_kvm vmm_kvm tm_ssh dummy >> ID: 5 >> oneadmin@netune:~$ onehost list >> ID NAME RVM TCPU FCPU ACPU TMEM FMEM AMEM >> STAT >> 5 netune 0 200 173 200 1.9G 596.6M 1.9G >> on >> >> I also configured SSH to allow login without password. After that, I >> created a virtual network: >> >> oneadmin@netune:~$ cat vnet01.template >> NAME = "LAN" >> TYPE = FIXED >> BRIDGE = br0 >> LEASES = [IP=192.168.1.246] >> LEASES = [IP=192.168.1.247] >> LEASES = [IP=192.168.1.248] >> oneadmin@netune:~$ onevnet create vnet01.template >> ID: 6 >> oneadmin@netune:~$ onevnet list >> ID USER GROUP NAME TYPE BRIDGE LEASES >> 6 oneadmin oneadmin LAN F br0 0 >> >> Now, the creation of the OS image. As I mentioned before, I used the >> ubuntu-vm-builder command: >> >> 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 >> http://ubuntu-archive.locaweb.com.br/ubuntu --components main,universe >> --addpkg acpid --addpkg vim --addpkg openssh-server --addpkg avahi-daemon >> --libvirt qemu:///system ; >> (lots of output) >> root@netune:~# ls ubuntuvirtual/ >> tmpfpcs0v.qcow2 >> root@netune:~# cp ubuntuvirtual/tmpfpcs0v.qcow2 /tmp/ubuntuvirtual.qcow2 >> root@netune:~# ls -l /tmp/ubuntuvirtual.qcow2 >> -rw-r--r-- 1 root root 627834880 Out 31 16:35 /tmp/ubuntuvirtual.qcow2 >> >> 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: >> >> oneadmin@netune:~$ cat image01.template >> NAME = "Ubuntu" >> PATH = /tmp/ubuntuvirtual.qcow2 >> TYPE = OS >> PUBLIC = YES >> DESCRIPTION = "Ubuntu basic installation" >> oneadmin@netune:~$ oneimage create image01.template >> ID: 0 >> oneadmin@netune:~$ oneimage list >> ID USER GROUP NAME SIZE TYPE REGTIME PER >> STAT RVMS >> 0 oneadmin oneadmin Ubuntu 0M OS 10/31 16:45:01 No >> lock 0 >> >> With the network and image set, I created the virtual machine: >> >> oneadmin@netune:~$ cat vm01.template >> NAME = ubuntu >> MEMORY = 256 >> CPU = 0.1 >> DISK = [ IMAGE_ID = 0 ] >> DISK = [ >> TYPE = swap, >> SIZE = 1024 ] >> NIC = [ NETWORK_ID = 6, IP = 192.168.1.246 ] >> GRAPHICS = [ >> TYPE = "vnc", >> LISTEN = "0.0.0.0" ] >> oneadmin@netune:~$ onevm create vm01.template >> ID: 12 >> oneadmin@netune:~$ onevm list >> ID USER GROUP NAME STAT CPU MEM >> HOSTNAME TIME >> 12 oneadmin oneadmin ubuntu runn 0 0K netune 00 >> 00:03:14 >> >> 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: >> >> root@netune:~# virsh >> virsh # list >> Id Nome Estado >> ---------------------------------- >> 1 one-12 executando >> >> virsh # vncdisplay 1 >> :12 >> root@netune:~# vncviewer 127.0.0.1:12 >> >> 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." >> >> http://tinypic.com/r/2uqoeia/6 >> >> Question: >> >> 1) Can I use a qcow2 image created like described above? >> 2) Is the file vm01.template correct? >> >> Thanks for your attention. >> >> []'s >> >> >> >> >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org >> >> > > > -- > Jaime Melis > Project Engineer > OpenNebula - The Open Source Toolkit for Cloud Computing > www.OpenNebula.org | [email protected] >
_______________________________________________ Users mailing list [email protected] http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
