vagrant-vmware-esxi 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ESXi_guestos_types.md +68 -0
- data/README.md +83 -67
- data/example_box/Vagrantfile +53 -41
- data/example_box/Vagrantfile-multimachine +10 -13
- data/lib/vagrant-vmware-esxi/action/boot.rb +1 -1
- data/lib/vagrant-vmware-esxi/action/createvm.rb +83 -41
- data/lib/vagrant-vmware-esxi/action/destroy.rb +1 -1
- data/lib/vagrant-vmware-esxi/action/esxi_password.rb +29 -28
- data/lib/vagrant-vmware-esxi/action/halt.rb +3 -4
- data/lib/vagrant-vmware-esxi/action/read_ssh_info.rb +1 -1
- data/lib/vagrant-vmware-esxi/action/read_state.rb +1 -1
- data/lib/vagrant-vmware-esxi/action/resume.rb +1 -1
- data/lib/vagrant-vmware-esxi/action/set_network_ip.rb +8 -8
- data/lib/vagrant-vmware-esxi/action/snapshot_delete.rb +1 -1
- data/lib/vagrant-vmware-esxi/action/snapshot_info.rb +3 -3
- data/lib/vagrant-vmware-esxi/action/snapshot_list.rb +1 -1
- data/lib/vagrant-vmware-esxi/action/snapshot_restore.rb +3 -3
- data/lib/vagrant-vmware-esxi/action/snapshot_save.rb +4 -5
- data/lib/vagrant-vmware-esxi/action/suspend.rb +3 -3
- data/lib/vagrant-vmware-esxi/config.rb +6 -0
- data/lib/vagrant-vmware-esxi/version.rb +2 -1
- data/vagrant-vmware-esxi.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b92afbc9482ac549c970e2c84ea07fe5587d974c
|
4
|
+
data.tar.gz: 79c8419bbd5adae8f898a8912c5488ea831c95a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4478fa07e0fab8e0a189f1594bacccac3c7feab631017c7b06358822a7172fe1b126bad01e789c1e00fe35a97cc14dcde17430effd2629f3d7a244a3b60aaaa7
|
7
|
+
data.tar.gz: c1f9714571f9a06b2deab547a6fc92979844b429ea271472cb63be192fa8b8098363aa6b6b0c529b5cf2ec694d94802d5c444c664ec5aa28eceb430e275f982a
|
@@ -0,0 +1,68 @@
|
|
1
|
+
VMware ESXi 6.5 guestOS types
|
2
|
+
=============================
|
3
|
+
|
4
|
+
Based on my research and some trial & error, I made this list of guestOS types that are compatible with ESXi 6.5. I started with some api documenation from vmware that listed guestOS types.
|
5
|
+
|
6
|
+
>http://pubs.vmware.com/vsphere-6-5/index.jsp#com.vmware.wssdk.apiref.doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html
|
7
|
+
|
8
|
+
But they didn't quite work when put directly in the vmx file... I noticed none of my existing vmx files had the word "Guest" in guestOS line. I also noticed in the list that the 64 bit entries were inconsistent. (Some have _64, others are -64, and others are just 64.) I removed the word Guest and set all the 64 bit OS's to be standard "-64". The results seems to work for various OS's I installed, but I certainly didn't try all of these. So here is my list... Please report any errors.
|
9
|
+
|
10
|
+
Asianux:
|
11
|
+
'asianux3-64','asianux3','asianux4-64','asianux4','asianux5-64','asianux7-64'
|
12
|
+
|
13
|
+
Centos:
|
14
|
+
'centos6-64','centos-64','centos6','centos7-64','centos7','centos'
|
15
|
+
|
16
|
+
Darwin (mac):
|
17
|
+
'darwin10-64','darwin10','darwin11-64','darwin11','darwin12-64','darwin13-64','darwin14-64','darwin15-64','darwin16-64','darwin-64','darwin'
|
18
|
+
|
19
|
+
Debian:
|
20
|
+
'debian10-64','debian10','debian4-64','debian4','debian5-64','debian5','debian6-64','debian6','debian7-64','debian7','debian8-64','debian8','debian9-64','debian9'
|
21
|
+
|
22
|
+
Dos & Other:
|
23
|
+
'dos','os2','oes','other','sjds','coreos-64'
|
24
|
+
|
25
|
+
eComStation:
|
26
|
+
'eComStation2','eComStation'
|
27
|
+
|
28
|
+
Fedora:
|
29
|
+
'fedora-64','fedora'
|
30
|
+
|
31
|
+
FreeBSD:
|
32
|
+
'freebsd-64','freebsd'
|
33
|
+
|
34
|
+
Mandrake:
|
35
|
+
'mandrake','mandriva-64','mandriva'
|
36
|
+
|
37
|
+
Netware:
|
38
|
+
'netware4','netware5','netware6','nld9'
|
39
|
+
|
40
|
+
SCO:
|
41
|
+
'openServer5','openServer6','unixWare7'
|
42
|
+
|
43
|
+
SUSE:
|
44
|
+
'opensuse-64','opensuse','sles10-64','sles10','sles11-64','sles11','sles12-64','sles12','sles-64','sles','suse-64','suse'
|
45
|
+
|
46
|
+
Oracle Linux:
|
47
|
+
'oracleLinux6-64','oracleLinux-64','oracleLinux6','oracleLinux7-64','oracleLinux7','oracleLinux'
|
48
|
+
|
49
|
+
Other Linux:
|
50
|
+
'genericLinux','other24xLinux-64','other24xLinux','other26xLinux-64','other26xLinux','other3xLinux-64','other3xLinux','otherGuest-64','otherLinux-64','otherLinux'
|
51
|
+
|
52
|
+
Redhat:
|
53
|
+
'redhat','rhel2','rhel3-64','rhel3','rhel4-64','rhel4','rhel5-64','rhel5','rhel6-64','rhel6','rhel7-64','rhel7'
|
54
|
+
|
55
|
+
Solaris:
|
56
|
+
'solaris10-64','solaris10','solaris11-64','solaris6','solaris7','solaris8','solaris9'
|
57
|
+
|
58
|
+
TurboLInux:
|
59
|
+
'turboLinux-64','turboLinux'
|
60
|
+
|
61
|
+
Ubuntu:
|
62
|
+
'ubuntu-64','ubuntu'
|
63
|
+
|
64
|
+
VMware:
|
65
|
+
'vmkernel5','vmkernel65','vmkernel6','vmkernel','vmwarePhoton-64'
|
66
|
+
|
67
|
+
Windows:
|
68
|
+
'win2000AdvServ','win2000Pro','win2000Serv','win31','win95','win98','windows7-64','windows7','windows7Server-64','windows8-64','windows8','windows8Server-64','windows9-64','windows9','windows9Server-64','windowsHyperV','winLonghorn-64','winLonghorn','winMe','winNetBusiness','winNetDatacenter-64','winNetDatacenter','winNetEnterprise-64','winNetEnterprise','winNetStandard-64','winNetStandard','winNetWeb','winNT','winVista-64','winVista','winXPHome','winXPPro-64','winXPPro'
|
data/README.md
CHANGED
@@ -3,6 +3,12 @@ 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
|
+
Documentation:
|
7
|
+
-------------
|
8
|
+
Refer to the WIKI for documentation, examples and other information...
|
9
|
+
>https://github.com/josenk/vagrant-vmware-esxi/wiki
|
10
|
+
|
11
|
+
|
6
12
|
|
7
13
|
Features and Compatibility
|
8
14
|
--------------------------
|
@@ -12,7 +18,7 @@ Features and Compatibility
|
|
12
18
|
* Will automatically download boxes from the web.
|
13
19
|
* Will automatically upload the box to your ESXi host.
|
14
20
|
* Automatic or manual VM names.
|
15
|
-
* Automatic VM names are
|
21
|
+
* Automatic VM names are 'PREFIX-HOSTNAME-USERNAME-DIR'.
|
16
22
|
* Multi machine capable.
|
17
23
|
* Supports adding your VM to Resource Pools to partition CPU and memory usage from other VMs on your ESXi host.
|
18
24
|
* suspend / resume.
|
@@ -21,7 +27,7 @@ Features and Compatibility
|
|
21
27
|
* Provision using built-in Vagrant provisioner.
|
22
28
|
* package your vm's into boxes.
|
23
29
|
* Create additional network interfaces, set nic type, MAC addresses, static IPs.
|
24
|
-
* Use Vagrants
|
30
|
+
* Use Vagrants private_network, public_network options to set a static IP addresses on additional network interfaces. (not the primary interface)
|
25
31
|
* Disks provisioned using thin, thick or eagerzeroedthick.
|
26
32
|
* Specify GuestOS types, virtual HW version, or any custom vmx settings.
|
27
33
|
|
@@ -32,7 +38,7 @@ Requirements
|
|
32
38
|
>https://www.vmware.com/support/developer/ovf/
|
33
39
|
3. You MUST enable ssh access on your ESXi hypervisor.
|
34
40
|
* Google 'How to enable ssh access on esxi'
|
35
|
-
4. The boxes must have open-vm-tools or vmware-tools installed to properly transition to the
|
41
|
+
4. The boxes must have open-vm-tools or vmware-tools installed to properly transition to the 'running' state.
|
36
42
|
5. You should know how to use vagrant in general...
|
37
43
|
|
38
44
|
Why this plugin?
|
@@ -54,14 +60,14 @@ How to use and configure a Vagrantfile
|
|
54
60
|
1. `vagrant init`
|
55
61
|
1. `vi Vagrantfile` # See below to setup access your ESXi host and to set some preferences.
|
56
62
|
```ruby
|
57
|
-
Vagrant.configure(
|
63
|
+
Vagrant.configure('2') do |config|
|
58
64
|
|
59
65
|
# Box, Select any box created for VMware that is compatible with
|
60
66
|
# the ovftool. To get maximum compatibility You should download
|
61
67
|
# and install the latest version of ovftool for your OS.
|
62
68
|
# https://www.vmware.com/support/developer/ovf/
|
63
69
|
#
|
64
|
-
# If your box is stuck at
|
70
|
+
# If your box is stuck at 'Powered On', then most likely
|
65
71
|
# the system doesn't have the vmware tools installed.
|
66
72
|
#
|
67
73
|
# Here are some of the MANY examples....
|
@@ -76,24 +82,25 @@ Vagrant.configure("2") do |config|
|
|
76
82
|
#config.vm.box = 'geerlingguy/centos7'
|
77
83
|
#config.vm.box = 'geerlingguy/ubuntu1604'
|
78
84
|
#config.vm.box = 'laravel/homestead'
|
79
|
-
#config.vm.box =
|
85
|
+
#config.vm.box = 'puphpet/debian75-x64'
|
80
86
|
|
81
87
|
|
82
|
-
# Use rsync
|
88
|
+
# Use rsync or NFS synced folders. (or disable them)
|
83
89
|
config.vm.synced_folder('.', '/vagrant', type: 'rsync')
|
84
90
|
config.vm.synced_folder('.', '/vagrant', type: 'nfs', disabled: true)
|
85
91
|
|
86
92
|
# Vagrant can set a static IP for the additional network interfaces. Use
|
87
93
|
# public_network or private_network to manually set a static IP and
|
88
94
|
# netmask. ESXi doesn't use the concept of public or private networks so
|
89
|
-
# both are valid here.
|
95
|
+
# both are valid here. 'bridge' will be ignored. Netmask is optional if
|
90
96
|
# you are using standard Class A/B/C networks. The primary network
|
91
|
-
# interface is considered the management interface and cannot
|
92
|
-
#
|
93
|
-
#
|
94
|
-
#
|
95
|
-
#config.vm.network
|
96
|
-
#config.vm.network
|
97
|
+
# interface is considered the management interface to Vagrant and cannot
|
98
|
+
# be changed. It's highly recommended to correctly configure a
|
99
|
+
# new esxi.virtual_network for each static IP you configure.
|
100
|
+
# *** Invalid settings could cause 'vagrant up' to fail ***
|
101
|
+
#config.vm.network 'private_network', ip: '192.168.10.170', netmask: '255.255.255.0'
|
102
|
+
#config.vm.network 'private_network', ip: '192.168.11.170'
|
103
|
+
#config.vm.network 'public_network', ip: '192.168.12.170'
|
97
104
|
|
98
105
|
#
|
99
106
|
# Provider (esxi) settings
|
@@ -102,36 +109,36 @@ Vagrant.configure("2") do |config|
|
|
102
109
|
|
103
110
|
# REQUIRED! ESXi hostname/IP
|
104
111
|
# You MUST specify a esxi_hostname or IP, uless you
|
105
|
-
# were lucky enough to name your esxi host
|
106
|
-
esxi.esxi_hostname =
|
112
|
+
# were lucky enough to name your esxi host 'esxi'. :-)
|
113
|
+
esxi.esxi_hostname = 'esxi'
|
107
114
|
|
108
115
|
# ESXi username
|
109
|
-
# Default is
|
110
|
-
esxi.esxi_username =
|
116
|
+
# Default is 'root'.
|
117
|
+
esxi.esxi_username = 'root'
|
111
118
|
|
112
119
|
#
|
113
120
|
# IMPORTANT! ESXi password.
|
114
|
-
# *** NOTES about
|
121
|
+
# *** NOTES about esxi_passwords & ssh keys!! ***
|
115
122
|
#
|
116
|
-
# 1)
|
123
|
+
# 1) 'prompt:'
|
117
124
|
# This will prompt you for the esxi password each time you
|
118
125
|
# run a vagrant command. This is the default.
|
119
126
|
#
|
120
|
-
# 2)
|
127
|
+
# 2) 'file:' or 'file:my_secret_file'
|
121
128
|
# This will read a plain text file containing the esxi
|
122
129
|
# password. The default filename is ~/.esxi_password, or
|
123
|
-
# you can specify any filename after the colon
|
130
|
+
# you can specify any filename after the colon ':'.
|
124
131
|
#
|
125
|
-
# 3)
|
132
|
+
# 3) 'env:' or 'env:my_secret_env_var'
|
126
133
|
# This will read the esxi password via an environment
|
127
134
|
# variable. The default is $esxi_password, but you can
|
128
|
-
# specify any environment variable after the colon
|
135
|
+
# specify any environment variable after the colon ':'.
|
129
136
|
#
|
130
|
-
# $ export esxi_password=
|
137
|
+
# $ export esxi_password='my_secret_password'
|
131
138
|
#
|
132
|
-
# 4)
|
139
|
+
# 4) 'key:' or key:~/.ssh/some_ssh_private_key'
|
133
140
|
# Use ssh keys. The default is to use the system private keys,
|
134
|
-
# or you specify a custom private key after the colon
|
141
|
+
# or you specify a custom private key after the colon ':'.
|
135
142
|
#
|
136
143
|
# To test connectivity. From your command line, you should be able to
|
137
144
|
# run following command without an error and get an esxi prompt.
|
@@ -141,89 +148,90 @@ Vagrant.configure("2") do |config|
|
|
141
148
|
# The ssh connections to esxi will try the ssh private
|
142
149
|
# keys. However the ovftool does NOT! To make
|
143
150
|
# vagrant fully password-less, you will need to use other
|
144
|
-
# options. (set the password, use
|
151
|
+
# options. (set the password, use 'env:' or 'file:')
|
145
152
|
#
|
146
|
-
# 5) esxi.esxi_password =
|
153
|
+
# 5) esxi.esxi_password = 'my_esxi_password'
|
147
154
|
# Enter your esxi passowrd in clear text here... This is the
|
148
155
|
# least secure method because you may share this Vagrant file without
|
149
156
|
# realizing the password is in clear text.
|
150
157
|
#
|
151
158
|
# IMPORTANT! Set the ESXi password or authentication method..
|
152
|
-
esxi.esxi_password =
|
159
|
+
esxi.esxi_password = 'prompt:'
|
153
160
|
|
154
161
|
# SSH port.
|
155
162
|
# Default port 22.
|
156
163
|
#esxi.esxi_hostport = 22
|
157
164
|
|
158
165
|
# HIGHLY RECOMMENDED! Virtual Network
|
159
|
-
# You should specify a Virtual Network
|
160
|
-
#
|
161
|
-
#
|
162
|
-
#
|
163
|
-
#
|
164
|
-
#
|
165
|
-
#
|
166
|
-
#
|
167
|
-
#
|
166
|
+
# You should specify a Virtual Network. Vagrant needs to know which
|
167
|
+
# 'ESXi virtual_network' is used for each nic in your VM.
|
168
|
+
# If it's not specified, the default is to use the first ESXi
|
169
|
+
# virtual_network found. You can specify up to 4 virtual networks
|
170
|
+
# using an array format. NOTE: This does not configure IP addresses.
|
171
|
+
# For most OS's DHCP is the default, so you will need a DHCP server for
|
172
|
+
# each ESXi virtual network. To set a static IP address on the
|
173
|
+
# second, third or 4th interface, see above 'config.vm.network'.
|
174
|
+
#
|
175
|
+
#esxi.virtual_network = ['vmnet1','vmnet2','vmnet3','vmnet4']
|
168
176
|
|
169
177
|
# OPTIONAL & RISKY. Specify up to 4 MAC addresses
|
170
|
-
# The default is ovftool to automatically generate a MAC address.
|
178
|
+
# The default is for ovftool to automatically generate a MAC address.
|
171
179
|
# You can specify an array of MAC addresses using upper or lower case,
|
172
|
-
# separated by colons
|
173
|
-
# of
|
180
|
+
# separated by colons ':'. I highly recommend using vmware's OUI
|
181
|
+
# of '00:50:56' or '00:0c:29'. I consider this option a risk
|
174
182
|
# because you may reuse a Vagrantfile without realizing you are
|
175
183
|
# duplicating the MAC address.
|
176
|
-
# *** Invalid settings could cause
|
177
|
-
#esxi.mac_address = [
|
184
|
+
# *** Invalid settings could cause 'vagrant up' to fail ***
|
185
|
+
#esxi.mac_address = ['00:50:56:aa:bb:cc', '00:50:56:01:01:01','00:50:56:02:02:02','00:50:56:BE:AF:01' ]
|
178
186
|
|
179
187
|
# OPTIONAL & RISKY. Specify a nic_type
|
180
188
|
# The default is to have the virtual nic hw type automatically
|
181
189
|
# determined by the ovftool. However, you can override it by specifying
|
182
190
|
# it here. This is a global setting. (all 4 virtual networks will be set)
|
183
|
-
# The validated list of nic_types are
|
184
|
-
#
|
191
|
+
# The validated list of nic_types are 'e1000', 'e1000e', 'vmxnet',
|
192
|
+
# 'vmxnet2', 'vmxnet3', 'Vlance', and 'Flexible'. I consider this
|
185
193
|
# risky because I don't validate if the specified nic_type is
|
186
194
|
# compatible with your OS version.
|
187
|
-
# *** Invalid settings could cause
|
195
|
+
# *** Invalid settings could cause 'vagrant up' to fail ***
|
188
196
|
#esxi.nic_type = 'e1000'
|
189
197
|
|
190
198
|
# OPTIONAL. Specify a Disk Store
|
191
199
|
# If it's not specified, the Default is to use the least used Disk Store.
|
192
|
-
#esxi.vm_disk_store =
|
200
|
+
#esxi.vm_disk_store = 'DS_001'
|
193
201
|
|
194
202
|
# OPTIONAL. Specify a disk type.
|
195
|
-
# If unspecified,
|
203
|
+
# If unspecified, the default is 'thin', Otherwise, you can set to:
|
196
204
|
# 'thin', 'thick', or 'eagerzeroedthick'
|
197
|
-
#esxo.vm_disk_type =
|
205
|
+
#esxo.vm_disk_type = 'thick'
|
198
206
|
|
199
207
|
# OPTIONAL. Guest VM name to use.
|
200
208
|
# The Default will be automatically generated. It will be based on
|
201
209
|
# the vmname_prefix (see below), your hostname & username and path.
|
202
210
|
# Otherwise you can set a fixed guest VM name here.
|
203
|
-
#esxi.vmname =
|
211
|
+
#esxi.vmname = 'Custom-Guest-VM_Name'
|
204
212
|
|
205
213
|
# OPTIONAL. When automatically naming VMs, use
|
206
214
|
# this prifix.
|
207
|
-
#esxi.vmname_prefix =
|
215
|
+
#esxi.vmname_prefix = 'V-'
|
208
216
|
|
209
217
|
# OPTIONAL. Memory size override
|
210
218
|
# The default is to use the memory size specified in the
|
211
219
|
# vmx file, however you can specify a new value here.
|
212
|
-
#esxi.memsize =
|
220
|
+
#esxi.memsize = '2048'
|
213
221
|
|
214
222
|
# OPTIONAL. Virtual CPUs override
|
215
223
|
# The default is to use the number of virtual cpus specified
|
216
224
|
# in the vmx file, however you can specify a new value here.
|
217
|
-
#esxi.numvcpus =
|
225
|
+
#esxi.numvcpus = '2'
|
218
226
|
|
219
227
|
# OPTIONAL. Resource Pool
|
220
|
-
# If unspecified, the default is to create VMs in the
|
228
|
+
# If unspecified, the default is to create VMs in the 'root'. You can
|
221
229
|
# specify a resource pool here to partition memory and cpu usage away
|
222
230
|
# from other systems on your esxi host. The resource pool must
|
223
231
|
# already exist and have the proper permissions set.
|
224
232
|
#
|
225
233
|
# Vagrant will NOT create a Resource pool it for you.
|
226
|
-
#esxi.resource_pool =
|
234
|
+
#esxi.resource_pool = '/Vagrant'
|
227
235
|
|
228
236
|
# RISKY. guestos
|
229
237
|
# if unspecified, the default will be generated by the OVFTool. Most
|
@@ -231,12 +239,12 @@ Vagrant.configure("2") do |config|
|
|
231
239
|
# the correct information from the box. See my page on supported guestos
|
232
240
|
# types for ESXI.
|
233
241
|
# https://github.com/josenk/vagrant-vmware-esxi/ESXi_guestos_types.md
|
234
|
-
#esxi.guestos =
|
242
|
+
#esxi.guestos = 'centos7-64'
|
235
243
|
|
236
244
|
# OPTIONAL. virtualhw_version
|
237
245
|
# If unspecified, the default will be generated by the OVFTool. Most
|
238
|
-
# of the time, you don't need to change this unless you are using
|
239
|
-
# custom vmx settings that require it.
|
246
|
+
# of the time, you don't need to change this unless you are using very
|
247
|
+
# advanced custom vmx settings that require it.
|
240
248
|
# ESXi 6.5 supports these versions. 4,7,8,9,10,11,12 & 13.
|
241
249
|
#esxi.virtualhw_version = '11'
|
242
250
|
|
@@ -265,6 +273,10 @@ Vagrant.configure("2") do |config|
|
|
265
273
|
# This will also overwrite your box when using vagrant package.
|
266
274
|
#esxi.allow_overwrite = 'True'
|
267
275
|
|
276
|
+
# Plugin debug output.
|
277
|
+
# Send bug reports with debug output...
|
278
|
+
#esxi.debug = 'true'
|
279
|
+
|
268
280
|
end
|
269
281
|
end
|
270
282
|
```
|
@@ -288,22 +300,26 @@ Basic usage
|
|
288
300
|
|
289
301
|
Known issues with vmware_esxi
|
290
302
|
-----------------------------
|
291
|
-
* The boxes must have open-vm-tools or vmware-tools installed to properly transition to the
|
303
|
+
* The boxes must have open-vm-tools or vmware-tools installed to properly transition to the 'running' state.
|
292
304
|
* Invalid settings (bad IP address, netmask, MAC address, custom_vmx_settings) could cause 'vagrant up' to fail. Review your ESXi logs to help debug why it failed.
|
293
305
|
* Cleanup doesn't always destroy a VM that has been partially built. Use the allow_overwrite = 'True' option if you need to force a rebuild, or delete the vm using the VSphere client.
|
294
306
|
* ovftool installer for windows doesn't put ovftool.exe in your path. You can manually set your path, or install ovftool in the \HashiCorp\Vagrant\bin directory.
|
295
|
-
* In general I find NFS synced folders a little
|
307
|
+
* In general I find NFS synced folders a little 'flaky'...
|
296
308
|
|
297
309
|
|
298
310
|
Version History
|
299
311
|
---------------
|
312
|
+
* 1.5.1 Fix:
|
313
|
+
Improve debug output.
|
314
|
+
Fix password encoding for @ character.
|
315
|
+
Automatically add a virtual network when configuring a public_network or private_network.
|
300
316
|
* 1.5.0 Add support for:
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
317
|
+
Specify custom_vmx_settings (to add or modify vmx settings).
|
318
|
+
Specify Virtual HW version.
|
319
|
+
Allow $ in Password.
|
320
|
+
Disk types (thick, thin, eagerzeroedthick).
|
321
|
+
Specify a guestOS type (see list above).
|
322
|
+
Relaxed ovftool setting (--lax), to allow importing strange ovf boxes.
|
307
323
|
* 1.4.0 Add support to set MAC and IP addresses for network interfaces.
|
308
324
|
* 1.3.2 Fix, Don't timeout ssh connection when ovftool takes a long time to upload image.
|
309
325
|
* 1.3.0 Add support to get esxi password from env, from a file or prompt.
|
data/example_box/Vagrantfile
CHANGED
@@ -1,11 +1,14 @@
|
|
1
|
-
|
1
|
+
#
|
2
|
+
# Single Machine, fully documented Vagrant file.
|
3
|
+
#
|
4
|
+
Vagrant.configure('2') do |config|
|
2
5
|
|
3
6
|
# Box, Select any box created for VMware that is compatible with
|
4
7
|
# the ovftool. To get maximum compatibility You should download
|
5
8
|
# and install the latest version of ovftool for your OS.
|
6
9
|
# https://www.vmware.com/support/developer/ovf/
|
7
10
|
#
|
8
|
-
# If your box is stuck at
|
11
|
+
# If your box is stuck at 'Powered On', then most likely
|
9
12
|
# the system doesn't have the vmware tools installed.
|
10
13
|
#
|
11
14
|
# Here are some of the MANY examples....
|
@@ -20,7 +23,7 @@ Vagrant.configure("2") do |config|
|
|
20
23
|
#config.vm.box = 'geerlingguy/centos7'
|
21
24
|
#config.vm.box = 'geerlingguy/ubuntu1604'
|
22
25
|
#config.vm.box = 'laravel/homestead'
|
23
|
-
#config.vm.box =
|
26
|
+
#config.vm.box = 'puphpet/debian75-x64'
|
24
27
|
|
25
28
|
|
26
29
|
# Use rsync and NFS synced folders. (or disable them)
|
@@ -30,14 +33,14 @@ Vagrant.configure("2") do |config|
|
|
30
33
|
# Vagrant can set a static IP for the additional network interfaces. Use
|
31
34
|
# public_network or private_network to manually set a static IP and
|
32
35
|
# netmask. ESXi doesn't use the concept of public or private networks so
|
33
|
-
# both are valid here.
|
36
|
+
# both are valid here. 'bridge' will be ignored. Netmask is optional if
|
34
37
|
# you are using standard Class A/B/C networks. The primary network
|
35
38
|
# interface is considered the management interface and cannot be changed,
|
36
39
|
# so you can specify 3 entries here!
|
37
|
-
# *** Invalid settings could cause
|
38
|
-
#config.vm.network
|
39
|
-
#config.vm.network
|
40
|
-
#config.vm.network
|
40
|
+
# *** Invalid settings could cause 'vagrant up' to fail ***
|
41
|
+
#config.vm.network 'private_network', ip: '192.168.10.170', netmask: '255.255.255.0'
|
42
|
+
#config.vm.network 'private_network', ip: '192.168.11.170'
|
43
|
+
#config.vm.network 'public_network', ip: '192.168.12.170'
|
41
44
|
|
42
45
|
#
|
43
46
|
# Provider (esxi) settings
|
@@ -46,36 +49,36 @@ Vagrant.configure("2") do |config|
|
|
46
49
|
|
47
50
|
# REQUIRED! ESXi hostname/IP
|
48
51
|
# You MUST specify a esxi_hostname or IP, uless you
|
49
|
-
# were lucky enough to name your esxi host
|
50
|
-
esxi.esxi_hostname =
|
52
|
+
# were lucky enough to name your esxi host 'esxi'. :-)
|
53
|
+
esxi.esxi_hostname = 'esxi'
|
51
54
|
|
52
55
|
# ESXi username
|
53
|
-
# Default is
|
54
|
-
esxi.esxi_username =
|
56
|
+
# Default is 'root'.
|
57
|
+
esxi.esxi_username = 'root'
|
55
58
|
|
56
59
|
#
|
57
60
|
# IMPORTANT! ESXi password.
|
58
61
|
# *** NOTES about esxi_password & ssh keys!! ***
|
59
62
|
#
|
60
|
-
# 1)
|
63
|
+
# 1) 'prompt:'
|
61
64
|
# This will prompt you for the esxi password each time you
|
62
65
|
# run a vagrant command. This is the default.
|
63
66
|
#
|
64
|
-
# 2)
|
67
|
+
# 2) 'file:' or 'file:my_secret_file'
|
65
68
|
# This will read a plain text file containing the esxi
|
66
69
|
# password. The default filename is ~/.esxi_password, or
|
67
|
-
# you can specify any filename after the colon
|
70
|
+
# you can specify any filename after the colon ':'.
|
68
71
|
#
|
69
|
-
# 3)
|
72
|
+
# 3) 'env:' or 'env:my_secret_env_var'
|
70
73
|
# This will read the esxi password via an environment
|
71
74
|
# variable. The default is $esxi_password, but you can
|
72
|
-
# specify any environment variable after the colon
|
75
|
+
# specify any environment variable after the colon ':'.
|
73
76
|
#
|
74
|
-
# $ export esxi_password=
|
77
|
+
# $ export esxi_password='my_secret_password'
|
75
78
|
#
|
76
|
-
# 4)
|
79
|
+
# 4) 'key:' or key:~/.ssh/some_ssh_private_key'
|
77
80
|
# Use ssh keys. The default is to use the system private keys,
|
78
|
-
# or you specify a custom private key after the colon
|
81
|
+
# or you specify a custom private key after the colon ':'.
|
79
82
|
#
|
80
83
|
# To test connectivity. From your command line, you should be able to
|
81
84
|
# run following command without an error and get an esxi prompt.
|
@@ -85,15 +88,15 @@ Vagrant.configure("2") do |config|
|
|
85
88
|
# The ssh connections to esxi will try the ssh private
|
86
89
|
# keys. However the ovftool does NOT! To make
|
87
90
|
# vagrant fully password-less, you will need to use other
|
88
|
-
# options. (set the password, use
|
91
|
+
# options. (set the password, use 'env:' or 'file:')
|
89
92
|
#
|
90
|
-
# 5) esxi.esxi_password =
|
93
|
+
# 5) esxi.esxi_password = 'my_esxi_password'
|
91
94
|
# Enter your esxi passowrd in clear text here... This is the
|
92
95
|
# least secure method because you may share this Vagrant file without
|
93
96
|
# realizing the password is in clear text.
|
94
97
|
#
|
95
98
|
# IMPORTANT! Set the ESXi password or authentication method..
|
96
|
-
esxi.esxi_password =
|
99
|
+
esxi.esxi_password = 'prompt:'
|
97
100
|
|
98
101
|
# SSH port.
|
99
102
|
# Default port 22.
|
@@ -104,65 +107,70 @@ Vagrant.configure("2") do |config|
|
|
104
107
|
# default is to use the first found. You can specify up to 4 virtual
|
105
108
|
# networks using an array format. Note that Vagrant only looks at the
|
106
109
|
# first interface for a valid IP address. BTW: This does not configure
|
107
|
-
# IP addresses. This specifies which
|
110
|
+
# IP addresses. This specifies which 'ESXi virtual network' is used for
|
108
111
|
# each network interface in your VM. For most OS's DHCP is the default,
|
109
112
|
# so, you will need a DHCP server for each virtual network. To set a
|
110
|
-
# static IP, see above
|
111
|
-
#esxi.virtual_network = [
|
113
|
+
# static IP, see above 'config.vm.network'.
|
114
|
+
#esxi.virtual_network = ['vmnet1','vmnet2','vmnet3','vmnet4']
|
112
115
|
|
113
116
|
# OPTIONAL & RISKY. Specify up to 4 MAC addresses
|
114
117
|
# The default is ovftool to automatically generate a MAC address.
|
115
118
|
# You can specify an array of MAC addresses using upper or lower case,
|
116
|
-
# separated by colons
|
117
|
-
# of
|
119
|
+
# separated by colons ':'. I highly recommend using vmware's OUI
|
120
|
+
# of '00:50:56' or '00:0c:29'. I consider this option a risk
|
118
121
|
# because you may reuse a Vagrantfile without realizing you are
|
119
122
|
# duplicating the MAC address.
|
120
|
-
# *** Invalid settings could cause
|
121
|
-
#esxi.mac_address = [
|
123
|
+
# *** Invalid settings could cause 'vagrant up' to fail ***
|
124
|
+
#esxi.mac_address = ['00:50:56:aa:bb:cc', '00:50:56:01:01:01','00:50:56:02:02:02','00:50:56:BE:AF:01' ]
|
122
125
|
|
123
126
|
# OPTIONAL & RISKY. Specify a nic_type
|
124
127
|
# The default is to have the virtual nic hw type automatically
|
125
128
|
# determined by the ovftool. However, you can override it by specifying
|
126
129
|
# it here. This is a global setting. (all 4 virtual networks will be set)
|
127
|
-
# The validated list of nic_types are
|
128
|
-
#
|
130
|
+
# The validated list of nic_types are 'e1000', 'e1000e', 'vmxnet',
|
131
|
+
# 'vmxnet2', 'vmxnet3', 'Vlance', and 'Flexible'. I consider this
|
129
132
|
# risky because I don't validate if the specified nic_type is
|
130
133
|
# compatible with your OS version.
|
131
|
-
# *** Invalid settings could cause
|
134
|
+
# *** Invalid settings could cause 'vagrant up' to fail ***
|
132
135
|
#esxi.nic_type = 'e1000'
|
133
136
|
|
134
137
|
# OPTIONAL. Specify a Disk Store
|
135
138
|
# If it's not specified, the Default is to use the least used Disk Store.
|
136
|
-
#esxi.vm_disk_store =
|
139
|
+
#esxi.vm_disk_store = 'DS_001'
|
140
|
+
|
141
|
+
# OPTIONAL. Specify a disk type.
|
142
|
+
# If unspecified, it will be set to 'thin', Otherwise, you can set to:
|
143
|
+
# 'thin', 'thick', or 'eagerzeroedthick'
|
144
|
+
#esxo.vm_disk_type = 'thick'
|
137
145
|
|
138
146
|
# OPTIONAL. Guest VM name to use.
|
139
147
|
# The Default will be automatically generated. It will be based on
|
140
148
|
# the vmname_prefix (see below), your hostname & username and path.
|
141
149
|
# Otherwise you can set a fixed guest VM name here.
|
142
|
-
#esxi.vmname =
|
150
|
+
#esxi.vmname = 'Custom-Guest-VM_Name'
|
143
151
|
|
144
152
|
# OPTIONAL. When automatically naming VMs, use
|
145
153
|
# this prifix.
|
146
|
-
#esxi.vmname_prefix =
|
154
|
+
#esxi.vmname_prefix = 'V-'
|
147
155
|
|
148
156
|
# OPTIONAL. Memory size override
|
149
157
|
# The default is to use the memory size specified in the
|
150
158
|
# vmx file, however you can specify a new value here.
|
151
|
-
#esxi.memsize =
|
159
|
+
#esxi.memsize = '2048'
|
152
160
|
|
153
161
|
# OPTIONAL. Virtual CPUs override
|
154
162
|
# The default is to use the number of virtual cpus specified
|
155
163
|
# in the vmx file, however you can specify a new value here.
|
156
|
-
#esxi.numvcpus =
|
164
|
+
#esxi.numvcpus = '2'
|
157
165
|
|
158
166
|
# OPTIONAL. Resource Pool
|
159
|
-
# If unspecified, the default is to create VMs in the
|
167
|
+
# If unspecified, the default is to create VMs in the 'root'. You can
|
160
168
|
# specify a resource pool here to partition memory and cpu usage away
|
161
169
|
# from other systems on your esxi host. The resource pool must
|
162
170
|
# already exist and have the proper permissions set.
|
163
171
|
#
|
164
172
|
# Vagrant will NOT create a Resource pool it for you.
|
165
|
-
#esxi.resource_pool =
|
173
|
+
#esxi.resource_pool = '/Vagrant'
|
166
174
|
|
167
175
|
# RISKY. guestos
|
168
176
|
# if unspecified, the default will be generated by the OVFTool. Most
|
@@ -170,7 +178,7 @@ Vagrant.configure("2") do |config|
|
|
170
178
|
# the correct information from the box. See my page on supported guestos
|
171
179
|
# types for ESXI.
|
172
180
|
# https://github.com/josenk/vagrant-vmware-esxi/ESXi_guestos_types.md
|
173
|
-
#esxi.guestos =
|
181
|
+
#esxi.guestos = 'centos7-64'
|
174
182
|
|
175
183
|
# OPTIONAL. virtualhw_version
|
176
184
|
# If unspecified, the default will be generated by the OVFTool. Most
|
@@ -204,5 +212,9 @@ Vagrant.configure("2") do |config|
|
|
204
212
|
# This will also overwrite your box when using vagrant package.
|
205
213
|
#esxi.allow_overwrite = 'True'
|
206
214
|
|
215
|
+
# Plugin debug output.
|
216
|
+
# Send bug reports with debug output...
|
217
|
+
#esxi.debug = 'true'
|
218
|
+
|
207
219
|
end
|
208
220
|
end
|