knife-xapi 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/chef/knife/xapi_guest_create.rb +5 -3
- data/lib/knife-xapi/version.rb +1 -1
- metadata +1 -1
@@ -101,7 +101,7 @@ class Chef
|
|
101
101
|
ui.msg "Setting Install Repo: #{h.color(repo,:bold, :cyan)}"
|
102
102
|
xapi.VM.set_other_config(vm_ref, { "install-repository" => repo } )
|
103
103
|
|
104
|
-
cpus = Chef::Config[:knife][:xapi_cpus] || 2
|
104
|
+
cpus = Chef::Config[:knife][:xapi_cpus].to_s || "2"
|
105
105
|
xapi.VM.set_VCPUs_max( vm_ref, cpus )
|
106
106
|
xapi.VM.set_VCPUs_at_startup( vm_ref, cpus )
|
107
107
|
|
@@ -116,7 +116,7 @@ class Chef
|
|
116
116
|
#
|
117
117
|
boot_args = Chef::Config[:knife][:xapi_kernel_params] || "graphical utf8"
|
118
118
|
# if no hostname param set hostname to given vm name
|
119
|
-
boot_args << "hostname=#{server_name}" unless boot_args.match(/hostname=.+\s?/)
|
119
|
+
boot_args << " hostname=#{server_name}" unless boot_args.match(/hostname=.+\s?/)
|
120
120
|
ui.msg "Setting Boot Args: #{h.color boot_args, :cyan}"
|
121
121
|
xapi.VM.set_PV_args( vm_ref, boot_args )
|
122
122
|
|
@@ -164,7 +164,9 @@ class Chef
|
|
164
164
|
|
165
165
|
rescue Exception => e
|
166
166
|
ui.msg "#{h.color 'ERROR:'} #{h.color( e.message, :red )}"
|
167
|
-
|
167
|
+
# have to use join here to pass a string to highline
|
168
|
+
puts "Nested backtrace:"
|
169
|
+
ui.msg "#{h.color( e.backtrace.join("\n"), :yellow)}"
|
168
170
|
|
169
171
|
cleanup(vm_ref)
|
170
172
|
end
|
data/lib/knife-xapi/version.rb
CHANGED