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

F #~: keep VM in same folder and not change PR (#715)

Signed-off-by: Carlos Herrera <cherrera@opennebula.io>
This commit is contained in:
Carlos J. Herrera 2021-01-27 07:56:23 -05:00 committed by GitHub
parent 0f31068bfd
commit efe2f95e50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3120,10 +3120,14 @@ module VCenterDriver
if datastore
relocate_spec_params = {
:pool => resourcepool,
:folder => @item.parent,
:datastore => datastore
}
unless config[:same_host]
relocate_spec_params[:pool] = resourcepool
end
if config[:esx_migration_list].is_a?(String)
if config[:esx_migration_list]==''
relocate_spec_params[:host] =
@ -3146,9 +3150,16 @@ module VCenterDriver
:priority => 'defaultPriority'
).wait_for_completion
else
@item.MigrateVM_Task(
:pool=> resourcepool,
migrate_spec_params = {
:priority => 'defaultPriority'
}
unless config[:same_host]
migrate_spec_params[:pool] = resourcepool
end
@item.MigrateVM_Task(
migrate_spec_params
).wait_for_completion
end
rescue StandardError => e
@ -3345,6 +3356,8 @@ module VCenterDriver
config = { :cluster => vc_host }
config[:same_host] = src_id == dst_id
config[:datastore] = datastore if datastore
if hot_ds
config[:esx_migration_list] =