[one-users] ESXi 4.1 and persistent images
Håkan Isaksson
hakan.isaksson at init.se
Wed Dec 7 11:40:01 PST 2011
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20111207/9600a6cb/attachment-0001.htm>
More information about the Users
mailing list