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:
parent
bef1d230b3
commit
45f86393ac
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user