fog / fog-vsphere

Fog for vSphere
MIT License
36 stars 63 forks source link

vm_clone: ERROR if options['volumes'] is not specified #169

Closed manchiu closed 6 years ago

manchiu commented 6 years ago

I would like to follow the exact hardware volume settings of the template while cloning a new VM. However, if I do not specify the options['volumes'], ERROR throws. Is it possible to check the existence of the options['volumes'] before entering the method of relocate_template_volumes_specs? Thanks!

Below are the ERROR backtrace:

/usr/local/bundle/gems/fog-vsphere-2.4.0/lib/fog/vsphere/requests/compute/vm_clone.rb:814:in `relocate_template_volumes_specs'
/usr/local/bundle/gems/fog-vsphere-2.4.0/lib/fog/vsphere/requests/compute/vm_clone.rb:634:in `vm_clone'
timogoebel commented 6 years ago

@manchiu: Do you mind sending a PR? I have the impression you pretty much know how to fix this.

manchiu commented 6 years ago

@timogoebel . I have sent a PR. Please check. Thanks!