vagrant-vmware-esxi 2.4.5 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc3837233e1568c8692fd622f92933786854f0ec3723c4cd3152f9f78da857ca
|
4
|
+
data.tar.gz: 6f4c96f69695c835c886bd794c6992a486851b39e9453f1a247b5ecd96a54b36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a7b2ee288b8c77394e3ec2dafa9bbc428bb985b36dc9109fbd8916283597e7053f80e4c392681a9149397fadf023ebe72899c0dbdc4650a4a20aad23a77c935
|
7
|
+
data.tar.gz: 8ad9f3ac34fa9dc6fe0b306800d471617038ff2e2f30782bf87bdf0451ab7040ac4ceb302ba2300592db280ce34ed6433c386dc304dc0e281a098ea13b7e6ee4
|
data/README.md
CHANGED
@@ -171,7 +171,6 @@ Vagrant.configure('2') do |config|
|
|
171
171
|
# OPTIONAL. When automatically naming VMs, use this prefix.
|
172
172
|
#esxi.guest_name_prefix = 'V-'
|
173
173
|
|
174
|
-
|
175
174
|
# OPTIONAL. Set the guest username login. The default is 'vagrant'.
|
176
175
|
#esxi.guest_username = 'vagrant'
|
177
176
|
|
@@ -215,13 +214,17 @@ Vagrant.configure('2') do |config|
|
|
215
214
|
#esxi.guest_snapshot_quiesced = 'true'
|
216
215
|
|
217
216
|
# RISKY. guest_guestos
|
218
|
-
# https://github.com/josenk/vagrant-vmware-esxi/
|
217
|
+
# https://github.com/josenk/vagrant-vmware-esxi/wiki/VMware-ESXi-6.5-guestOS-types
|
219
218
|
#esxi.guest_guestos = 'centos-64'
|
220
219
|
|
221
220
|
# OPTIONAL. guest_virtualhw_version
|
222
221
|
# ESXi 6.5 supports these versions. 4,7,8,9,10,11,12,13 & 14.
|
223
222
|
#esxi.guest_virtualhw_version = '9'
|
224
223
|
|
224
|
+
# OPTIONAL. Guest Autostart
|
225
|
+
# Guest VM will autostart when esxi host is booted. 'true' or 'false'(default)
|
226
|
+
#esxi.guest_autostart = 'false'
|
227
|
+
|
225
228
|
# RISKY. guest_custom_vmx_settings
|
226
229
|
#esxi.guest_custom_vmx_settings = [['vhv.enable','TRUE'], ['floppy0.present','TRUE']]
|
227
230
|
|
@@ -284,6 +287,7 @@ Known issues with vmware_esxi
|
|
284
287
|
|
285
288
|
Version History
|
286
289
|
---------------
|
290
|
+
* 2.5.0 Add support to set guest vm to Autostart.
|
287
291
|
* 2.4.5 Do not wait for `running` when resuming a VM that is not able to be resumed.
|
288
292
|
* 2.4.4 Show stderr if unable to connect to ESXi host. Update GuestOS types.
|
289
293
|
* 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
|
@@ -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
|