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