Last active
December 17, 2019 17:16
-
-
Save chris1984/46ee6287452267893f10ed8a2cda58d8 to your computer and use it in GitHub Desktop.
vm-clone.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/models/compute_resources/foreman/model/vmware.rb b/app/models/compute_resources/foreman/model/vmware.rb | |
index 58b6d9c..5bd8df3 100644 | |
--- a/app/models/compute_resources/foreman/model/vmware.rb | |
+++ b/app/models/compute_resources/foreman/model/vmware.rb | |
@@ -447,10 +447,14 @@ module Foreman::Model | |
args = parse_networks(args) | |
args = args.with_indifferent_access | |
if args[:provision_method] == 'image' | |
+ Rails.logger.error "VMW: args #{args.inspect}" | |
clone_vm(args) | |
else | |
+ Rails.logger.error "VMW: args #{args.inspect}" | |
vm = new_vm(args) | |
vm.firmware = 'bios' if vm.firmware == 'automatic' | |
+ Rails.logger.error "VMW: vm attributes #{vm.attributes.inspect}" | |
+ Rails.logger.error "VMW: vm volumes #{vm.volumes.inspect}" | |
vm.save | |
end | |
rescue Fog::Compute::Vsphere::NotFound => e |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment