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

Correct the handling of the power_on option

This commit is contained in:
Karan Misra 2012-09-21 11:15:58 +05:30
parent ae9c353ebe
commit 5287e8b0fb

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