vagrant-vmware-esxi 2.4.5 → 2.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -1
- data/README.md +19 -4
- data/example_box/Vagrantfile +7 -0
- data/lib/vagrant-vmware-esxi/action/createvm.rb +21 -0
- data/lib/vagrant-vmware-esxi/action/esxi_password.rb +2 -1
- data/lib/vagrant-vmware-esxi/action/package.rb +1 -1
- data/lib/vagrant-vmware-esxi/action/read_state.rb +5 -1
- data/lib/vagrant-vmware-esxi/action.rb +5 -2
- data/lib/vagrant-vmware-esxi/config.rb +3 -1
- data/lib/vagrant-vmware-esxi/version.rb +1 -1
- data/vagrant-vmware-esxi.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40843e2fa14d0943afe5d7558f522f5838273d9da3dc6d48a872a99b8b04321f
|
4
|
+
data.tar.gz: a98c843764067f2e5f53c3b9e31accd87573844c06ae98e01b29293d92183b25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4e0feaa23ce650a034e100538c8935020337f1b977a597b33840e110704b9ba921906897a566bdb657b6e37150da0b067229bb47f3556c5691a1c9ae4e9d9d7
|
7
|
+
data.tar.gz: 348910b7e00ef358d11a9a34d5d788ca2ca3ed6c6bb1b2a0583257e507c333c0de41ab1171fc6d00aa0464d86e5d544fe3fa719789bc7200bbbc009ffa9afb26
|
data/Gemfile
CHANGED
@@ -15,7 +15,8 @@ source "https://rubygems.org"
|
|
15
15
|
group :development do
|
16
16
|
# Need to tag to 2.2.4, there is still a bug.
|
17
17
|
# https://github.com/hashicorp/vagrant/pull/10945
|
18
|
-
gem "vagrant", git: "https://github.com/hashicorp/vagrant.git", :tag => 'v2.2.4'
|
18
|
+
#gem "vagrant", git: "https://github.com/hashicorp/vagrant.git", :tag => 'v2.2.4'
|
19
|
+
gem "vagrant", git: "https://github.com/hashicorp/vagrant.git", :tag => 'v2.2.10'
|
19
20
|
end
|
20
21
|
|
21
22
|
group :plugins do
|
data/README.md
CHANGED
@@ -3,6 +3,7 @@ vagrant-vmware-esxi plugin
|
|
3
3
|
This is a Vagrant plugin that adds a VMware ESXi provider support. This allows Vagrant to control and provision VMs directly on an ESXi hypervisor without a need for vCenter or VShpere. ESXi hypervisor is a free download from VMware!
|
4
4
|
>https://www.vmware.com/go/get-free-esxi
|
5
5
|
|
6
|
+
|
6
7
|
Documentation:
|
7
8
|
-------------
|
8
9
|
Refer to the WIKI for documentation, examples and other information...
|
@@ -18,7 +19,6 @@ If you are using vagrant as a deployment tool (infra as code), you may want to c
|
|
18
19
|
>https://github.com/josenk/vagrant-vmware-esxi
|
19
20
|
|
20
21
|
|
21
|
-
|
22
22
|
Features and Compatibility
|
23
23
|
--------------------------
|
24
24
|
* Clone from VMs. (see wiki) Clone a VM on the ESXi host instead of transferring a box stored on your local pc.
|
@@ -42,6 +42,7 @@ Features and Compatibility
|
|
42
42
|
* Specify GuestOS types, virtual HW version.
|
43
43
|
* Any custom vmx settings can be added or modified.
|
44
44
|
|
45
|
+
|
45
46
|
Requirements
|
46
47
|
------------
|
47
48
|
1. This is a vagrant plugin, so you need vagrant installed... :-)
|
@@ -171,7 +172,6 @@ Vagrant.configure('2') do |config|
|
|
171
172
|
# OPTIONAL. When automatically naming VMs, use this prefix.
|
172
173
|
#esxi.guest_name_prefix = 'V-'
|
173
174
|
|
174
|
-
|
175
175
|
# OPTIONAL. Set the guest username login. The default is 'vagrant'.
|
176
176
|
#esxi.guest_username = 'vagrant'
|
177
177
|
|
@@ -215,13 +215,17 @@ Vagrant.configure('2') do |config|
|
|
215
215
|
#esxi.guest_snapshot_quiesced = 'true'
|
216
216
|
|
217
217
|
# RISKY. guest_guestos
|
218
|
-
# https://github.com/josenk/vagrant-vmware-esxi/
|
218
|
+
# https://github.com/josenk/vagrant-vmware-esxi/wiki/VMware-ESXi-6.5-guestOS-types
|
219
219
|
#esxi.guest_guestos = 'centos-64'
|
220
220
|
|
221
221
|
# OPTIONAL. guest_virtualhw_version
|
222
|
-
# ESXi 6.
|
222
|
+
# ESXi 6.7 supports these versions. 4,7,8,9,10,11,12,13 & 14.
|
223
223
|
#esxi.guest_virtualhw_version = '9'
|
224
224
|
|
225
|
+
# OPTIONAL. Guest Autostart
|
226
|
+
# Guest VM will autostart when esxi host is booted. 'true' or 'false'(default)
|
227
|
+
#esxi.guest_autostart = 'false'
|
228
|
+
|
225
229
|
# RISKY. guest_custom_vmx_settings
|
226
230
|
#esxi.guest_custom_vmx_settings = [['vhv.enable','TRUE'], ['floppy0.present','TRUE']]
|
227
231
|
|
@@ -282,8 +286,19 @@ Known issues with vmware_esxi
|
|
282
286
|
* Setting the hostname on some boxes can cause 'vagrant up' to fail if the network configuration wasn't previously cleaned up. Avoid buggy boxes, fix the box networking and repackage, or do not set the hostname via Vagrant.
|
283
287
|
|
284
288
|
|
289
|
+
Donations
|
290
|
+
---------
|
291
|
+
I work very hard to produce a stable, well documented product. I appreciate any payments or donations for my efforts.
|
292
|
+
* Bitcoin: 12WCUyop3XGiaux8REvmDJ6kWFGoLnM4j9
|
293
|
+
* paypal: josenk at jintegrate.co
|
294
|
+
|
295
|
+
|
285
296
|
Version History
|
286
297
|
---------------
|
298
|
+
* 2.5.3 Fix, Add hw_versions and GuestOS vmkernel7
|
299
|
+
* 2.5.2 Fix, snapshot restore will execute regardless of current state.
|
300
|
+
* 2.5.1 Fix, filter localhost from local IP detection for nfs sync.
|
301
|
+
* 2.5.0 Add support to set guest vm to Autostart.
|
287
302
|
* 2.4.5 Do not wait for `running` when resuming a VM that is not able to be resumed.
|
288
303
|
* 2.4.4 Show stderr if unable to connect to ESXi host. Update GuestOS types.
|
289
304
|
* 2.4.3 Update GuestOS types.
|
data/example_box/Vagrantfile
CHANGED
@@ -219,6 +219,13 @@ Vagrant.configure('2') do |config|
|
|
219
219
|
# ESXi 6.5 supports these versions. 4,7,8,9,10,11,12,13 & 14.
|
220
220
|
#esxi.guest_virtualhw_version = '9'
|
221
221
|
|
222
|
+
# OPTIONAL. guest_autostart
|
223
|
+
# If unspecified, the guest VM will not autostart. Set this to 'true' if
|
224
|
+
# you want the guest VM to autostart when the esxi host is booted. The autostart
|
225
|
+
# options are all DEFAULT and there is no options in this plugin to modify them.
|
226
|
+
# Valid options. 'true' or 'false'(default)
|
227
|
+
#esxi.guest_autostart = 'false'
|
228
|
+
|
222
229
|
# RISKY. guest_custom_vmx_settings
|
223
230
|
# You can specify an array of custom vmx settings to add (or to override
|
224
231
|
# existing settings). **** I don't do any validation, so if you
|
@@ -526,6 +526,10 @@ module VagrantPlugins
|
|
526
526
|
end
|
527
527
|
env[:ui].info I18n.t('vagrant_vmware_esxi.vagrant_vmware_esxi_message',
|
528
528
|
message: "Guest OS type : #{desired_guestos}")
|
529
|
+
unless config.guest_autostart.nil?
|
530
|
+
env[:ui].info I18n.t('vagrant_vmware_esxi.vagrant_vmware_esxi_message',
|
531
|
+
message: "Autostart : #{config.guest_autostart}")
|
532
|
+
end
|
529
533
|
unless config.virtualhw_version.nil?
|
530
534
|
env[:ui].info I18n.t('vagrant_vmware_esxi.vagrant_vmware_esxi_message',
|
531
535
|
message: "Virtual HW ver : #{desired_virtualhw_version}")
|
@@ -832,6 +836,23 @@ module VagrantPlugins
|
|
832
836
|
message: "Unable to reload vmx."
|
833
837
|
end
|
834
838
|
|
839
|
+
if !config.guest_autostart.nil?
|
840
|
+
if config.guest_autostart.casecmp('true') == 0
|
841
|
+
startOrder = ssh.exec!('vim-cmd hostsvc/autostartmanager/get_autostartseq |grep startOrder |awk -F"=" "{print $2}" | sort -n |tail -1 |grep -o "[0-9]*"').to_i + 1
|
842
|
+
startDelay = ssh.exec!('vim-cmd hostsvc/autostartmanager/get_defaults |grep startDelay |grep -o "[0-9]*"').to_i
|
843
|
+
stopDelay = ssh.exec!('vim-cmd hostsvc/autostartmanager/get_defaults |grep stopDelay |grep -o "[0-9]*"').to_i
|
844
|
+
|
845
|
+
cmd = "vim-cmd hostsvc/autostartmanager/update_autostartentry "\
|
846
|
+
"#{env[:machine].id} PowerOn #{startDelay} #{startOrder} systemDefault #{stopDelay} systemDefault"
|
847
|
+
puts "cmd: #{cmd}"
|
848
|
+
r = ssh.exec!(cmd)
|
849
|
+
if r.exitstatus != 0
|
850
|
+
raise Errors::ESXiError,
|
851
|
+
message: "Unable to set autostart."
|
852
|
+
end
|
853
|
+
end
|
854
|
+
end
|
855
|
+
|
835
856
|
# Done
|
836
857
|
end
|
837
858
|
end
|
@@ -92,7 +92,7 @@ module VagrantPlugins
|
|
92
92
|
' install from http://www.vmware.com.'
|
93
93
|
end
|
94
94
|
|
95
|
-
ovf_cmd = "ovftool --noSSLVerify -tt=VMX --name=\"#{boxname}\" "\
|
95
|
+
ovf_cmd = "ovftool --noSSLVerify -tt=VMX --X:useMacNaming=false --name=\"#{boxname}\" "\
|
96
96
|
"#{overwrite_opts} vi://#{config.esxi_username}:"\
|
97
97
|
"#{config.encoded_esxi_password}@#{config.esxi_hostname}"\
|
98
98
|
"?moref=vim.VirtualMachine:#{machine.id} #{tmpdir}"
|
@@ -29,7 +29,11 @@ module VagrantPlugins
|
|
29
29
|
begin
|
30
30
|
puts "Get local IP address for NFS. (pri)" if env[:machine].provider_config.debug =~ %r{ip}i
|
31
31
|
# The Standard way to get your IP. Get your hostname, resolv it.
|
32
|
-
|
32
|
+
addr_info = Socket::getaddrinfo(Socket.gethostname,"echo",Socket::AF_INET)
|
33
|
+
|
34
|
+
non_localhost = addr_info.select{ |info| info[3] !~ /^127./}
|
35
|
+
|
36
|
+
env[:nfs_host_ip] = non_localhost[0][3]
|
33
37
|
rescue
|
34
38
|
puts "Get local IP address for NFS. (alt)" if env[:machine].provider_config.debug =~ %r{ip}i
|
35
39
|
# Alt method. Get list of ip_addresses on system and use the first.
|
@@ -113,8 +113,11 @@ module VagrantPlugins
|
|
113
113
|
def self.action_snapshot_restore
|
114
114
|
Vagrant::Action::Builder.new.tap do |b|
|
115
115
|
b.use SetESXiPassword
|
116
|
-
b.use
|
117
|
-
|
116
|
+
b.use Call, ReadState do |env1, b1|
|
117
|
+
b1.use Halt unless env1[:machine_state] == 'powered_off'
|
118
|
+
b1.use ReadState
|
119
|
+
end
|
120
|
+
b.use Call, WaitForState, :powered_off, 30 do |env1, b1|
|
118
121
|
if env1[:result] == 'True'
|
119
122
|
b1.use SnapshotRestore
|
120
123
|
b1.use ReadState
|
@@ -28,6 +28,7 @@ module VagrantPlugins
|
|
28
28
|
attr_accessor :guest_snapshot_includememory
|
29
29
|
attr_accessor :guest_snapshot_quiesced
|
30
30
|
attr_accessor :guest_custom_vmx_settings
|
31
|
+
attr_accessor :guest_autostart
|
31
32
|
attr_accessor :local_private_keys
|
32
33
|
attr_accessor :local_allow_overwrite
|
33
34
|
attr_accessor :local_lax
|
@@ -93,7 +94,7 @@ module VagrantPlugins
|
|
93
94
|
@debug = 'False'
|
94
95
|
@saved_ipaddress = nil
|
95
96
|
@supported_guest_virtualhw_versions = [
|
96
|
-
4,7,8,9,10,11,12,13,14
|
97
|
+
4,7,8,9,10,11,12,13,14,15,16,17,18
|
97
98
|
]
|
98
99
|
@supported_guest_disk_types = [
|
99
100
|
'thin',
|
@@ -232,6 +233,7 @@ module VagrantPlugins
|
|
232
233
|
'vmkernel5',
|
233
234
|
'vmkernel65',
|
234
235
|
'vmkernel6',
|
236
|
+
'vmkernel7',
|
235
237
|
'vmkernel',
|
236
238
|
'vmwarephoton-64',
|
237
239
|
'win2000advserv',
|
data/vagrant-vmware-esxi.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
18
18
|
s.require_path = 'lib'
|
19
19
|
|
20
|
-
s.add_runtime_dependency 'i18n', '~> 1.
|
20
|
+
s.add_runtime_dependency 'i18n', '~> 1.8'
|
21
21
|
s.add_runtime_dependency 'log4r', '~> 1.1'
|
22
22
|
s.add_runtime_dependency "iniparse", '> 1.0'
|
23
23
|
s.add_runtime_dependency 'nokogiri', '~> 1.6'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-vmware-esxi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Senkerik
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.8'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.8'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: log4r
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '0'
|
160
160
|
requirements: []
|
161
|
-
rubygems_version: 3.
|
161
|
+
rubygems_version: 3.1.6
|
162
162
|
signing_key:
|
163
163
|
specification_version: 4
|
164
164
|
summary: Vagrant ESXi provider plugin
|