vagrant-parallels 0.2.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +5 -3
- data/README.md +58 -58
- data/config/i18n-tasks.yml.erb +5 -0
- data/lib/vagrant-parallels/action.rb +2 -1
- data/lib/vagrant-parallels/action/check_guest_tools.rb +1 -1
- data/lib/vagrant-parallels/action/network.rb +2 -2
- data/lib/vagrant-parallels/plugin.rb +2 -2
- data/lib/vagrant-parallels/synced_folder.rb +6 -5
- data/lib/vagrant-parallels/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63f2802c08f2dca252035eebdba9346ca7e8ca1d
|
4
|
+
data.tar.gz: 5c67f4b8efb10f42d9062ef63a4009b92f64a60f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42a742b4c31a08b698902c283d29145ffeb9ef3abaac6584030b823790ae5756a06f162f42d78aa67e4f531aa5ac1d74def2e24ff6094cd22fcf983bd4162bff
|
7
|
+
data.tar.gz: 0bfa98293a6d5aace8a2cb4617837cce15e74c0b70ff9491f8e9d6f8a73e1df598e6e2f5f58ccde4d68b7a2e58f8d6daccbfc985f837871d84ae19238ff9fb92
|
data/Gemfile
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
source 'http://rubygems.org'
|
2
2
|
|
3
|
-
|
4
|
-
gemspec
|
3
|
+
group :plugins do
|
4
|
+
# Specify your gem's dependencies in vagrant-parallels.gemspec
|
5
|
+
gemspec
|
6
|
+
end
|
5
7
|
|
6
8
|
group :development do
|
7
9
|
# We depend on Vagrant for development, but we don't add it as a
|
8
10
|
# gem dependency because we expect to be installed within the
|
9
11
|
# Vagrant environment itself using `vagrant plugin`.
|
10
|
-
gem 'vagrant', :git => 'git://github.com/mitchellh/vagrant.git'
|
12
|
+
gem 'vagrant', :git => 'git://github.com/mitchellh/vagrant.git'
|
11
13
|
end
|
data/README.md
CHANGED
@@ -4,32 +4,43 @@
|
|
4
4
|
[![Code Climate](https://codeclimate.com/github/Parallels/vagrant-parallels.png)](https://codeclimate.com/github/Parallels/vagrant-parallels)
|
5
5
|
|
6
6
|
This is a plugin for [Vagrant](http://www.vagrantup.com),
|
7
|
-
allowing to power
|
8
|
-
|
7
|
+
allowing to power [Parallels Desktop for Mac](http://www.parallels.com/downloads/desktop/)
|
8
|
+
based virtual machines.
|
9
9
|
|
10
10
|
### Requirements
|
11
11
|
- Parallels Desktop for Mac 8 or 9
|
12
|
-
- Vagrant v1.
|
12
|
+
- Vagrant v1.5 or higher
|
13
13
|
|
14
14
|
If you're just getting started with Vagrant, it is highly recommended that you
|
15
15
|
read the official [Vagrant documentation](http://docs.vagrantup.com/v2/) first.
|
16
16
|
|
17
17
|
## Features
|
18
|
-
Parallels provider supports all basic Vagrant features, except one:
|
18
|
+
The Parallels provider supports all basic Vagrant features, except one:
|
19
|
+
**"Forwarded ports" configuration is not available yet**.
|
19
20
|
|
20
|
-
It might be implemented in the future, after the next release of Parallels
|
21
|
+
It might be implemented in the future, after the next release of Parallels
|
22
|
+
Desktop for Mac.
|
21
23
|
|
22
24
|
## Installation
|
23
|
-
First
|
25
|
+
First, make sure that you have [Parallels Desktop for Mac](http://www.parallels.com/products/desktop/)
|
24
26
|
and [Vagrant](http://www.vagrantup.com/downloads) properly installed.
|
25
27
|
We recommend that you use the latest versions of these products.
|
26
28
|
|
27
|
-
Since Parallels provider is a Vagrant plugin, installing is easy:
|
29
|
+
Since the Parallels provider is a Vagrant plugin, installing it is easy:
|
28
30
|
|
29
31
|
```
|
30
32
|
$ vagrant plugin install vagrant-parallels
|
31
33
|
```
|
32
34
|
|
35
|
+
#### Compatibility with Vagrant 1.4
|
36
|
+
We recommend that you to use the latest version of [Vagrant](http://www.vagrantup.com/downloads.html).
|
37
|
+
If for any reason you want to use a previous version of Vagrant (1.4.x), you
|
38
|
+
should install a compatible version of the Parallels provider as described below:
|
39
|
+
|
40
|
+
```
|
41
|
+
$ vagrant plugin install vagrant-parallels --plugin-version 0.2.2
|
42
|
+
```
|
43
|
+
|
33
44
|
## Usage
|
34
45
|
Parallels provider is used just like any other provider. Please read the general
|
35
46
|
[basic usage](http://docs.vagrantup.com/v2/providers/basic_usage.html) page for
|
@@ -43,59 +54,50 @@ $ vagrant up --provider=parallels
|
|
43
54
|
...
|
44
55
|
```
|
45
56
|
|
46
|
-
You need
|
47
|
-
before doing
|
57
|
+
You need a Parallels compatible box specified in your `Vagrantfile`
|
58
|
+
before doing `vagrant up`, please refer to the *Boxes* section for instructions.
|
48
59
|
|
49
60
|
### Default Provider
|
50
61
|
|
51
|
-
You can use `VAGRANT_DEFAULT_PROVIDER`
|
52
|
-
default provider. Just set it to `parallels` and then it
|
53
|
-
to add `--provider` flag to vagrant commands.
|
62
|
+
You can use `VAGRANT_DEFAULT_PROVIDER` environment variable to specify the
|
63
|
+
default provider. Just set it to `parallels` and then it will not be necessary
|
64
|
+
to add the `--provider` flag to vagrant commands.
|
54
65
|
|
55
66
|
```
|
56
67
|
export VAGRANT_DEFAULT_PROVIDER=parallels
|
57
68
|
```
|
58
69
|
|
59
|
-
You can also add this command to
|
70
|
+
You can also add this command to the `~/.bashrc` file
|
60
71
|
(or `~/.zshrc` if your shell is Zsh) to make this setting permanent.
|
61
72
|
|
62
73
|
## Boxes
|
63
74
|
|
64
75
|
Every provider in Vagrant must introduce a custom box format.
|
65
76
|
|
66
|
-
As with every provider, Parallels provider has a custom box format.
|
67
|
-
|
68
|
-
|
69
|
-
- Ubuntu 12.04 x86_64:
|
70
|
-
[http://download.parallels.com/desktop/vagrant/precise64.box]
|
71
|
-
(http://download.parallels.com/desktop/vagrant/precise64.box)
|
77
|
+
As with every provider, the Parallels provider has a custom box format.
|
78
|
+
The following base boxes for Parallels provider are available:
|
72
79
|
|
73
|
-
- Ubuntu
|
74
|
-
[http://download.parallels.com/desktop/vagrant/saucy64.box]
|
75
|
-
(http://download.parallels.com/desktop/vagrant/saucy64.box)
|
80
|
+
- Ubuntu 12.04 x86_64: `parallels/ubuntu-12.04`
|
76
81
|
|
77
|
-
-
|
78
|
-
[http://download.parallels.com/desktop/vagrant/CentOS-6.5-x86_64.box]
|
79
|
-
(http://download.parallels.com/desktop/vagrant/CentOS-6.5-x86_64.box)
|
82
|
+
- Ubuntu 13.10 x86_64: `parallels/ubuntu-13.10`
|
80
83
|
|
81
|
-
- CentOS 5.9
|
82
|
-
[http://download.parallels.com/desktop/vagrant/CentOS-5.9-x86_64.box]
|
83
|
-
(http://download.parallels.com/desktop/vagrant/CentOS-5.9-x86_64.box)
|
84
|
+
- CentOS 6.5 x86_64: `parallels/centos-5.9`
|
84
85
|
|
86
|
+
- CentOS 5.9 x86_64: `parallels/centos-6.5`
|
85
87
|
|
86
88
|
You can add one of these boxes using the next command:
|
87
89
|
|
88
90
|
```
|
89
|
-
$ vagrant box add
|
91
|
+
$ vagrant box add parallels/centos-6.5
|
90
92
|
```
|
91
93
|
|
92
94
|
## Networking
|
93
|
-
By default
|
94
|
-
approach. Initially
|
95
|
-
in Parallels Desktop.
|
95
|
+
By default, The Parallels provider uses the basic Vagrant networking
|
96
|
+
approach. Initially, a virtual machine has one adapter assigned to the 'Shared'
|
97
|
+
network in Parallels Desktop.
|
96
98
|
|
97
|
-
|
98
|
-
These features are working
|
99
|
+
In addition, you can add `:private_network` and `:public_network` adapters.
|
100
|
+
These features are working the same way as in the basic Vagrant:
|
99
101
|
- [Private Networks]
|
100
102
|
(http://docs.vagrantup.com/v2/networking/private_network.html)
|
101
103
|
- [Public Networks]
|
@@ -103,12 +105,12 @@ These features are working by the same way as in the basic Vagrant:
|
|
103
105
|
|
104
106
|
## Provider Specific Configuration
|
105
107
|
|
106
|
-
Parallels Desktop has
|
107
|
-
to Parallels virtual machines
|
108
|
+
Parallels Desktop has the `prlctl` command-line utility that can be used to make
|
109
|
+
modifications to Parallels virtual machines.
|
108
110
|
|
109
111
|
|
110
|
-
Parallels provider
|
111
|
-
to
|
112
|
+
The Parallels provider allows to execute the prlctl command with any of
|
113
|
+
avialable options just prior to starting a virtual machine:
|
112
114
|
|
113
115
|
```ruby
|
114
116
|
config.vm.provider "parallels" do |v|
|
@@ -117,17 +119,14 @@ config.vm.provider "parallels" do |v|
|
|
117
119
|
end
|
118
120
|
```
|
119
121
|
|
120
|
-
In the example above, the
|
121
|
-
|
122
|
-
|
123
|
-
* The `:id` special parameter is replaced with the ID of the virtual
|
124
|
-
machine being created, so when a *prlctl* command requires an ID, you
|
125
|
-
can pass this special parameter.
|
122
|
+
In the example above, the virtual machine is modified to have a specified ISO
|
123
|
+
image mounted on it's virtual media device (cdrom). The `:id` parameter is
|
124
|
+
replaced with the actual virtual machine ID.
|
126
125
|
|
127
|
-
|
128
|
-
|
126
|
+
Multiple `customize` directives can be used. They will be executed in the
|
127
|
+
given order.
|
129
128
|
|
130
|
-
|
129
|
+
The virtual machine memory and CPU settings can be modified easily:
|
131
130
|
|
132
131
|
```ruby
|
133
132
|
config.vm.provider "parallels" do |v|
|
@@ -157,16 +156,16 @@ Once you have the dependencies, verify the unit tests pass with `rake`:
|
|
157
156
|
$ bundle exec rake
|
158
157
|
```
|
159
158
|
|
160
|
-
If
|
161
|
-
the plugin without installing it into your Vagrant environment by
|
162
|
-
creating a `Vagrantfile` in the top level of this directory (it is added
|
163
|
-
and add the following line to your `Vagrantfile`
|
159
|
+
If they pass, you're ready to start developing the plugin. You can test
|
160
|
+
the plugin without installing it into your Vagrant environment by simply
|
161
|
+
creating a `Vagrantfile` in the top level of this directory (it is added
|
162
|
+
to *.gitignore*) and add the following line to your `Vagrantfile`
|
164
163
|
|
165
164
|
```ruby
|
166
165
|
Vagrant.require_plugin "vagrant-parallels"
|
167
166
|
```
|
168
167
|
|
169
|
-
You need
|
168
|
+
You need a compatible box file installed. Refer to the *Boxes* section.
|
170
169
|
|
171
170
|
Use bundler to execute Vagrant:
|
172
171
|
|
@@ -176,7 +175,8 @@ $ bundle exec vagrant up --provider=parallels
|
|
176
175
|
|
177
176
|
###Installing Parallels Provider From Source
|
178
177
|
|
179
|
-
If you want to globally install your locally built plugin from source, use the
|
178
|
+
If you want to globally install your locally built plugin from source, use the
|
179
|
+
following method:
|
180
180
|
|
181
181
|
```
|
182
182
|
$ cd vagrant-parallels
|
@@ -187,7 +187,7 @@ $ bundle exec rake build
|
|
187
187
|
$ vagrant plugin install pkg/vagrant-parallels-<version>.gem
|
188
188
|
...
|
189
189
|
```
|
190
|
-
|
190
|
+
Now that you have your own plugin installed, check it with the command
|
191
191
|
`vagrant plugin list`
|
192
192
|
|
193
193
|
## Contributing
|
@@ -199,17 +199,17 @@ So, now that you have your own plugin installed, check it with the command
|
|
199
199
|
5. Create a pull request from your `my-new-feature` branch into master
|
200
200
|
|
201
201
|
## Getting help
|
202
|
-
Having problems while using
|
202
|
+
Having problems while using the provider? Ask your question to our mailing list:
|
203
203
|
[Google Group](https://groups.google.com/group/vagrant-parallels)
|
204
204
|
|
205
|
-
If you
|
206
|
-
|
205
|
+
If you get an error while using the Parallels provider or discover a bug,
|
206
|
+
please report it on the [IssueTracker](https://github.com/Parallels/vagrant-parallels).
|
207
207
|
|
208
208
|
## Credits
|
209
209
|
Great thanks to *Youssef Shahin* `@yshahin` for having initiated the development
|
210
210
|
of this provider. You've done a great job, Youssef!
|
211
211
|
|
212
|
-
Also, thanks to the people who helping this project stand on its feet, thank you
|
212
|
+
Also, thanks to the people who are helping this project stand on its feet, thank you
|
213
213
|
|
214
214
|
* Mikhail Zholobov `@legal90`
|
215
215
|
* Kevin Kaland `@wizonesolutions`
|
data/config/i18n-tasks.yml.erb
CHANGED
@@ -203,6 +203,7 @@ module VagrantPlugins
|
|
203
203
|
Vagrant::Action::Builder.new.tap do |b|
|
204
204
|
b.use CheckParallels
|
205
205
|
b.use ConfigValidate
|
206
|
+
b.use BoxCheckOutdated
|
206
207
|
b.use Call, IsRunning do |env, b2|
|
207
208
|
# If the VM is running, then our work here is done, exit
|
208
209
|
if env[:result]
|
@@ -252,7 +253,7 @@ module VagrantPlugins
|
|
252
253
|
# works fine.
|
253
254
|
b.use Call, Created do |env, b2|
|
254
255
|
if !env[:result]
|
255
|
-
b2.use
|
256
|
+
b2.use HandleBox
|
256
257
|
end
|
257
258
|
end
|
258
259
|
|
@@ -13,7 +13,7 @@ module VagrantPlugins
|
|
13
13
|
return @app.call(env)
|
14
14
|
end
|
15
15
|
|
16
|
-
env[:ui].
|
16
|
+
env[:ui].output(I18n.t("vagrant_parallels.parallels.checking_guest_tools"))
|
17
17
|
|
18
18
|
tools_version = env[:machine].provider.driver.read_guest_tools_version
|
19
19
|
if !tools_version
|
@@ -99,9 +99,9 @@ module VagrantPlugins
|
|
99
99
|
if !adapters.empty?
|
100
100
|
# Enable the adapters
|
101
101
|
@logger.info("Enabling adapters...")
|
102
|
-
env[:ui].
|
102
|
+
env[:ui].output(I18n.t("vagrant.actions.vm.network.preparing"))
|
103
103
|
adapters.each do |adapter|
|
104
|
-
env[:ui].
|
104
|
+
env[:ui].detail(I18n.t(
|
105
105
|
"vagrant_parallels.parallels.network_adapter",
|
106
106
|
adapter: adapter[:adapter].to_s,
|
107
107
|
type: adapter[:type].to_s,
|
@@ -6,8 +6,8 @@ end
|
|
6
6
|
|
7
7
|
# This is a sanity check to make sure no one is attempting to install
|
8
8
|
# this into an early Vagrant version.
|
9
|
-
if Vagrant::VERSION < "1.
|
10
|
-
raise "The Vagrant Parallels plugin is only compatible with Vagrant 1.
|
9
|
+
if Vagrant::VERSION < "1.5.0"
|
10
|
+
raise "The Vagrant Parallels plugin is only compatible with Vagrant 1.5+"
|
11
11
|
end
|
12
12
|
|
13
13
|
module VagrantPlugins
|
@@ -36,14 +36,15 @@ module VagrantPlugins
|
|
36
36
|
end
|
37
37
|
|
38
38
|
# Go through each folder and mount
|
39
|
-
machine.ui.
|
39
|
+
machine.ui.output(I18n.t("vagrant.actions.vm.share_folders.mounting"))
|
40
40
|
folders.each do |id, data|
|
41
41
|
if data[:guestpath]
|
42
42
|
id = Pathname.new(id).to_s.split('/').drop_while{|i| i.empty?}.join('_')
|
43
43
|
|
44
44
|
# Guest path specified, so mount the folder to specified point
|
45
|
-
machine.ui.
|
46
|
-
|
45
|
+
machine.ui.detail(I18n.t("vagrant.actions.vm.share_folders.mounting_entry",
|
46
|
+
guestpath: data[:guestpath],
|
47
|
+
hostpath: data[:hostpath]))
|
47
48
|
|
48
49
|
# Dup the data so we can pass it to the guest API
|
49
50
|
data = data.dup
|
@@ -58,8 +59,8 @@ module VagrantPlugins
|
|
58
59
|
:mount_parallels_shared_folder, id, data[:guestpath], data)
|
59
60
|
else
|
60
61
|
# If no guest path is specified, then automounting is disabled
|
61
|
-
machine.ui.
|
62
|
-
:
|
62
|
+
machine.ui.detail(I18n.t("vagrant.actions.vm.share_folders.nomount_entry",
|
63
|
+
:hostpath => data[:hostpath]))
|
63
64
|
end
|
64
65
|
end
|
65
66
|
end
|
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: 0.
|
4
|
+
version: 1.0.0
|
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: 2014-03-
|
12
|
+
date: 2014-03-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|