1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Merge pull request #1163 from kid0m4n/vsphere_power_on

Correct the handling of the power_on option for vsphere clone_vm request
This commit is contained in:
Wesley Beary 2012-09-25 09:39:58 -07:00
commit f5d9980c6b

View file

@ -123,7 +123,7 @@ module Fog
end
# And the clone specification
clone_spec = RbVmomi::VIM.VirtualMachineCloneSpec(:location => relocation_spec,
:powerOn => options['power_on'] || true,
:powerOn => options.has_key?('power_on') ? options['power_on'] : true,
:template => false)
task = vm_mob_ref.CloneVM_Task(:folder => vm_mob_ref.parent, :name => options['name'], :spec => clone_spec)
# Waiting for the VM to complete allows us to get the VirtulMachine