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

Update virtual_machine.rb

This commit is contained in:
Tino Vázquez 2019-01-31 10:13:27 +01:00 committed by GitHub
parent 0616fb78fe
commit 3322f36714
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2931,6 +2931,12 @@ class VirtualMachine < VCenterDriver::Template
return one_vm
end
# Migrate a VM to another cluster and/or datastore
# @params [int] vm_id ID of the VM to be migrated
# params [String] src_host Name of the source cluster
# params [String] dst_host Name of the target cluster
# params [Bool] hot_ds Wether this is a DS migration with the VM running or not
# params [int] Destination datastore ID
def self.migrate_routine(vm_id, src_host, dst_host, hot_ds = false, ds = nil)
one_client = OpenNebula::Client.new
pool = OpenNebula::HostPool.new(one_client)