vagrant-parallels 1.6.2 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +29 -0
- data/LICENSE.txt +1 -1
- data/lib/vagrant-parallels/action.rb +7 -0
- data/lib/vagrant-parallels/action/box_unregister.rb +3 -0
- data/lib/vagrant-parallels/action/check_shared_interface.rb +29 -0
- data/lib/vagrant-parallels/action/clear_forwarded_ports.rb +3 -2
- data/lib/vagrant-parallels/action/export.rb +69 -6
- data/lib/vagrant-parallels/action/forward_ports.rb +1 -1
- data/lib/vagrant-parallels/action/network.rb +8 -10
- data/lib/vagrant-parallels/action/sane_defaults.rb +2 -1
- data/lib/vagrant-parallels/cap.rb +0 -1
- data/lib/vagrant-parallels/config.rb +18 -8
- data/lib/vagrant-parallels/driver/base.rb +68 -24
- data/lib/vagrant-parallels/driver/meta.rb +3 -1
- data/lib/vagrant-parallels/driver/pd_10.rb +36 -39
- data/lib/vagrant-parallels/driver/pd_11.rb +4 -0
- data/lib/vagrant-parallels/driver/pd_8.rb +31 -27
- data/lib/vagrant-parallels/errors.rb +10 -2
- data/lib/vagrant-parallels/version.rb +1 -1
- data/locales/en.yml +25 -9
- metadata +4 -29
- data/.gitignore +0 -34
- data/.travis.yml +0 -10
- data/CONTRIBUTING.md +0 -80
- data/Gemfile +0 -14
- data/Rakefile +0 -21
- data/debug.log +0 -1237
- data/tasks/acceptance.rake +0 -28
- data/tasks/bundler.rake +0 -3
- data/tasks/test.rake +0 -8
- data/test/acceptance/base.rb +0 -2
- data/test/acceptance/provider/linked_clone_spec.rb +0 -30
- data/test/acceptance/provider/snapshot_spec.rb +0 -63
- data/test/acceptance/shared/context_parallels.rb +0 -2
- data/test/acceptance/skeletons/linked_clone/Vagrantfile +0 -7
- data/test/unit/base.rb +0 -24
- data/test/unit/cap_test.rb +0 -96
- data/test/unit/config_test.rb +0 -91
- data/test/unit/driver/pd_10_test.rb +0 -31
- data/test/unit/driver/pd_8_test.rb +0 -10
- data/test/unit/driver/pd_9_test.rb +0 -29
- data/test/unit/support/shared/parallels_context.rb +0 -230
- data/test/unit/support/shared/pd_driver_examples.rb +0 -339
- data/test/unit/synced_folder_test.rb +0 -49
- data/vagrant-parallels.gemspec +0 -59
- data/vagrant-spec.config.example.rb +0 -10
@@ -74,7 +74,8 @@ module VagrantPlugins
|
|
74
74
|
def_delegators :@driver,
|
75
75
|
:clear_forwarded_ports,
|
76
76
|
:clear_shared_folders,
|
77
|
-
:
|
77
|
+
:compact_hdd,
|
78
|
+
:connect_network_interface,
|
78
79
|
:create_host_only_network,
|
79
80
|
:create_snapshot,
|
80
81
|
:delete,
|
@@ -99,6 +100,7 @@ module VagrantPlugins
|
|
99
100
|
:read_network_interfaces,
|
100
101
|
:read_shared_interface,
|
101
102
|
:read_shared_folders,
|
103
|
+
:read_shared_network_id,
|
102
104
|
:read_settings,
|
103
105
|
:read_state,
|
104
106
|
:read_used_ports,
|
@@ -15,10 +15,10 @@ module VagrantPlugins
|
|
15
15
|
@logger = Log4r::Logger.new('vagrant_parallels::driver::pd_10')
|
16
16
|
end
|
17
17
|
|
18
|
-
def clear_forwarded_ports
|
18
|
+
def clear_forwarded_ports(ports)
|
19
19
|
args = []
|
20
|
-
|
21
|
-
args.concat(["--nat-#{r[:protocol]}-del", r[:
|
20
|
+
ports.each do |r|
|
21
|
+
args.concat(["--nat-#{r[:protocol]}-del", r[:name]])
|
22
22
|
end
|
23
23
|
|
24
24
|
if !args.empty?
|
@@ -32,7 +32,7 @@ module VagrantPlugins
|
|
32
32
|
# 'Shared'(vnic0) and 'Host-Only'(vnic1) are default in Parallels Desktop
|
33
33
|
# They should not be deleted anyway.
|
34
34
|
networks.keep_if do |net|
|
35
|
-
net['Type'] == 'host-only' &&
|
35
|
+
net['Type'] == 'host-only' && net['Bound To'] &&
|
36
36
|
net['Bound To'].match(/^(?>vnic|Parallels Host-Only #)(\d+)$/)[1].to_i >= 2
|
37
37
|
end
|
38
38
|
|
@@ -131,31 +131,25 @@ module VagrantPlugins
|
|
131
131
|
|
132
132
|
hostonly_ifaces = []
|
133
133
|
net_list.each do |iface|
|
134
|
-
|
135
|
-
|
136
|
-
|
134
|
+
net_info = json do
|
135
|
+
execute_prlsrvctl('net', 'info', iface['Network ID'], '--json')
|
136
|
+
end
|
137
137
|
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
if dhcp_info && (network_address(info[:ip], info[:netmask]) ==
|
151
|
-
network_address(dhcp_info['Server address'], info[:netmask]))
|
152
|
-
info[:dhcp] = {
|
153
|
-
ip: dhcp_info['Server address'],
|
154
|
-
lower: dhcp_info['IP scope start address'],
|
155
|
-
upper: dhcp_info['IP scope end address']
|
156
|
-
}
|
138
|
+
iface = {
|
139
|
+
name: net_info['Network ID'],
|
140
|
+
status: 'Down'
|
141
|
+
}
|
142
|
+
|
143
|
+
adapter = net_info['Parallels adapter']
|
144
|
+
if adapter && net_info['Bound To']
|
145
|
+
# In PD >= 10.1.2 there are new field names for an IP/Subnet
|
146
|
+
iface[:ip] = adapter['IP address'] || adapter['IPv4 address']
|
147
|
+
iface[:netmask] = adapter['Subnet mask'] || adapter['IPv4 subnet mask']
|
148
|
+
iface[:bound_to] = net_info['Bound To']
|
149
|
+
iface[:status] = 'Up'
|
157
150
|
end
|
158
|
-
|
151
|
+
|
152
|
+
hostonly_ifaces << iface
|
159
153
|
end
|
160
154
|
hostonly_ifaces
|
161
155
|
end
|
@@ -189,19 +183,22 @@ module VagrantPlugins
|
|
189
183
|
execute_prlsrvctl('net', 'info', read_shared_network_id, '--json')
|
190
184
|
end
|
191
185
|
|
186
|
+
iface = {
|
187
|
+
nat: [],
|
188
|
+
status: 'Down'
|
189
|
+
}
|
192
190
|
adapter = net_info['Parallels adapter']
|
193
191
|
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
status
|
200
|
-
|
201
|
-
}
|
192
|
+
if adapter && net_info['Bound To']
|
193
|
+
# In PD >= 10.1.2 there are new field names for an IP/Subnet
|
194
|
+
iface[:ip] = adapter['IP address'] || adapter['IPv4 address']
|
195
|
+
iface[:netmask] = adapter['Subnet mask'] || adapter['IPv4 subnet mask']
|
196
|
+
iface[:bound_to] = net_info['Bound To']
|
197
|
+
iface[:status] = 'Up'
|
198
|
+
end
|
202
199
|
|
203
200
|
if net_info.key?('DHCPv4 server')
|
204
|
-
|
201
|
+
iface[:dhcp] = {
|
205
202
|
ip: net_info['DHCPv4 server']['Server address'],
|
206
203
|
lower: net_info['DHCPv4 server']['IP scope start address'],
|
207
204
|
upper: net_info['DHCPv4 server']['IP scope end address']
|
@@ -210,8 +207,8 @@ module VagrantPlugins
|
|
210
207
|
|
211
208
|
net_info['NAT server'].each do |group, rules|
|
212
209
|
rules.each do |name, params|
|
213
|
-
|
214
|
-
|
210
|
+
iface[:nat] << {
|
211
|
+
name: name,
|
215
212
|
protocol: group == 'TCP rules' ? 'tcp' : 'udp',
|
216
213
|
guest: params['destination IP/VM id'],
|
217
214
|
hostport: params['source port'],
|
@@ -220,7 +217,7 @@ module VagrantPlugins
|
|
220
217
|
end
|
221
218
|
end
|
222
219
|
|
223
|
-
|
220
|
+
iface
|
224
221
|
end
|
225
222
|
|
226
223
|
def read_used_ports
|
@@ -98,27 +98,24 @@ module VagrantPlugins
|
|
98
98
|
|
99
99
|
hostonly_ifaces = []
|
100
100
|
net_list.each do |iface|
|
101
|
-
|
102
|
-
|
103
|
-
info[:name] = net_info['Network ID']
|
104
|
-
info[:bound_to] = net_info['Bound To']
|
105
|
-
info[:ip] = net_info['Parallels adapter']['IP address']
|
106
|
-
info[:netmask] = net_info['Parallels adapter']['Subnet mask']
|
107
|
-
# Such interfaces are always in 'Up'
|
108
|
-
info[:status] = 'Up'
|
109
|
-
|
110
|
-
# There may be a fake DHCPv4 parameters
|
111
|
-
# We can trust them only if adapter IP and DHCP IP are in the same subnet
|
112
|
-
dhcp_info = net_info['DHCPv4 server']
|
113
|
-
if dhcp_info && (network_address(info[:ip], info[:netmask]) ==
|
114
|
-
network_address(dhcp_info['Server address'], info[:netmask]))
|
115
|
-
info[:dhcp] = {
|
116
|
-
ip: dhcp_info['Server address'],
|
117
|
-
lower: dhcp_info['IP scope start address'],
|
118
|
-
upper: dhcp_info['IP scope end address']
|
119
|
-
}
|
101
|
+
net_info = json do
|
102
|
+
execute_prlsrvctl('net', 'info', iface['Network ID'], '--json')
|
120
103
|
end
|
121
|
-
|
104
|
+
|
105
|
+
iface = {
|
106
|
+
name: net_info['Network ID'],
|
107
|
+
status: 'Down'
|
108
|
+
}
|
109
|
+
|
110
|
+
adapter = net_info['Parallels adapter']
|
111
|
+
if adapter && net_info['Bound To']
|
112
|
+
iface[:ip] = adapter['IP address']
|
113
|
+
iface[:netmask] = adapter['Subnet mask']
|
114
|
+
iface[:bound_to] = net_info['Bound To']
|
115
|
+
iface[:status] = 'Up'
|
116
|
+
end
|
117
|
+
|
118
|
+
hostonly_ifaces << iface
|
122
119
|
end
|
123
120
|
hostonly_ifaces
|
124
121
|
end
|
@@ -156,22 +153,29 @@ module VagrantPlugins
|
|
156
153
|
net_info = json do
|
157
154
|
execute_prlsrvctl('net', 'info', read_shared_network_id, '--json')
|
158
155
|
end
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
status: 'Up'
|
156
|
+
|
157
|
+
iface = {
|
158
|
+
nat: [],
|
159
|
+
status: 'Down'
|
164
160
|
}
|
165
161
|
|
162
|
+
adapter = net_info['Parallels adapter']
|
163
|
+
if adapter && net_info['Bound To']
|
164
|
+
iface[:ip] = adapter['IP address']
|
165
|
+
iface[:netmask] = adapter['Subnet mask']
|
166
|
+
iface[:bound_to] = net_info['Bound To']
|
167
|
+
iface[:status] = 'Up'
|
168
|
+
end
|
169
|
+
|
166
170
|
if net_info.key?('DHCPv4 server')
|
167
|
-
|
171
|
+
iface[:dhcp] = {
|
168
172
|
ip: net_info['DHCPv4 server']['Server address'],
|
169
173
|
lower: net_info['DHCPv4 server']['IP scope start address'],
|
170
174
|
upper: net_info['DHCPv4 server']['IP scope end address']
|
171
175
|
}
|
172
176
|
end
|
173
177
|
|
174
|
-
|
178
|
+
iface
|
175
179
|
end
|
176
180
|
end
|
177
181
|
end
|
@@ -19,6 +19,10 @@ module VagrantPlugins
|
|
19
19
|
error_key(:dhcp_leases_file_not_accessible)
|
20
20
|
end
|
21
21
|
|
22
|
+
class ExternalDiskNotFound < VagrantParallelsError
|
23
|
+
error_key(:external_disk_not_found)
|
24
|
+
end
|
25
|
+
|
22
26
|
class JSONParseError < VagrantParallelsError
|
23
27
|
error_key(:json_parse_error)
|
24
28
|
end
|
@@ -71,8 +75,12 @@ module VagrantPlugins
|
|
71
75
|
error_key(:parallels_unsupported_version)
|
72
76
|
end
|
73
77
|
|
74
|
-
class
|
75
|
-
error_key(:
|
78
|
+
class SharedInterfaceDisconnected < VagrantParallelsError
|
79
|
+
error_key(:shared_interface_disconnected)
|
80
|
+
end
|
81
|
+
|
82
|
+
class SharedInterfaceNotFound < VagrantParallelsError
|
83
|
+
error_key(:shared_interface_not_found)
|
76
84
|
end
|
77
85
|
|
78
86
|
class SnapshotIdNotDetected < VagrantParallelsError
|
data/locales/en.yml
CHANGED
@@ -38,6 +38,13 @@ en:
|
|
38
38
|
JSON string is shown below:
|
39
39
|
|
40
40
|
%{data}
|
41
|
+
|
42
|
+
external_disk_not_found: |-
|
43
|
+
External disk image could not be found. In case of linked clone it is
|
44
|
+
usually because the parent VM image was removed. It means that the virtual
|
45
|
+
disk is inconsistent, please remove it from the VM configuration.
|
46
|
+
|
47
|
+
Disk image path: %{path}
|
41
48
|
linux_mount_failed: |-
|
42
49
|
Failed to mount folders in Linux guest. This is usually because
|
43
50
|
the "prl_fs" file system is not available. Please verify that
|
@@ -69,12 +76,12 @@ en:
|
|
69
76
|
appears that every slot is in use. Please lower the number of used
|
70
77
|
network adapters.
|
71
78
|
parallels_not_detected: |-
|
72
|
-
Vagrant could not detect Parallels Desktop! Make sure it is properly installed.
|
73
|
-
Vagrant uses the `prlctl` binary that ships with
|
74
|
-
|
75
|
-
the `prlctl` binary
|
79
|
+
Vagrant could not detect Parallels Desktop Pro! Make sure it is properly installed.
|
80
|
+
Vagrant uses the `prlctl` binary that only ships with Pro and Business
|
81
|
+
editions of Parallels Desktop. If the one is installed, please make sure
|
82
|
+
that the `prlctl` binary is available on the PATH environment variable.
|
76
83
|
parallels_tools_iso_not_found: |-
|
77
|
-
Parallels Tools ISO file does not
|
84
|
+
Parallels Tools ISO file does not exist. The Parallels provider uses it
|
78
85
|
to install or update Parallels Tools in the guest machine. Try to
|
79
86
|
reinstall Parallels Desktop.
|
80
87
|
|
@@ -110,10 +117,16 @@ en:
|
|
110
117
|
check and try again.
|
111
118
|
|
112
119
|
Snapshot ID: %{snapshot}
|
113
|
-
|
114
|
-
Shared network
|
115
|
-
It is required
|
116
|
-
network configuration in your Vagrantfile.
|
120
|
+
shared_interface_not_found: |-
|
121
|
+
Shared network interface was not found in your virtual machine configuration.
|
122
|
+
It is required for communications with VM and port forwarding. Please
|
123
|
+
check network configuration in your Vagrantfile.
|
124
|
+
shared_interface_disconnected: |-
|
125
|
+
Your Mac host is not connected to Shared network. It is required for
|
126
|
+
communications with VM and port forwarding. Please enable this option in GUI:
|
127
|
+
|
128
|
+
Parallels Desktop -> Preferences -> Network -> Shared -> Connect Mac to this network
|
129
|
+
|
117
130
|
vm_clone_failure: |-
|
118
131
|
The VM cloning failed! Please ensure that the box you're using is not
|
119
132
|
corrupted and try again.
|
@@ -184,6 +197,8 @@ en:
|
|
184
197
|
box:
|
185
198
|
register: Registering VM image from the base box '%{name}'...
|
186
199
|
unregister: Unregistering the box VM image...
|
200
|
+
check_shared_interface:
|
201
|
+
connecting: Connecting host to Shared network...
|
187
202
|
clone:
|
188
203
|
full: Cloning new virtual machine...
|
189
204
|
linked: Creating new virtual machine as a linked clone...
|
@@ -211,6 +226,7 @@ en:
|
|
211
226
|
reload your VM.
|
212
227
|
export:
|
213
228
|
compacting: Compacting exported HDDs...
|
229
|
+
copying_linked_disks: Copying linked disks...
|
214
230
|
forward_ports:
|
215
231
|
forwarding_entry: |-
|
216
232
|
%{guest_port} => %{host_port}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-parallels
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikhail Zholobov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-07-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -75,21 +75,15 @@ executables: []
|
|
75
75
|
extensions: []
|
76
76
|
extra_rdoc_files: []
|
77
77
|
files:
|
78
|
-
- ".gitignore"
|
79
|
-
- ".travis.yml"
|
80
78
|
- CHANGELOG.md
|
81
|
-
- CONTRIBUTING.md
|
82
|
-
- Gemfile
|
83
79
|
- LICENSE.txt
|
84
80
|
- README.md
|
85
|
-
- Rakefile
|
86
|
-
- Vagrantfile
|
87
|
-
- debug.log
|
88
81
|
- lib/vagrant-parallels.rb
|
89
82
|
- lib/vagrant-parallels/action.rb
|
90
83
|
- lib/vagrant-parallels/action/boot.rb
|
91
84
|
- lib/vagrant-parallels/action/box_register.rb
|
92
85
|
- lib/vagrant-parallels/action/box_unregister.rb
|
86
|
+
- lib/vagrant-parallels/action/check_shared_interface.rb
|
93
87
|
- lib/vagrant-parallels/action/clear_forwarded_ports.rb
|
94
88
|
- lib/vagrant-parallels/action/clear_network_interfaces.rb
|
95
89
|
- lib/vagrant-parallels/action/clear_shared_folders.rb
|
@@ -137,25 +131,6 @@ files:
|
|
137
131
|
- lib/vagrant-parallels/util/compile_forwarded_ports.rb
|
138
132
|
- lib/vagrant-parallels/version.rb
|
139
133
|
- locales/en.yml
|
140
|
-
- tasks/acceptance.rake
|
141
|
-
- tasks/bundler.rake
|
142
|
-
- tasks/test.rake
|
143
|
-
- test/acceptance/base.rb
|
144
|
-
- test/acceptance/provider/linked_clone_spec.rb
|
145
|
-
- test/acceptance/provider/snapshot_spec.rb
|
146
|
-
- test/acceptance/shared/context_parallels.rb
|
147
|
-
- test/acceptance/skeletons/linked_clone/Vagrantfile
|
148
|
-
- test/unit/base.rb
|
149
|
-
- test/unit/cap_test.rb
|
150
|
-
- test/unit/config_test.rb
|
151
|
-
- test/unit/driver/pd_10_test.rb
|
152
|
-
- test/unit/driver/pd_8_test.rb
|
153
|
-
- test/unit/driver/pd_9_test.rb
|
154
|
-
- test/unit/support/shared/parallels_context.rb
|
155
|
-
- test/unit/support/shared/pd_driver_examples.rb
|
156
|
-
- test/unit/synced_folder_test.rb
|
157
|
-
- vagrant-parallels.gemspec
|
158
|
-
- vagrant-spec.config.example.rb
|
159
134
|
homepage: http://github.com/Parallels/vagrant-parallels
|
160
135
|
licenses:
|
161
136
|
- MIT
|
@@ -176,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
151
|
version: 1.3.6
|
177
152
|
requirements: []
|
178
153
|
rubyforge_project: vagrant-parallels
|
179
|
-
rubygems_version: 2.
|
154
|
+
rubygems_version: 2.4.5.1
|
180
155
|
signing_key:
|
181
156
|
specification_version: 4
|
182
157
|
summary: Parallels provider for Vagrant.
|
data/.gitignore
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
# OS-specific
|
2
|
-
.DS_Store
|
3
|
-
|
4
|
-
# Vagrant stuff
|
5
|
-
acceptance_config.yml
|
6
|
-
boxes/*
|
7
|
-
/Vagrantfile
|
8
|
-
.vagrant
|
9
|
-
vagrant-spec.config.rb
|
10
|
-
|
11
|
-
# Bundler/Rubygems
|
12
|
-
*.gem
|
13
|
-
.bundle
|
14
|
-
pkg/*
|
15
|
-
tags
|
16
|
-
Gemfile.lock
|
17
|
-
test/tmp/
|
18
|
-
/vendor
|
19
|
-
|
20
|
-
# Python
|
21
|
-
*.pyc
|
22
|
-
|
23
|
-
# Rubinius
|
24
|
-
*.rbc
|
25
|
-
|
26
|
-
# IDE junk
|
27
|
-
.idea/*
|
28
|
-
*.iml
|
29
|
-
|
30
|
-
# Ruby Managers
|
31
|
-
.rbenv
|
32
|
-
.ruby-gemset
|
33
|
-
.ruby-version
|
34
|
-
.rvmrc
|