[one-users] ESXi 4.1 and persistent images

Tino Vazquez tinova at opennebula.org
Tue Dec 13 03:36:21 PST 2011


Dear Håkan,

Thanks a lot for your great feedback! This is indeed a bug, I've
opened a ticket to solve this issue [1]. It will be solved by the next
release.

Regards,

-Tino

[1] http://dev.opennebula.org/issues/1029

--
Constantino Vázquez Blanco, MSc
Project Engineer
OpenNebula - The Open Source Toolkit for Data Center Virtualization
www.OpenNebula.org | @tinova79 | @OpenNebula



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



More information about the Users mailing list