Class: Packer::Builder::VMWareISO
Constant Summary
AMAZON_EBS, AMAZON_INSTANCE, DOCKER, NULL, VALID_BUILDER_TYPES, VIRTUALBOX_ISO, VMWARE_ISO, VMWARE_VMX
Instance Attribute Summary
#communicators
Attributes inherited from DataObject
#data, #key_dependencies, #required
Instance Method Summary
collapse
#communicator, get_builder, #name, #ssh_bastion_host, #ssh_bastion_password, #ssh_bastion_private_key_file, #ssh_bastion_username, #ssh_disable_agent, #ssh_handshake_attempts, #ssh_host, #ssh_password, #ssh_port, #ssh_private_key_file, #ssh_pty, #ssh_timeout, #ssh_username, types, #winrm_host, #winrm_password, #winrm_port, #winrm_timeout, #winrm_username
Methods inherited from DataObject
#__add_array_of_array_of_strings, #__add_array_of_hashes, #__add_array_of_ints, #__add_array_of_strings, #__add_boolean, #__add_hash, #__add_integer, #__add_json, #__add_string, #__exclusive_key_error, #add_key_dependencies, #add_required, #deep_copy, #validate, #validate_key_dependencies, #validate_required
Constructor Details
Returns a new instance of VMWareISO.
8
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/packer/builders/vmware_iso.rb', line 8
def initialize
super
self.data['type'] = VMWARE_ISO
self.add_required(
'iso_checksum',
'iso_checksum_type',
'iso_url',
'communicator'
)
self.communicators = %w(none ssh winrm)
end
|
Instance Method Details
#boot_command(commands) ⇒ Object
36
37
38
|
# File 'lib/packer/builders/vmware_iso.rb', line 36
def boot_command(commands)
self.__add_array_of_strings('boot_command', commands)
end
|
#boot_wait(time) ⇒ Object
40
41
42
|
# File 'lib/packer/builders/vmware_iso.rb', line 40
def boot_wait(time)
self.__add_string('boot_wait',time)
end
|
#disk_size(megabytes) ⇒ Object
44
45
46
|
# File 'lib/packer/builders/vmware_iso.rb', line 44
def disk_size(megabytes)
self.__add_integer('disk_size', megabytes)
end
|
#disk_type_id(tid) ⇒ Object
0 - create a growable virtual disk contained in a single file (monolithic sparse). 1 - create a growable virtual disk split into 2GB files (split sparse). 2 - create a preallocated virtual disk contained in a single file (monolithic flat). 3 - create a preallocated virtual disk split into 2GB files (split flat). 4 - create a preallocated virtual disk compatible with ESX server (VMFS flat). 5 - create a compressed disk optimized for streaming.
54
55
56
|
# File 'lib/packer/builders/vmware_iso.rb', line 54
def disk_type_id(tid)
self.__add_string('disk_type_id',tid)
end
|
#floppy_files(files) ⇒ Object
58
59
60
|
# File 'lib/packer/builders/vmware_iso.rb', line 58
def floppy_files(files)
self.__add_array_of_strings('floppy_files', files)
end
|
#fusion_app_path(app_path) ⇒ Object
62
63
64
|
# File 'lib/packer/builders/vmware_iso.rb', line 62
def fusion_app_path(app_path)
self.__add_string('fusion_app_path',app_path)
end
|
#guest_os_type(ostype) ⇒ Object
66
67
68
|
# File 'lib/packer/builders/vmware_iso.rb', line 66
def guest_os_type(ostype)
self.__add_string('guest_os_type', ostype)
end
|
#headless(bool) ⇒ Object
70
71
72
|
# File 'lib/packer/builders/vmware_iso.rb', line 70
def headless(bool)
self.__add_boolean('headless', bool)
end
|
#http_directory(directory) ⇒ Object
74
75
76
|
# File 'lib/packer/builders/vmware_iso.rb', line 74
def http_directory(directory)
self.__add_string('http_directory', directory)
end
|
#http_port_max(port_number) ⇒ Object
82
83
84
|
# File 'lib/packer/builders/vmware_iso.rb', line 82
def http_port_max(port_number)
self.__add_integer('http_port_max', port_number)
end
|
#http_port_min(port_number) ⇒ Object
78
79
80
|
# File 'lib/packer/builders/vmware_iso.rb', line 78
def http_port_min(port_number)
self.__add_integer('http_port_min', port_number)
end
|
#iso_checksum(checksum) ⇒ Object
20
21
22
|
# File 'lib/packer/builders/vmware_iso.rb', line 20
def iso_checksum(checksum)
self.__add_string('iso_checksum', checksum)
end
|
#iso_checksum_type(type) ⇒ Object
24
25
26
|
# File 'lib/packer/builders/vmware_iso.rb', line 24
def iso_checksum_type(type)
self.__add_string('iso_checksum_type', type)
end
|
#iso_url(url) ⇒ Object
28
29
30
|
# File 'lib/packer/builders/vmware_iso.rb', line 28
def iso_url(url)
self.__add_string('iso_url', url, %w[iso_urls])
end
|
#iso_urls(urls) ⇒ Object
32
33
34
|
# File 'lib/packer/builders/vmware_iso.rb', line 32
def iso_urls(urls)
self.__add_array_of_strings('iso_urls', urls, %[iso_url])
end
|
#output_directory(directory) ⇒ Object
86
87
88
|
# File 'lib/packer/builders/vmware_iso.rb', line 86
def output_directory(directory)
self.__add_string('output_directory', directory)
end
|
#remote_cache_datastore(cache) ⇒ Object
90
91
92
|
# File 'lib/packer/builders/vmware_iso.rb', line 90
def remote_cache_datastore(cache)
self.__add_string('remote_cache_datastore', cache)
end
|
#remote_cache_directory(cache_directory) ⇒ Object
94
95
96
|
# File 'lib/packer/builders/vmware_iso.rb', line 94
def remote_cache_directory(cache_directory)
self.__add_string('remote_cache_directory', cache_directory)
end
|
#remote_datastore(datastore) ⇒ Object
98
99
100
|
# File 'lib/packer/builders/vmware_iso.rb', line 98
def remote_datastore(datastore)
self.__add_string('remote_datastore', datastore)
end
|
#remote_host(host) ⇒ Object
102
103
104
|
# File 'lib/packer/builders/vmware_iso.rb', line 102
def remote_host(host)
self.__add_string('remote_host', host)
end
|
#remote_password(passwd) ⇒ Object
106
107
108
|
# File 'lib/packer/builders/vmware_iso.rb', line 106
def remote_password(passwd)
self.__add_string('remote_password', passwd)
end
|
#remote_type(typ) ⇒ Object
110
111
112
|
# File 'lib/packer/builders/vmware_iso.rb', line 110
def remote_type(typ)
self.__add_string('remote_type', typ)
end
|
#remote_username(username) ⇒ Object
114
115
116
|
# File 'lib/packer/builders/vmware_iso.rb', line 114
def remote_username(username)
self.__add_string('remote_username', username)
end
|
#shutdown_command(command) ⇒ Object
118
119
120
|
# File 'lib/packer/builders/vmware_iso.rb', line 118
def shutdown_command(command)
self.__add_string('shutdown_command', command)
end
|
#shutdown_timeout(time) ⇒ Object
122
123
124
|
# File 'lib/packer/builders/vmware_iso.rb', line 122
def shutdown_timeout(time)
self.__add_string('shutdown_timeout', time)
end
|
#skip_compaction(bool) ⇒ Object
126
127
128
|
# File 'lib/packer/builders/vmware_iso.rb', line 126
def skip_compaction(bool)
self.__add_boolean('skip_compaction', bool)
end
|
130
131
132
|
# File 'lib/packer/builders/vmware_iso.rb', line 130
def tools_upload_flavor(flavor)
self.__add_string('tools_upload_flavor', flavor)
end
|
134
135
136
|
# File 'lib/packer/builders/vmware_iso.rb', line 134
def tools_upload_path(path)
self.__add_string('tools_upload_path', path)
end
|
#version(version) ⇒ Object
138
139
140
|
# File 'lib/packer/builders/vmware_iso.rb', line 138
def version(version)
self.__add_string('version', version)
end
|
#vm_name(name) ⇒ Object
142
143
144
|
# File 'lib/packer/builders/vmware_iso.rb', line 142
def vm_name(name)
self.__add_string('vm_name', name)
end
|
#vmdk_name(name) ⇒ Object
146
147
148
|
# File 'lib/packer/builders/vmware_iso.rb', line 146
def vmdk_name(name)
self.__add_string('vmdk_name', name)
end
|
#vmx_data(data) ⇒ Object
150
151
152
|
# File 'lib/packer/builders/vmware_iso.rb', line 150
def vmx_data(data)
self.__add_hash('vmx_data', data)
end
|
#vmx_data_post(data) ⇒ Object
154
155
156
|
# File 'lib/packer/builders/vmware_iso.rb', line 154
def vmx_data_post(data)
self.__add_hash('vmx_data_post', data)
end
|
#vmx_template_path(path) ⇒ Object
158
159
160
|
# File 'lib/packer/builders/vmware_iso.rb', line 158
def vmx_template_path(path)
self.__add_string('vmx_template_path', path)
end
|
#vnc_port_max(port) ⇒ Object
166
167
168
|
# File 'lib/packer/builders/vmware_iso.rb', line 166
def vnc_port_max(port)
self.__add_integer('vnc_port_max', port)
end
|
#vnc_port_min(port) ⇒ Object
162
163
164
|
# File 'lib/packer/builders/vmware_iso.rb', line 162
def vnc_port_min(port)
self.__add_integer('vnc_port_min', port)
end
|