1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

Fix bug with HISTORY record

This commit is contained in:
Sergio Vega 2019-01-09 12:26:22 -06:00
parent 5bea16ccc4
commit 6b69f4da4c

View File

@ -45,7 +45,7 @@ begin
one_client = OpenNebula::Client.new
vm = OpenNebula::VirtualMachine.new_with_id(vmid, one_client)
vm.info
src_ds = vm.to_hash["VM"]["HISTORY_RECORDS"]["HISTORY"].last["DS_ID"]
src_ds = vm.to_hash["VM"]["HISTORY_RECORDS"]["HISTORY"][-2]["DS_ID"]
if src_ds == dsid
VCenterDriver::VirtualMachine.migrate_routine(vmid, host_orig, host_dest)