Hi,<br><br>I am using OpenNebula 1.4 and Haizea 1.0. I want to predeploy an image so that the VM could start at the scheduled by haizea time.<br>How can I predeploy a VM's image? I would appreciate clarification.<br><br>
I had several ideas how to make it work but I didn't succeed.<br>1. I tried to copy a prepared image to the default directory (/var/lib/one/<VM-id>/images/) in which it should be stored when a new VM is created.<br>
2. Then I tried to do the same and to create transfer.0.prolog file (after reading one of the generated by opennebula) but it didn't work.<br>3. I tried even set the source in DISK section in VM template to the copied file in the destination.<br>
However, everytime I can see in VM log, that the image is copied.<br><br>I am enclosing VM log and VM template <br>Tue Apr 12 19:46:59 2011 [DiM][I]: New VM state is ACTIVE.<br>Tue Apr 12 19:46:59 2011 [LCM][I]: New VM state is PROLOG.<br>
Tue Apr 12 19:48:44 2011 [TM][I]: tm_clone.sh: debian:/var/lib/one/50/images/disk.0 194.29.169.42:/var/lib/one//50/images/disk.0<br>Tue Apr 12 19:48:44 2011 [TM][I]: tm_clone.sh: DST: /var/lib/one//50/images/disk.0<br>Tue Apr 12 19:48:44 2011 [TM][I]: tm_clone.sh: Creating directory /var/lib/one//50/images<br>
Tue Apr 12 19:48:44 2011 [TM][I]: tm_clone.sh: Executed "ssh 194.29.169.42 mkdir -p /var/lib/one//50/images".<br>Tue Apr 12 19:48:44 2011 [TM][I]: tm_clone.sh: Cloning debian:/var/lib/one/50/images/disk.0<br>Tue Apr 12 19:48:44 2011 [TM][I]: tm_clone.sh: Executed "scp debian:/var/lib/one/50/images/disk.0 194.29.169.42:/var/lib/one//50/images/disk.0".<br>
Tue Apr 12 19:48:44 2011 [TM][I]: tm_clone.sh: Executed "ssh 194.29.169.42 chmod a+w /var/lib/one//50/images/disk.0".<br>Tue Apr 12 19:48:46 2011 [TM][I]: tm_mkswap.sh: Creating 1024Mb image in /var/lib/one//50/images/disk.1<br>
Tue Apr 12 19:48:46 2011 [TM][I]: tm_mkswap.sh: Executed "ssh 194.29.169.42 mkdir -p /var/lib/one//50/images".<br>Tue Apr 12 19:48:46 2011 [TM][I]: tm_mkswap.sh: Executed "ssh 194.29.169.42 dd if=/dev/zero of=/var/lib/one//50/images/disk.1 bs=1 count=1 seek=1024M".<br>
Tue Apr 12 19:48:46 2011 [TM][I]: tm_mkswap.sh: Initializing swap space<br>Tue Apr 12 19:48:46 2011 [TM][I]: tm_mkswap.sh: Executed "ssh 194.29.169.42 /sbin/mkswap /var/lib/one//50/images/disk.1".<br>Tue Apr 12 19:48:46 2011 [TM][I]: tm_mkswap.sh: Executed "ssh 194.29.169.42 chmod a+w /var/lib/one//50/images/disk.1".<br>
Tue Apr 12 19:48:46 2011 [TM][I]: tm_context.sh: Executed "mkdir -p /var/c8f990f3e542b79b3bb691c6c20a2684/isofiles".<br>Tue Apr 12 19:48:46 2011 [TM][I]: tm_context.sh: Executed "cp -R /var/lib/one/50/context.sh /var/c8f990f3e542b79b3bb691c6c20a2684/isofiles".<br>
Tue Apr 12 19:48:46 2011 [TM][I]: tm_context.sh: Executed "cp -R /srv/cloud/vm_contextualization/id_rsa.pub /var/c8f990f3e542b79b3bb691c6c20a2684/isofiles".<br>Tue Apr 12 19:48:46 2011 [TM][I]: tm_context.sh: Executed "cp -R /srv/cloud/vm_contextualization/init.sh /var/c8f990f3e542b79b3bb691c6c20a2684/isofiles".<br>
Tue Apr 12 19:48:46 2011 [TM][I]: tm_context.sh: Executed "mkisofs -o /var/c8f990f3e542b79b3bb691c6c20a2684/disk.2 -J -R /var/c8f990f3e542b79b3bb691c6c20a2684/isofiles".<br>Tue Apr 12 19:48:46 2011 [TM][I]: tm_context.sh: Executed "scp /var/c8f990f3e542b79b3bb691c6c20a2684/disk.2 194.29.169.42:/var/lib/one//50/images/disk.2".<br>
Tue Apr 12 19:48:46 2011 [TM][I]: tm_context.sh: Executed "rm -rf /var/c8f990f3e542b79b3bb691c6c20a2684".<br>Tue Apr 12 19:48:46 2011 [LCM][I]: New VM state is BOOT<br>Tue Apr 12 19:48:46 2011 [VMM][I]: Generating deployment file: /var/lib/one/50/deployment.0<br>
Tue Apr 12 19:48:52 2011 [LCM][I]: New VM state is RUNNING<br>Tue Apr 12 19:48:59 2011 [LCM][I]: New VM state is SHUTDOWN<br>Tue Apr 12 19:49:05 2011 [LCM][I]: New VM state is EPILOG<br>Tue Apr 12 19:49:07 2011 [TM][I]: tm_delete.sh: Deleting /var/lib/one//50/images<br>
Tue Apr 12 19:49:07 2011 [TM][I]: tm_delete.sh: Executed "ssh 194.29.169.42 rm -rf /var/lib/one//50/images".<br>Tue Apr 12 19:49:07 2011 [DiM][I]: New VM state is DONE<br><br><br><br><br>VM template<br>---------------------------------------------------------------<br>
NAME = debian-context<br><br>CPU = 1<br>MEMORY = 512<br><br># --- kernel & boot device ---<br><br>OS = [<br> kernel = "/boot/vmlinuz-2.6.32-5-xen-amd64",<br> initrd = "/boot/initrd.img-2.6.32-5-xen-amd64",<br>
root = "xvda2" ]<br><br>DISK = [<br> source = "/var/lib/one/50/images/disk.0",<br> target = "xvda2",<br> readonly = "no" ]<br><br>DISK = [<br> type = swap,<br> size = 1024,<br>
readonly = "no",<br> target = "xvda1" ]<br><br>NIC=[network="private"]<br><br>HAIZEA = [ start = "+00:01:10",<br> duration = "00:02:00",<br> preemptible = "no" ]<br>
<br><br><br><br><br>