veewee-to-packer 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -178,6 +178,31 @@ module VeeweeToPacker
|
|
178
178
|
end
|
179
179
|
end
|
180
180
|
|
181
|
+
# Handle virtualbox specific options
|
182
|
+
# these are all virtualbox flags
|
183
|
+
if input[:virtualbox]
|
184
|
+
virtualbox = input.delete(:virtualbox).dup
|
185
|
+
|
186
|
+
if virtualbox[:vm_options]
|
187
|
+
virtualbox_flags = virtualbox.delete(:vm_options)
|
188
|
+
if !virtualbox_flags[0].nil?
|
189
|
+
virtualbox_flags[0].each do |key, value|
|
190
|
+
builder["vboxmanage"] << [
|
191
|
+
"modifyvm", "{{.Name}}",
|
192
|
+
"--#{key}",
|
193
|
+
"#{value}"
|
194
|
+
]
|
195
|
+
end
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
if !virtualbox.empty?
|
200
|
+
virtualbox.each do |key, _|
|
201
|
+
warnings << "Unsupported virtualbox option: #{key}"
|
202
|
+
end
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
181
206
|
# These are unused, so just ignore them.
|
182
207
|
input.delete(:disk_format)
|
183
208
|
input.delete(:hostiocache)
|
@@ -187,6 +212,7 @@ module VeeweeToPacker
|
|
187
212
|
input.delete(:iso_file)
|
188
213
|
input.delete(:ssh_host_port)
|
189
214
|
input.delete(:ssh_key)
|
215
|
+
input.delete(:vmfusion)
|
190
216
|
|
191
217
|
if input.length > 0
|
192
218
|
raise Error, "Unknown keys: #{input.keys.sort.inspect}"
|
@@ -161,6 +161,26 @@ module VeeweeToPacker
|
|
161
161
|
builder["vmx_data"]["cpuid.coresPerSocket"] = "1"
|
162
162
|
end
|
163
163
|
|
164
|
+
# Handle VMware Fusion specific settings
|
165
|
+
# Only relevant setting is enable_hypervisor_support while turns on vhv
|
166
|
+
if input[:vmfusion]
|
167
|
+
vmfusion = input.delete(:vmfusion).dup
|
168
|
+
|
169
|
+
if vmfusion[:vm_options]
|
170
|
+
options = vmfusion.delete(:vm_options)
|
171
|
+
|
172
|
+
if options["enable_hypervisor_support"]
|
173
|
+
builder["vmx_data"]["vhv.enable"] = options.delete("enable_hypervisor_support")
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
if vmfusion.length > 0
|
178
|
+
vmfusion.each do |key, _|
|
179
|
+
warnings << "Unsupported vmfusion key: #{key}"
|
180
|
+
end
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
164
184
|
# These are unused, so just ignore them.
|
165
185
|
input.delete(:disk_format)
|
166
186
|
input.delete(:ioapic)
|
@@ -172,6 +192,7 @@ module VeeweeToPacker
|
|
172
192
|
input.delete(:pae)
|
173
193
|
input.delete(:ssh_host_port)
|
174
194
|
input.delete(:ssh_key)
|
195
|
+
input.delete(:virtualbox)
|
175
196
|
|
176
197
|
if input.length > 0
|
177
198
|
raise Error, "Uknown keys: #{input.keys.sort.inspect}"
|
data/lib/veewee-to-packer.rb
CHANGED
@@ -106,6 +106,11 @@ module VeeweeToPacker
|
|
106
106
|
warnings << ":params are not supported by Packer."
|
107
107
|
end
|
108
108
|
|
109
|
+
if definition[:kvm]
|
110
|
+
definition.delete(:kvm)
|
111
|
+
warnings << ":kvm not supported by Packer."
|
112
|
+
end
|
113
|
+
|
109
114
|
# Build the builders
|
110
115
|
template["builders"] = builders.map do |builder|
|
111
116
|
config, build_warnings = builder.convert(definition.dup, input_dir, output)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: veewee-to-packer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-03 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Converts Veewee templates to Packer templates.
|
15
15
|
email:
|