1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-19 06:50:07 +03:00

bug #1473: Pick last deployment file

This commit is contained in:
Tino Vazquez 2012-09-20 18:29:49 +02:00
parent bef1d230b3
commit 45f86393ac

View File

@ -176,9 +176,11 @@ class VMwareDriver
# ------------------------------------------------------------------------ #
def restore(checkpoint)
begin
vm_folder=VAR_LOCATION + "/" + File.basename(File.dirname(checkpoint))
last_deployment_file=`ls -1 #{vm_folder}/deployment*|tail -1`
# Define the VM
dfile = VAR_LOCATION + "/" +
File.basename(File.dirname(checkpoint)) + "/deployment.0"
dfile = vm_folder + "/" + last_deployment_file
rescue => e
OpenNebula.log_error("Cannot open checkpoint #{e.message}")
exit -1