Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Add basic RelocateVM support (aka storage vMotion) #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions lib/rvc/modules/vm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,24 @@ def migrate vms, opts
end


opts :relocate do
summary "Relocate a VM"
arg :vm, nil, :lookup => VIM::VirtualMachine, :multi => true
opt :pool, "Resource pool", :short => 'p', :type => :string, :lookup => VIM::ResourcePool
opt :host, "Host", :short => 'o', :type => :string, :lookup => VIM::HostSystem
opt :datastore, "Datastore", :short => 'd', :type => :string, :lookup => VIM::Datastore
end

def relocate vms, opts
tasks vms, :RelocateVM, :spec => {
:pool => opts[:pool],
:host => opts[:host],
:datastore => opts[:datastore]
},
:priority => :defaultPriority
end


opts :clone do
summary "Clone a VM"
arg :src, nil, :lookup => VIM::VirtualMachine
Expand Down