Are you doing onevm shutdown? It should not go to the CLEANUP state
On Tue, Nov 27, 2012 at 2:25 PM, Roberto Rosende Dopazo <[email protected]>wrote: > Hi > > > El 27/11/12 13:58, Ruben S. Montero escribió: > > Hi, > > Just to add a few considerations: > > 1.- Save_as images are not created on the datastore, just an ID is > generated as a placeholder for the new image (this is the fstype: save_as). > So, it is normal that no image (actual path) is created after a save_as > operation, and the state is supposed to be locked (waiting for the real > image) as reported. I do not see any issue here. > > Ok, I understood that file was created at that moment. > > 2.- The save_as image is moved to the final destination when the VM is > shutdown, shutdown means onevm shutdown (delete or stop will not move the > image, for example). Could you send the output vm.log of the image after > the shutdown. You should look for messages about a MVDS command. > > The complete log for that machine, there is not MVDS message. From onevm > show image was created at REGISTER TIME : 11/27 11:36:26 > > [root@cloud one]# cat 138.log > Tue Nov 27 11:34:56 2012 [DiM][I]: New VM state is ACTIVE. > Tue Nov 27 11:34:56 2012 [LCM][I]: New VM state is PROLOG. > Tue Nov 27 11:34:56 2012 [VM][I]: Virtual Machine has no context > Tue Nov 27 11:34:58 2012 [TM][I]: clone: Cloning > /var/lib/one/datastores/100/3dfef6d01e7e624f13ef13698ed04710 in > nubacesga-01-4:/var/lib/one/datastores/0/138/disk.0 > Tue Nov 27 11:34:58 2012 [TM][I]: ExitCode: 0 > Tue Nov 27 11:35:18 2012 [TM][I]: mkimage: Making filesystem of 1024M and > type swap at nubacesga-01-4:/var/lib/one/datastores/0/138/disk.1 > Tue Nov 27 11:35:18 2012 [TM][I]: ExitCode: 0 > Tue Nov 27 11:35:18 2012 [LCM][I]: New VM state is BOOT > Tue Nov 27 11:35:18 2012 [VMM][I]: Generating deployment file: > /var/lib/one/138/deployment.0 > Tue Nov 27 11:35:18 2012 [VMM][I]: ExitCode: 0 > Tue Nov 27 11:35:18 2012 [VMM][I]: Successfully execute network driver > operation: pre. > Tue Nov 27 11:35:19 2012 [VMM][I]: ExitCode: 0 > Tue Nov 27 11:35:19 2012 [VMM][I]: Successfully execute virtualization > driver operation: deploy. > Tue Nov 27 11:35:19 2012 [VMM][I]: ExitCode: 0 > Tue Nov 27 11:35:19 2012 [VMM][I]: Successfully execute network driver > operation: post. > Tue Nov 27 11:35:19 2012 [LCM][I]: New VM state is RUNNING > Tue Nov 27 11:38:01 2012 [LCM][I]: New VM state is CLEANUP. > Tue Nov 27 11:38:01 2012 [DiM][I]: New VM state is DONE > Tue Nov 27 11:38:01 2012 [VMM][W]: Ignored: LOG I 138 Driver command for > 138 cancelled > Tue Nov 27 11:38:01 2012 [TM][W]: Ignored: LOG I 138 ExitCode: 0 > Tue Nov 27 11:38:01 2012 [TM][W]: Ignored: LOG I 138 ExitCode: 0 > Tue Nov 27 11:38:01 2012 [TM][W]: Ignored: LOG I 138 delete: Deleting > /var/lib/one/datastores/0/138 > Tue Nov 27 11:38:01 2012 [TM][W]: Ignored: LOG I 138 ExitCode: 0 > Tue Nov 27 11:38:01 2012 [TM][W]: Ignored: TRANSFER SUCCESS 138 - > Tue Nov 27 11:38:01 2012 [VMM][W]: Ignored: LOG I 138 ExitCode: 0 > Tue Nov 27 11:38:01 2012 [VMM][W]: Ignored: LOG I 138 Successfully execute > virtualization driver operation: cancel. > Tue Nov 27 11:38:01 2012 [VMM][W]: Ignored: LOG I 138 ExitCode: 0 > Tue Nov 27 11:38:01 2012 [VMM][W]: Ignored: LOG I 138 Successfully execute > network driver operation: clean. > Tue Nov 27 11:38:01 2012 [VMM][W]: Ignored: CANCEL SUCCESS 138 - > > Cheers > > Ruben > > > On Tue, Nov 27, 2012 at 12:41 PM, Roberto Rosende Dopazo < > [email protected]> wrote: > >> Hi, >> >> El 27/11/12 11:50, Javier Fontan escribió: >> >> Hi, >>> >>> I'm struggling to understand the situation you are describing. Correct >>> me if I am wrong. >>> >>> You mention dom0. Are you using Xen? If that is true disregard what I >>> said about changing dynamic_ownership parameter in libvirt as Xen >>> drivers do not use libvirt for hypervisor communication. >>> >> It's kvm image and dynamic_ownership was wrong because I misunderstood >> and put it to 1, now is 0 and owner and group is not changed. >> But option save as still doesn't work, I tried it directly from frontend >> shell instead SunStone and I got that: >> >> >> [grid@cloud ~]$ onevm show 138 >> VIRTUAL MACHINE 138 INFORMATION >> ID : 138 >> NAME : one-138 >> USER : emi >> GROUP : oneadmin >> STATE : ACTIVE >> LCM_STATE : RUNNING >> RESCHED : No >> HOST : nubacesga-01-4 >> START TIME : 11/27 11:34:32 >> END TIME : - >> DEPLOY ID : one-138 >> >> VIRTUAL MACHINE MONITORING >> USED MEMORY : 0K >> NET_RX : 0K >> USED CPU : 0 >> NET_TX : 0K >> >> PERMISSIONS >> OWNER : um- >> GROUP : --- >> OTHER : --- >> >> VIRTUAL MACHINE TEMPLATE >> CPU="1" >> DISK=[ >> BUS="virtio", >> CLONE="YES", >> CLUSTER_ID="100", >> DATASTORE="GRID EMC", >> DATASTORE_ID="100", >> DEV_PREFIX="hd", >> DISK_ID="0", >> DRIVER="qcow2", >> IMAGE="GRID SL6_emi_cream_orig", >> IMAGE_ID="11", >> READONLY="NO", >> SAVE="NO", >> SOURCE="/var/lib/one/datastores/100/3dfef6d01e7e624f13ef13698ed04710", >> TARGET="hda", >> TM_MAD="shared", >> TYPE="FILE" ] >> DISK=[ >> DEV_PREFIX="hd", >> DISK_ID="1", >> SIZE="1024", >> TARGET="hdb", >> TYPE="swap" ] >> GRAPHICS=[ >> KEYMAP="es", >> LISTEN="0.0.0.0", >> PORT="6038", >> TYPE="vnc" ] >> MEMORY="2512" >> NAME="one-138" >> NIC=[ >> BRIDGE="virbrPUBLIC", >> CLUSTER_ID="100", >> IP="193.144.35.36", >> MAC="02:00:c1:90:23:24", >> MODEL="e1000", >> NETWORK="red-193.144.35", >> NETWORK_ID="0", >> VLAN="NO" ] >> OS=[ >> ROOT="hda1" ] >> PRODUCT="EMI-test" >> REQUIREMENTS="CLUSTER_ID = 100" >> TEMPLATE_ID="6" >> VCPU="1" >> VMID="138" >> >> VIRTUAL MACHINE HISTORY >> SEQ HOST REASON START TIME PROLOG_TIME >> 0 nubacesga-01-4 none 11/27 11:34:56 0d 00h01m09s 0d >> 00h00m22s >> >> >> >> >> [grid@cloud ~]$ onevm saveas 138 0 changes01 >> Image ID: 31 >> >> >> >> [grid@cloud ~]$ oneimage list >> ID USER GROUP NAME DATASTORE SIZE TYPE PER STAT RVMS >> [...] >> 31 grid oneadmin changes01 GRID EMC 2.2G OS No lock 0 >> >> >> [grid@cloud ~]$ oneimage show 31 >> IMAGE 31 INFORMATION >> ID : 31 >> NAME : changes01 >> USER : grid >> GROUP : oneadmin >> DATASTORE : GRID EMC >> TYPE : OS >> REGISTER TIME : 11/27 11:36:26 >> PERSISTENT : No >> SOURCE : >> /var/lib/one/datastores/100/08cee146d8bff43c6c61794f1ba947d3 >> FSTYPE : save_as >> SIZE : 2.2G >> STATE : lock >> RUNNING_VMS : 0 >> >> PERMISSIONS >> OWNER : um- >> GROUP : --- >> OTHER : --- >> >> IMAGE TEMPLATE >> DEV_PREFIX="hd" >> SAVED_DISK_ID="0" >> SAVED_IMAGE_ID="11" >> SAVED_VM_ID="138" >> SAVE_AS="YES" >> >> >> >> From onevm help I understood that now it's supposed I have the file : >> >> saveas <vmid> <diskid> <img_name> >> Sets the specified VM disk to be saved in a new Image. The Image >> is >> created immediately, but the contents are saved only if the VM is >> shut down gracefully (i.e., using 'onevm shutdown' and not >> 'onevm delete') >> >> >> But it does not exist: >> [grid@cloud ~]$ file >> /var/lib/one/datastores/100/08cee146d8bff43c6c61794f1ba947d3 >> /var/lib/one/datastores/100/08cee146d8bff43c6c61794f1ba947d3: cannot open >> `/var/lib/one/datastores/100/08cee146d8bff43c6c61794f1ba947d3' (No such >> file or directory) >> >> After a shutdown file still does not exist but image is marked as READY >> >> [grid@cloud ~]$ oneimage list >> ID USER GROUP NAME DATASTORE SIZE TYPE PER STAT RVMS >> [...] >> 31 grid oneadmin changes01 GRID EMC 2.2G OS No rdy 0 >> >> >> And file doesn't exists anyway, from oned.log >> 492501-Tue Nov 27 11:36:26 2012 [ReM][D]: Req:5808 UID:0 AclInfo invoked >> 492502-Tue Nov 27 11:36:26 2012 [ReM][D]: Req:5808 UID:0 AclInfo result >> SUCCESS, "<ACL_POOL><ACL><ID>0..." >> 492503-Tue Nov 27 11:36:26 2012 [ReM][D]: Req:4608 UID:2 >> VirtualMachineSaveDisk invoked, 138, 0, "changes01", "" >> 492504-Tue Nov 27 11:36:26 2012 [ImM][I]: Creating disk at of 2216Mb >> (type: save_as) >> 492505-Tue Nov 27 11:36:26 2012 [ReM][D]: Req:4608 UID:2 >> VirtualMachineSaveDisk result SUCCESS, 31 >> 492506-Tue Nov 27 11:36:26 2012 [ImG][D]: Message received: LOG I 31 >> ExitCode: 0 >> 492507- >> 492508-Tue Nov 27 11:36:26 2012 [ImM][I]: ExitCode: 0 >> 492509:Tue Nov 27 11:36:26 2012 [ImG][D]: Message received: MKFS SUCCESS >> 31 /var/lib/one/datastores/100/08cee146d8bff43c6c61794f1ba947d3 >> 492510- >> >> >> Cheers, >> Roberto >> >> >> >> >> First line I see in the in the log file seems seriously broken: >>> >>> 426622-Mon Nov 26 14:06:42 2012 [ImM][I]: Creating disk at of 2216Mb >>> (type: save_as) >>> >>> It's not saying where it is creating the image (source in OpenNebula >>> parlance) and give an strange type. Could you please send us the VM >>> and Image templates from onevm and oneimage show? Maybe I am missing >>> something and other developers could help me here. >>> >>> I also see this line that says the image was created: >>> >>> 426627:Mon Nov 26 14:06:42 2012 [ImG][D]: Message received: MKFS >>> SUCCESS 25 /var/lib/one/datastores/100/a3e076f377a855dc76f44ac373c9b0ca >>> >>> But you are telling me that the image does not exist. Are you checking >>> the hypervisor node or the frontend? >>> >>> More comments inline >>> >>> >>> On Mon, Nov 26, 2012 at 2:33 PM, Roberto Rosende Dopazo >>> <[email protected]> wrote: >>> >>>> [...] >>>> After delete machine image state is showed as READY in Sunstone. >>>> In dom0 deployment dir and file are still present and disk files disk.0 >>>> and >>>> disk.1 have their user and group changed to root.root and image file >>>> doesn't >>>> exist >>>> A new file appears >>>> # file /var/lib/one/datastores/0/123/checkpoint >>>> /var/lib/one/datastores/0/123/checkpoint: data >>>> >>> This is really strange. After EPILOG (the state that comes after >>> successful shutdown, delete or cancel) the VM directory in the system >>> datastore is deleted, so those files should not be there. Also, then >>> only way OpeNebula tells Xen to create checkpoint is on SAVE, STOP or >>> MIGRATE. Are you sure that you have deleted the VM? It looks to me >>> that the image was suspended or stopped. Bear in mind that save_as is >>> not done in that state. >>> >>> Also with root.root but 666 file permission and in this case directory >>>> and >>>> files of this machine are never deleted from running datastore >>>> >>> The non deletion of images is consistent my the SAVE/STOP theory. >>> >>> Cheers >>> >>> -- >>> Javier Fontán Muiños >>> Project Engineer >>> OpenNebula - The Open Source Toolkit for Data Center Virtualization >>> www.OpenNebula.org | [email protected] | @OpenNebula >>> >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org >> > > > > -- > Ruben S. Montero, PhD > Project co-Lead and Chief Architect > OpenNebula - The Open Source Solution for Data Center Virtualization > www.OpenNebula.org | [email protected] | @OpenNebula > > > -- Ruben S. Montero, PhD Project co-Lead and Chief Architect OpenNebula - The Open Source Solution for Data Center Virtualization www.OpenNebula.org | [email protected] | @OpenNebula
_______________________________________________ Users mailing list [email protected] http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
