<p>Hi,<br>I'm trying out opennebula-3.0.0 with the vmware-3.0.0 driver, and ESXi 4.1<br>it's mostly working well, but I have a problem with persistent images.<br><br>Starting a persistent vm works well, shutdown also works (the first time),<br>
but
 the problem is that it tries to save the directory 
/src/clod/one/var/<vm>/disk.0 back to the image repository on 
shutdown,<br>and those files causes the save to fail the next time anyone instantiate and shutdown again on that image.<br><br>I have looked at /srv/cloud/one/var/remotes/image/fs/mv that is called when shutting down<br>
and it seems to me that the script does not detect that the image<br>is symlinked because it's looking at the directory instead of the symlinked files.<br>(as in vmware-2.98 which could not even start a persistent image because of how ESXi treats linked directories).<br>
<br>I changed this part.<br><br>*)<br>    log "Moving local image $SRC to the image repository"<br>    if [ \( -L $SRC \) -a \( "`$READLINK $SRC`" = "$DST" \) ] ; then<br>       log "Not moving files to image repo, they are the same"<br>
    else<br>       exec_and_log "mv -f $SRC $DST" "Could not move $SRC to $DST"<br>    fi<br>    ;;<br>esac<br><br>exec_and_log "chmod 0660 $DST"<br><br>to:</p>
<br>*)<br>    log "Moving local image $SRC to the image repository"<br>    if [ \( -L $SRC/disk.vmdk \) -a \( "`$READLINK -f $SRC/disk.vmdk`" = "$DST/disk.vmdk" \) ] ; then<br>       log "Not moving files to image repo, they are the same"<br>
    else<br>       exec_and_log "mv -f $SRC $DST" "Could not move $SRC to $DST"<br>    fi<br>    ;;<br>esac<br><br>#exec_and_log "chmod 0660 $DST"<br>test -f "$DST" && exec_and_log "chmod 0660 $DST"<br>
test -d "$DST" && exec_and_log "chmod 0770 $DST"<br><br>Which seems to work fine for me.<br><br>Is this a valid way to fix the problem? Or have i misunderstood what the "-L" check is supposed to do?<br>
<br>Also note that readlink command needs the "-f" flag on my system (Redhat) to properly return the path the link points to.<br><br>I'm planning to upgrade to opennebula-3.2 as soon as it is out, <br>but looking at the code it seems to also have this issue?<br>
<br><br>mvh Håkan Isaksson