Hi, technically you cannot change the boot device once the VM is created.
What you can do is to use the onevm saveas <vm_id> <disk_id> <image_name> command to save the disk on which you installed the OS. The image will be copied back to opennebula after the machine gracefully shutsdown. You can then create a new VM using that disk to boot. I think you should add an empty disk to the VM template, so you can install on that one and opennebula is aware it exists, so it can save it later. I hope I answered your question, otherwise dont hesitate to write back, Hector El 12/07/11 12:13, lv...@initialone.net escribió: > Okay, sorry about that. However, I was able to get a vm to install, but > once it's installed, it keeps booting back up into installation. How do > we change the bootup device? > > Oh the fix for my previous issue was that the target was set > incorrectly, it seems xen PV takes the argument of xvda and not hda or > sda. I changed that and it worked right away, I was able to xm console > into the vm and got it to install completely, however after the > installation and reboot, the vm kept booting back up with the > installation image. I also noticed that it doesn't actually create an > image file let alone use it, I'm not sure what I'm saying here is making > any sense, so I'm going to post a few things up. > > Here's the template I used: > > NAME = RHEL6 > CPU = 0.5 > MEMORY = 256 > > DISK = [ > source = "/var/lib/one/images/rhel6.img", > target = "xvda", > readonly = "no" ] > > OS = [ > KERNEL = "/srv/xen/vmlinuz", > INITRD = "/srv/xen/initrd.img" ] > > NIC = [ NETWORK_ID = 4 ] > > FEATURES=[ acpi="no" ] > > CONTEXT = [ > hostname = "$NAME", > ip_public = "199.115.231.13", > files = "/home/oneadmin/one-templates/init.sh > /home/oneadmin/one-templates/authorized_keys", > target = "hda", > root_pubkey = "/home/oneadmin/one-templates/authorized_keys", > username = "oneadmin", > user_pubkey = "/home/oneadmin/one-templates/authorized_keys" > ] > > Here's the image file: (As you can see, it doesn't hold anything) > > > [root@io-onebula02 ~]# file /var/lib/one/images/rhel6.img > /var/lib/one/images/rhel6.img: data > > > Here's the image file that I built just using xen and the xm create > command: (This one works and I am able to ssh to it and console to it.) > > [root@io-onebula02 ~]# file /var/lib/one/images/server.img > /var/lib/one/images/server.img: x86 boot sector; partition 1: ID=0x83, > active, starthead 1, startsector 63, 208782 sectors; partition 2: > ID=0x8e, starthead 0, startsector 208845, 3984120 sectors, code offset 0x48 > > > Is there a parameter i'm not setting up correctly? Shouldn't it just > take the source = "/var/lib/one/images/rhel6.img", an image that is > working like my /var/lib/one/images/server.img and make a vm out of that? > Please help. > > -Leo > > > On Mon, 11 Jul 2011 09:29:18 +0200, Héctor Sanjuán wrote: >> Hi, >> >> please keep the discussion in the mailing list. I'll look into it later. >> The ISO image should be fine though. >> >> Hector >> >> El 11/07/11 15:59, lv...@initialone.net escribió: >>> Hello Hector, >>> >>> Thanks for looking into this, much is appreciated, I tried sda, hda, >>> hdb, all different kinds of combinations, same results. Could it be an >>> issue just with the image, the image I used was from the opennebula >>> sample vm documentation section, is that image only for kvm? How would I >>> go about creating a vm from an ISO or how do I get more images? >>> >>> -Leo >>> >>> On Sun, 10 Jul 2011 01:29:23 +0200, Héctor Sanjuán wrote: >>>> Hi, >>>> >>>> wondering: does it work if you put the ttylinux image in sda instead of >>>> hda?: >>>> >>>> DISK = [ IMAGE_ID = 12, >>>> target = "sda", >>>> readonly = "no" ] >>>> >>>> >>>> Hector >>>> >>>> >>>> El 10/07/11 09:02, lv...@initialone.net escribió: >>>>> I came across a mail list with an issue similar to mines at the >>>>> following URL: >>>>> >>>>> >>>>> http://lists.opennebula.org/pipermail/users-opennebula.org/2009-April/000364.html >>>>> >>>>> >>>>> >>>>> >>>>> I can't seem to get a vm up and running, my error when the console to >>>>> the vm: >>>>> >>>>> Scanning logical volumes >>>>> Reading all physical volumes. This may take a while... >>>>> No volume groups found >>>>> Activating logical volumes >>>>> Volume group "VolGroup00" not found >>>>> Creating root device. >>>>> Mounting root filesystem. >>>>> mount: could not find filesystem '/dev/root' >>>>> Setting up other filesystems. >>>>> Setting up new root fs >>>>> setuproot: moving /dev failed: No such file or directory >>>>> no fstab.sys, mounting internal defaults >>>>> setuproot: error mounting /proc: No such file or directory >>>>> setuproot: error mounting /sys: No such file or directory >>>>> Switching to new root and running init. >>>>> unmounting old /dev >>>>> unmounting old /proc >>>>> unmounting old /sys >>>>> switchroot: mount failed: No such file or directory >>>>> Kernel panic - not syncing: Attempted to kill init! >>>>> >>>>> The vm seems to be at an unknown state when running the onevm top >>>>> command. >>>>> >>>>> My template is as follows: >>>>> >>>>> CPU = 0.1 >>>>> MEMORY = 64 >>>>> >>>>> OS = [ >>>>> KERNEL = "/boot/vmlinuz-2.6.18-238.12.1.el5xen", >>>>> INITRD = "/boot/initrd-2.6.18-238.12.1.el5xen.img" ] >>>>> >>>>> DISK = [ IMAGE_ID = 12, >>>>> target = "hda", >>>>> readonly = "no" ] >>>>> >>>>> DISK = [ >>>>> type = swap, >>>>> size = 5120, >>>>> target = sdb ] >>>>> >>>>> DISK = [ >>>>> type = fs, >>>>> size = 4096, >>>>> format = ext3, >>>>> save = yes, >>>>> target = sdc >>>>> ] >>>>> >>>>> NIC = [ NETWORK_ID = 4 ] >>>>> >>>>> FEATURES=[ acpi="no" ] >>>>> >>>>> #CONTEXT = [ >>>>> # hostname = "$NAME", >>>>> # ip_public = "199.115.231.13", >>>>> # files = "/home/oneadmin/one-templates/init.sh >>>>> /home/oneadmin/one-templates/authorized_keys", >>>>> # target = "hda", >>>>> # root_pubkey = "/home/oneadmin/one-templates/authorized_keys", >>>>> # username = "oneadmin", >>>>> # user_pubkey = "/home/oneadmin/one-templates/authorized_keys" >>>>> #] >>>>> >>>>> I am using the ttylinux download from the opennebula documents from: >>>>> http://opennebula.org/documentation:rel2.2:vmg >>>>> >>>>> My system consist of 1 server running inside a xen vm, I can create >>>>> paravirtual vm's manually, however i can't seem to get this to work. >>>>> It's a system-wide installation of opennebula 2.2-1, the system is >>>>> 2.6.18-238.12.1.el5xen #1 SMP Tue May 31 14:02:29 EDT 2011 x86_64 >>>>> x86_64 >>>>> x86_64 GNU/Linux. So I basically installed opennebula on the same >>>>> box as >>>>> the hypervisor, opennebula is running along with sunstone-server >>>>> and all >>>>> the requirements of opennebula. >>>>> >>>>> Here's my log file that I got when I did the command onevm create >>>>> (test.one): >>>>> >>>>> Thu Jul 7 23:05:49 2011 [DiM][I]: New VM state is ACTIVE. >>>>> Thu Jul 7 23:05:49 2011 [LCM][I]: New VM state is PROLOG. >>>>> Thu Jul 7 23:05:49 2011 [VM][I]: Virtual Machine has no context >>>>> Thu Jul 7 23:06:09 2011 [TM][I]: tm_clone.sh: >>>>> >>>>> >>>>> io-onebula02.initialone.net:/var/lib/one/images/8625d68b699fd30e64360471eb2c38fed47fcfb6 >>>>> >>>>> >>>>> localhost:/srv/cloud/one/var/41/images/disk.0 >>>>> Thu Jul 7 23:06:09 2011 [TM][I]: tm_clone.sh: DST: >>>>> /srv/cloud/one/var/41/images/disk.0 >>>>> Thu Jul 7 23:06:09 2011 [TM][I]: tm_clone.sh: Creating directory >>>>> /srv/cloud/one/var/41/images >>>>> Thu Jul 7 23:06:09 2011 [TM][I]: tm_clone.sh: Executed "/usr/bin/ssh >>>>> localhost mkdir -p /srv/cloud/one/var/41/images". >>>>> Thu Jul 7 23:06:09 2011 [TM][I]: tm_clone.sh: Cloning >>>>> >>>>> >>>>> io-onebula02.initialone.net:/var/lib/one/images/8625d68b699fd30e64360471eb2c38fed47fcfb6 >>>>> >>>>> >>>>> >>>>> Thu Jul 7 23:06:09 2011 [TM][I]: tm_clone.sh: Executed "/usr/bin/scp >>>>> >>>>> >>>>> io-onebula02.initialone.net:/var/lib/one/images/8625d68b699fd30e64360471eb2c38fed47fcfb6 >>>>> >>>>> >>>>> localhost:/srv/cloud/one/var/41/images/disk.0". >>>>> Thu Jul 7 23:06:09 2011 [TM][I]: tm_clone.sh: Executed "/usr/bin/ssh >>>>> localhost chmod a+rw /srv/cloud/one/var/41/images/disk.0". >>>>> Thu Jul 7 23:06:24 2011 [TM][I]: tm_mkswap.sh: Creating 5120Mb >>>>> image in >>>>> /srv/cloud/one/var/41/images/disk.1 >>>>> Thu Jul 7 23:06:24 2011 [TM][I]: tm_mkswap.sh: Executed "/usr/bin/ssh >>>>> localhost mkdir -p /srv/cloud/one/var/41/images". >>>>> Thu Jul 7 23:06:24 2011 [TM][I]: tm_mkswap.sh: Executed "/usr/bin/ssh >>>>> localhost /bin/dd if=/dev/zero of=/srv/cloud/one/var/41/images/disk.1 >>>>> bs=1 count=1 seek=5120M". >>>>> Thu Jul 7 23:06:24 2011 [TM][I]: tm_mkswap.sh: Initializing swap >>>>> space >>>>> Thu Jul 7 23:06:25 2011 [TM][I]: tm_mkswap.sh: Executed "/usr/bin/ssh >>>>> localhost /sbin/mkswap /srv/cloud/one/var/41/images/disk.1". >>>>> Thu Jul 7 23:06:25 2011 [TM][I]: tm_mkswap.sh: Executed "/usr/bin/ssh >>>>> localhost chmod a+w /srv/cloud/one/var/41/images/disk.1". >>>>> Thu Jul 7 23:06:53 2011 [TM][I]: tm_mkimage.sh: Executed >>>>> "/usr/bin/ssh >>>>> localhost mkdir -p /srv/cloud/one/var/41/images". >>>>> Thu Jul 7 23:06:53 2011 [TM][I]: tm_mkimage.sh: Executed >>>>> "/usr/bin/ssh >>>>> localhost /bin/dd if=/dev/zero of=/srv/cloud/one/var/41/images/disk.2 >>>>> bs=1 count=1 seek=4096M". >>>>> Thu Jul 7 23:06:53 2011 [TM][I]: tm_mkimage.sh: Executed >>>>> "/usr/bin/ssh >>>>> localhost /sbin/mkfs -t ext3 -F /srv/cloud/one/var/41/images/disk.2". >>>>> Thu Jul 7 23:06:53 2011 [TM][I]: tm_mkimage.sh: Executed >>>>> "/usr/bin/ssh >>>>> localhost chmod a+rw /srv/cloud/one/var/41/images/disk.2". >>>>> Thu Jul 7 23:06:53 2011 [LCM][I]: New VM state is BOOT >>>>> Thu Jul 7 23:06:53 2011 [VMM][I]: Generating deployment file: >>>>> /var/lib/one/41/deployment.0 >>>>> Thu Jul 7 23:07:25 2011 [LCM][I]: New VM state is RUNNING >>>>> >>>>> >>>>> Here's my network file (networkrange.net): >>>>> >>>>> # define the virtual network vm_lan.template: >>>>> >>>>> NAME = "VM LAN" >>>>> >>>>> TYPE = RANGED >>>>> >>>>> >>>>> BRIDGE = virbr0 >>>>> >>>>> NETWORK_ADDRESS = 192.168.122.128 >>>>> >>>>> >>>>> NETWORK_SIZE = 126 >>>>> >>>>> NETMASK = 255.255.255.0 >>>>> >>>>> >>>>> GATEWAY = 192.168.2.1 >>>>> >>>>> NS = 8.8.8.8 # ip of frontend >>>>> >>>>> >>>>> >>>>> and here's my image file (image.one): >>>>> >>>>> >>>>> >>>>> NAME = ttylinux >>>>> >>>>> >>>>> PATH = "/var/lib/one/images/ttylinux.img" >>>>> >>>>> TYPE = OS >>>>> >>>>> >>>>> >>>>> >>>>> Please help me anyway you can, if you do not have time, please let me >>>>> know if there is anyone else I can contact. >>>>> >>>>> >>>>> Thank you. >>>>> >>>>> >>>>> >>>>> -Leo >>>>> _______________________________________________ >>>>> Users mailing list >>>>> Users@lists.opennebula.org >>>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org >>>>> >>> >>> > > _______________________________________________ > Users mailing list > Users@lists.opennebula.org > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org -- Héctor Sanjuán OpenNebula Sunstone Developer _______________________________________________ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org