Hello, I was finally able to run my ubuntu image using one.
Thanks to Jaime, I was installing the ubuntu-10.10-64bit-server iso through opennebula by modifying the template file. I got the error that the kernel is 64 bit but the architecture is i686. As mentioned in the documentation http://opennebula.org/documentation:rel2.2:template we have to explicitly specify the architecture by adding OS = [ ARCH = x86_64 ] if the kernel we are trying to boot is not 32 bits which I was not doing for my previous images also. That's when I stopped the installation without completing and tried OS = [ ARCH = x86_64 ] for my previously made images. Now they work like a charm. So, it's not necessary to install the ubuntu image using opennebula (although it is easy to install that way). We can run pre-installed (installed using qemu command) in opennebula, we just need the right template file. In my case the final template file that I used was: NAME = ubuntu CPU = 1 MEMORY = 400 DISK = [ source = "/path/to/ubuntu-1010-server-64bits.img", target = "sda", readonly = "no", DRIVER=qcow2 ] OS = [ ARCH = x86_64] NIC = [ NETWORK = "VM_LAN" ] FEATURES=[ acpi="no" ] GRAPHICS = [type="vnc", listen="0.0.0.0", port="5949"] BR, Amit On Tue, Apr 19, 2011 at 12:51 PM, Jaime Melis <j.me...@gmail.com> wrote: > Hi Amit, > take a look at this [1] post, it might help you out with running Ubuntu > 10.10. Although I have described the process for Ubuntu 10.04 it should work > with Ubuntu 10.10. > [1] http://lists.opennebula.org/pipermail/users-opennebula.org/2011-April/004893.html > Cheers, > Jaime > > On Fri, Apr 15, 2011 at 12:52 PM, Amit Soni <get.amits...@gmail.com> wrote: >> >> Hello, >> >> I made this img file using the following commands: >> >> qemu-img create -f qcow2 vdisk.img 10G >> qemu-system-x86_64 -hda vdisk.img -cdrom /path/to/ubuntu-server.iso >> -boot d -m 384 >> mv vdisk.img ubuntu-1010-server-network-init.img >> >> So, I am pretty sure it's qcow2 format. >> >> Also, I tried to convert the img file to the raw format using the >> following command but still I got the same blank screen: >> >> qemu-img convert -O raw ubuntu-1010-server-network-init.img >> ubuntu-1010-server-network-init.raw >> >> So I am still not able to run ubuntu VM in opennebula. I would be >> great if there are some sort of standard contextualized images of >> standard linux distros available for usage. >> >> Amit >> >> On Fri, Apr 15, 2011 at 1:26 PM, Olivier Sallou <olivier.sal...@irisa.fr> >> wrote: >> > your source file is >> > >> > ubuntu-1010-server-network-init.img >> > >> > with img extension are you sure it is a qcow2? >> > >> > Olivier >> > Le 4/15/11 12:13 PM, Amit Soni a écrit : >> >> Hello, >> >> >> >> There is some interesting progress. I was able to connect to the vnc >> >> session of the machine. I found the following output: >> >> >> >> Booting from Hard Disk ... >> >> Boot failed: not a bootable disk >> >> >> >> No bootable device. >> >> >> >> Apparently, the format of the IMG file is qcow2 and I didn't mentioned >> >> that format in the VM template. Hence, I did the following changes in >> >> the VM template as mentioned in the link >> >> https://support.opennebula.pro/entries/348847-using-qcow-images: >> >> >> >> DISK = [ >> >> source = >> >> "/srv/cloud/images/ubuntu/ubuntu-1010-server-network-init.img", >> >> target = "hda", >> >> readonly = "no", >> >> DRIVER=qcow2 >> >> ] >> >> >> >> However, now when I access the VM from the vnc session I see blank >> >> screen (not a single character on the screen). The VM is still in the >> >> "runn" state. >> >> Now I am really confused what could have went wrong. >> >> >> >> --Amit >> >> >> >> >> >> 2011/4/14 Amit Soni <get.amits...@gmail.com>: >> >>> Hello, >> >>> >> >>> I was trying the same thing using following parameters in the template >> >>> file: >> >>> >> >>> RAW = [ type = "kvm", >> >>> data = "<devices><serial type=\"pty\"><source >> >>> path=\"/dev/pts/5\"/><target port=\"0\"/></serial><console >> >>> type=\"pty\" >> >>> tty=\"/dev/pts/5\"><source path=\"/dev/pts/5\"/><target >> >>> port=\"0\"/></console></devices>" ] >> >>> >> >>> However, when I accessed the machine using the virsh console I got the >> >>> following output after which it just froze. I hit "enter" many time >> >>> but no response. Although I was able to get out of the console: >> >>> >> >>> virsh # console one-13 >> >>> Connected to domain one-13 >> >>> Escape character is ^] >> >>> >> >>> I read somewhere that this can be because I have not enabled the VM to >> >>> be accessed from serial console so then I followed the following guide >> >>> to make some modification in the VM: >> >>> >> >>> https://help.ubuntu.com/community/SerialConsoleHowto >> >>> >> >>> However, after making the changes when I boot the VM using the "qemu" >> >>> command I just see the some output like follows: >> >>> >> >>> fsck from util-linux-ng 2.17.2 >> >>> /dev/sda1: clean ... files, ... blocks >> >>> * Starting AppArmor profiles >> >>> >> >>> And that's it. After this there is no response from the VM. However, I >> >>> am able to ssh into the VM (since I have started it from qemu >> >>> command). >> >>> >> >>> But the important thing is, even after these changes for enabling >> >>> serial console in the VM and starting the VM from the opennebula with >> >>> the above mentioned RAW parameters, I get the same result. It get the >> >>> same output upon accessing the console and after that it just freezes. >> >>> >> >>> Could see any mistake that I might be making. >> >>> >> >>> Thanks & Regards, >> >>> Amit >> >>> >> >>> >> >>> 2011/4/14 Idafen Santana Pérez <idafe...@gmail.com>: >> >>>> Hi Zeeshan, >> >>>> >> >>>> how do you access a running VM? >> >>>> >> >>>> Regards >> >>>> Idafen >> >>>> >> >>>> On Thu, Apr 14, 2011 at 6:13 PM, Zeeshan Ali Shah <zas...@pdc.kth.se> >> >>>> wrote: >> >>>>> Manually Console to the running VM to see what went wrong .. >> >>>>> >> >>>>> /Zeeshan >> >>>>> >> >>>>> On Thu, Apr 14, 2011 at 5:40 PM, Amit Soni <get.amits...@gmail.com> >> >>>>> wrote: >> >>>>>> Hello, >> >>>>>> >> >>>>>> I manually created a Ubuntu IMG by installing the Ubuntu 10.10 >> >>>>>> server >> >>>>>> ISO using qemu command as follows: >> >>>>>> >> >>>>>> qemu-img create -f qcow2 vdisk.img 10G >> >>>>>> qemu-system-x86_64 -hda vdisk.img -cdrom /path/to/ubuntu-server.iso >> >>>>>> -boot d -m 384 >> >>>>>> >> >>>>>> Then I added the network contextualisation scripts as mentioned in >> >>>>>> the >> >>>>>> first section of the article: >> >>>>>> http://opennebula.org/documentation:archives:rel2.0:cong >> >>>>>> But I did one change; I added the execution of the "vmcontext" >> >>>>>> script >> >>>>>> in the "/etc/init.d/networking" script since adding the "vmcontext" >> >>>>>> script in the runlevel 2 didn't helped. >> >>>>>> >> >>>>>> Now when I start the installed Ubuntu IMG using the following >> >>>>>> command, >> >>>>>> I get the desired IP in the machine. I am also able to SSH to the >> >>>>>> machine: >> >>>>>> >> >>>>>> qemu-system-x86_64 -hda ubuntu-server.img -net >> >>>>>> nic,macaddr=02:00:c0:a8:02:08 -net tap >> >>>>>> >> >>>>>> However, when I use this IMG in the opennebula template file the >> >>>>>> machine goes in the "runn" state but I am not able to access the >> >>>>>> machine. My template file is as follows: >> >>>>>> >> >>>>>> NAME = ubuntu >> >>>>>> CPU = 1 >> >>>>>> MEMORY = 400 >> >>>>>> >> >>>>>> DISK = [ >> >>>>>> source = "/srv/cloud/images/ubuntu/ubuntu-server.img", >> >>>>>> target = "hda", >> >>>>>> readonly = "no" ] >> >>>>>> >> >>>>>> NIC = [ NETWORK = "VM_LAN" ] >> >>>>>> >> >>>>>> FEATURES=[ acpi="no" ] >> >>>>>> >> >>>>>> Moreover, when I start the standard ttylinux IMG in am easily able >> >>>>>> to >> >>>>>> SSH to the machine. >> >>>>>> Can anyone guide me to some standard documentation of how to create >> >>>>>> a >> >>>>>> IMG for opennebula starting from an ISO. >> >>>>>> >> >>>>>> Thanks & Regards, >> >>>>>> Amit Soni >> >>>>>> _______________________________________________ >> >>>>>> Users mailing list >> >>>>>> Users@lists.opennebula.org >> >>>>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org >> >>>>> >> >>>>> >> >>>>> -- >> >>>>> >> >>>>> -- >> >>>>> Regards >> >>>>> >> >>>>> Zeeshan Ali Shah >> >>>>> System Administrator >> >>>>> PDC-Center for High Performance Computing >> >>>>> KTH-Royal Institute of Technology , Sweden >> >>>>> >> >>>>> +46 8 790 9115 >> >>>>> >> >>>>> _______________________________________________ >> >>>>> Users mailing list >> >>>>> Users@lists.opennebula.org >> >>>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org >> >>>>> >> >>>>> >> >>> >> >>> >> >>> -- >> >>> Amit Soni >> >>> Email-id: get.amits...@gmail.com, get.amits...@hotmail.com >> >>> >> >> >> >> >> > >> > -- >> > gpg key id: 4096R/326D8438 (pgp.mit.edu) >> > Key fingerprint = 5FB4 6F83 D3B9 5204 6335 D26D 78DC 68DB 326D 8438 >> > >> > >> > _______________________________________________ >> > Users mailing list >> > Users@lists.opennebula.org >> > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org >> > >> >> >> >> -- >> Amit Soni >> Email-id: get.amits...@gmail.com, get.amits...@hotmail.com >> _______________________________________________ >> Users mailing list >> Users@lists.opennebula.org >> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org > > -- Amit Soni Email-id: get.amits...@gmail.com, get.amits...@hotmail.com _______________________________________________ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org