vagrant-parallels 1.4.0.rc1 → 1.4.0
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/lib/vagrant-parallels/driver/base.rb +7 -3
- data/lib/vagrant-parallels/version.rb +1 -1
- data/test/unit/driver/pd_8_test.rb +0 -20
- data/test/unit/driver/pd_9_test.rb +0 -21
- data/test/unit/support/shared/pd_driver_examples.rb +21 -0
- data/vagrant-parallels.gemspec +1 -0
- metadata +2 -38
- data/website/docs/build/404.html +0 -134
- data/website/docs/build/docs/boxes/base.html +0 -207
- data/website/docs/build/docs/boxes/index.html +0 -161
- data/website/docs/build/docs/boxes/packer.html +0 -181
- data/website/docs/build/docs/boxes/veewee.html +0 -225
- data/website/docs/build/docs/configuration.html +0 -231
- data/website/docs/build/docs/contacts.html +0 -134
- data/website/docs/build/docs/getting-started.html +0 -164
- data/website/docs/build/docs/index.html +0 -157
- data/website/docs/build/docs/installation/index.html +0 -152
- data/website/docs/build/docs/installation/uninstallation.html +0 -141
- data/website/docs/build/docs/installation/updating.html +0 -139
- data/website/docs/build/docs/networking/forwarded_ports.html +0 -196
- data/website/docs/build/docs/networking/index.html +0 -155
- data/website/docs/build/docs/networking/private_network.html +0 -177
- data/website/docs/build/docs/networking/public_network.html +0 -173
- data/website/docs/build/docs/share.html +0 -151
- data/website/docs/build/docs/usage.html +0 -146
- data/website/docs/build/images/current_pointer-539d41b3.png +0 -0
- data/website/docs/build/images/footer_pd_logo-6ec6c3c6.png +0 -0
- data/website/docs/build/images/footer_vagrant_logo-8c7e7b39.png +0 -0
- data/website/docs/build/images/logo_docs-7e96bb5e.png +0 -0
- data/website/docs/build/images/logo_docs_small-c0512386.png +0 -0
- data/website/docs/build/images/nav_divider-0c73f644.png +0 -0
- data/website/docs/build/images/open_close-8d5572c4.png +0 -0
- data/website/docs/build/index.html +0 -157
- data/website/docs/build/javascripts/backstretch-f9c163c1.js +0 -4
- data/website/docs/build/javascripts/bootstrap.min-98cc7a22.js +0 -7
- data/website/docs/build/javascripts/fittext-b487af57.js +0 -10
- data/website/docs/build/javascripts/grid-overlay-19e89cad.js +0 -19
- data/website/docs/build/javascripts/jquery-15b079d7.js +0 -3
- data/website/docs/build/javascripts/less-1.3.0.min-0bbbfaf9.js +0 -3
- data/website/docs/build/javascripts/modernizr-d56a170f.js +0 -8
- data/website/docs/build/javascripts/vagrant-parallels-966ff22c.js +0 -1
- data/website/docs/build/stylesheets/bootstrap-8082a218.css +0 -9
- data/website/docs/build/stylesheets/vagrant-parallels-a389b6ea.css +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 306ebd48d59715804e53acffe8374dce654da8d6
|
4
|
+
data.tar.gz: fec3081ce4be30623c2cbe6e9382748d54791369
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d9850ddedfb13d1876f207bfe07d57e131a438a65638c02d003f1f447bf23378b9ef16ef901b80e478aee78c51fc3629f004458c017da57ca7e757049f8d6c3
|
7
|
+
data.tar.gz: 0a838571c3b37e78c99e129fd5d2bddfa6910ac2b07a90211f616995aaed665c9400aa723da566def421b82b26bf65f4a263b0ab8b10bab94a74407534517d88
|
@@ -261,14 +261,15 @@ module VagrantPlugins
|
|
261
261
|
# Returns an IP of the virtual machine. It requires that Shared network
|
262
262
|
# adapter is configured for this VM and it obtains an IP via DHCP.
|
263
263
|
#
|
264
|
-
#
|
265
264
|
# @return [String] IP address leased by DHCP server in "Shared" network
|
266
265
|
def read_guest_ip
|
267
266
|
mac_addr = read_mac_address.downcase
|
268
267
|
leases_file = '/Library/Preferences/Parallels/parallels_dhcp_leases'
|
268
|
+
leases = {}
|
269
269
|
begin
|
270
270
|
File.open(leases_file).grep(/#{mac_addr}/) do |line|
|
271
|
-
|
271
|
+
_, ip, exp, dur, _, _ = line.split /([\d.]*)="(\d*),(\d*),(\w*),(\w*)".*/
|
272
|
+
leases[ip] = exp.to_i - dur.to_i
|
272
273
|
end
|
273
274
|
rescue Errno::EACCES
|
274
275
|
raise Errors::DhcpLeasesNotAccessible, :leases_file => leases_file.to_s
|
@@ -278,7 +279,10 @@ module VagrantPlugins
|
|
278
279
|
return nil
|
279
280
|
end
|
280
281
|
|
281
|
-
nil
|
282
|
+
return nil if leases.empty?
|
283
|
+
|
284
|
+
# Get the most resent lease and return an associated IP
|
285
|
+
leases.sort_by { |_ip, lease_time| lease_time }.last.first
|
282
286
|
end
|
283
287
|
|
284
288
|
# Returns path to the Parallels Tools ISO file.
|
@@ -7,24 +7,4 @@ describe VagrantPlugins::Parallels::Driver::PD_8 do
|
|
7
7
|
subject { VagrantPlugins::Parallels::Driver::Meta.new(uuid) }
|
8
8
|
|
9
9
|
it_behaves_like "parallels desktop driver"
|
10
|
-
|
11
|
-
describe "ssh_ip" do
|
12
|
-
let(:content) {'10.200.0.99="1394547632,1800,001c420000ff,01001c420000ff"'}
|
13
|
-
|
14
|
-
it "returns an IP address assigned to the specified MAC" do
|
15
|
-
driver.should_receive(:read_mac_address).and_return("001C420000FF")
|
16
|
-
File.should_receive(:open).with(an_instance_of(String)).
|
17
|
-
and_return(StringIO.new(content))
|
18
|
-
|
19
|
-
subject.ssh_ip.should == "10.200.0.99"
|
20
|
-
end
|
21
|
-
|
22
|
-
it "rises DhcpLeasesNotAccessible exception when file is not accessible" do
|
23
|
-
File.stub(:open).and_call_original
|
24
|
-
File.should_receive(:open).with(an_instance_of(String)).
|
25
|
-
and_raise(Errno::EACCES)
|
26
|
-
expect { subject.ssh_ip }.
|
27
|
-
to raise_error(VagrantPlugins::Parallels::Errors::DhcpLeasesNotAccessible)
|
28
|
-
end
|
29
|
-
end
|
30
10
|
end
|
@@ -26,25 +26,4 @@ describe VagrantPlugins::Parallels::Driver::PD_9 do
|
|
26
26
|
subject.set_power_consumption_mode(false)
|
27
27
|
end
|
28
28
|
end
|
29
|
-
|
30
|
-
describe "ssh_ip" do
|
31
|
-
let(:content) {'10.200.0.99="1394547632,1800,001c420000ff,01001c420000ff"'}
|
32
|
-
|
33
|
-
it "returns an IP address assigned to the specified MAC" do
|
34
|
-
driver.should_receive(:read_mac_address).and_return("001C420000FF")
|
35
|
-
File.should_receive(:open).with(an_instance_of(String)).
|
36
|
-
and_return(StringIO.new(content))
|
37
|
-
|
38
|
-
subject.ssh_ip.should == "10.200.0.99"
|
39
|
-
end
|
40
|
-
|
41
|
-
it "rises DhcpLeasesNotAccessible exception when file is not accessible" do
|
42
|
-
File.stub(:open).and_call_original
|
43
|
-
File.should_receive(:open).with(an_instance_of(String)).
|
44
|
-
and_raise(Errno::EACCES)
|
45
|
-
expect { subject.ssh_ip }.
|
46
|
-
to raise_error(VagrantPlugins::Parallels::Errors::DhcpLeasesNotAccessible)
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
29
|
end
|
@@ -269,6 +269,27 @@ shared_examples "parallels desktop driver" do |options|
|
|
269
269
|
end
|
270
270
|
end
|
271
271
|
|
272
|
+
describe "ssh_ip" do
|
273
|
+
let(:content) {'10.200.0.100="1394546410,1800,001c420000ff,01001c420000ff
|
274
|
+
10.200.0.99="1394547632,1800,001c420000ff,01001c420000ff"'}
|
275
|
+
|
276
|
+
it "returns an IP address assigned to the specified MAC" do
|
277
|
+
driver.should_receive(:read_mac_address).and_return("001C420000FF")
|
278
|
+
File.should_receive(:open).with(an_instance_of(String)).
|
279
|
+
and_return(StringIO.new(content))
|
280
|
+
|
281
|
+
subject.ssh_ip.should == "10.200.0.99"
|
282
|
+
end
|
283
|
+
|
284
|
+
it "rises DhcpLeasesNotAccessible exception when file is not accessible" do
|
285
|
+
File.stub(:open).and_call_original
|
286
|
+
File.should_receive(:open).with(an_instance_of(String)).
|
287
|
+
and_raise(Errno::EACCES)
|
288
|
+
expect { subject.ssh_ip }.
|
289
|
+
to raise_error(VagrantPlugins::Parallels::Errors::DhcpLeasesNotAccessible)
|
290
|
+
end
|
291
|
+
end
|
292
|
+
|
272
293
|
describe "start" do
|
273
294
|
it "starts the VM" do
|
274
295
|
subprocess.should_receive(:execute).
|
data/vagrant-parallels.gemspec
CHANGED
@@ -31,6 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
root_path = File.dirname(__FILE__)
|
32
32
|
all_files = Dir.chdir(root_path) { Dir.glob("**/{*,.*}") }
|
33
33
|
all_files.reject! { |file| [".", ".."].include?(File.basename(file)) }
|
34
|
+
all_files.reject! { |file| file.start_with?("website/") }
|
34
35
|
gitignore_path = File.join(root_path, ".gitignore")
|
35
36
|
gitignore = File.readlines(gitignore_path)
|
36
37
|
gitignore.map! { |line| line.chomp.strip }
|
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.4.0
|
4
|
+
version: 1.4.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: 2015-06-
|
12
|
+
date: 2015-06-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -181,42 +181,6 @@ files:
|
|
181
181
|
- test/unit/synced_folder_test.rb
|
182
182
|
- vagrant-parallels.gemspec
|
183
183
|
- vagrant-spec.config.example.rb
|
184
|
-
- website/docs/build/404.html
|
185
|
-
- website/docs/build/docs/boxes/base.html
|
186
|
-
- website/docs/build/docs/boxes/index.html
|
187
|
-
- website/docs/build/docs/boxes/packer.html
|
188
|
-
- website/docs/build/docs/boxes/veewee.html
|
189
|
-
- website/docs/build/docs/configuration.html
|
190
|
-
- website/docs/build/docs/contacts.html
|
191
|
-
- website/docs/build/docs/getting-started.html
|
192
|
-
- website/docs/build/docs/index.html
|
193
|
-
- website/docs/build/docs/installation/index.html
|
194
|
-
- website/docs/build/docs/installation/uninstallation.html
|
195
|
-
- website/docs/build/docs/installation/updating.html
|
196
|
-
- website/docs/build/docs/networking/forwarded_ports.html
|
197
|
-
- website/docs/build/docs/networking/index.html
|
198
|
-
- website/docs/build/docs/networking/private_network.html
|
199
|
-
- website/docs/build/docs/networking/public_network.html
|
200
|
-
- website/docs/build/docs/share.html
|
201
|
-
- website/docs/build/docs/usage.html
|
202
|
-
- website/docs/build/images/current_pointer-539d41b3.png
|
203
|
-
- website/docs/build/images/footer_pd_logo-6ec6c3c6.png
|
204
|
-
- website/docs/build/images/footer_vagrant_logo-8c7e7b39.png
|
205
|
-
- website/docs/build/images/logo_docs-7e96bb5e.png
|
206
|
-
- website/docs/build/images/logo_docs_small-c0512386.png
|
207
|
-
- website/docs/build/images/nav_divider-0c73f644.png
|
208
|
-
- website/docs/build/images/open_close-8d5572c4.png
|
209
|
-
- website/docs/build/index.html
|
210
|
-
- website/docs/build/javascripts/backstretch-f9c163c1.js
|
211
|
-
- website/docs/build/javascripts/bootstrap.min-98cc7a22.js
|
212
|
-
- website/docs/build/javascripts/fittext-b487af57.js
|
213
|
-
- website/docs/build/javascripts/grid-overlay-19e89cad.js
|
214
|
-
- website/docs/build/javascripts/jquery-15b079d7.js
|
215
|
-
- website/docs/build/javascripts/less-1.3.0.min-0bbbfaf9.js
|
216
|
-
- website/docs/build/javascripts/modernizr-d56a170f.js
|
217
|
-
- website/docs/build/javascripts/vagrant-parallels-966ff22c.js
|
218
|
-
- website/docs/build/stylesheets/bootstrap-8082a218.css
|
219
|
-
- website/docs/build/stylesheets/vagrant-parallels-a389b6ea.css
|
220
184
|
homepage: http://github.com/Parallels/vagrant-parallels
|
221
185
|
licenses:
|
222
186
|
- MIT
|
data/website/docs/build/404.html
DELETED
@@ -1,134 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
|
6
|
-
<title>Vagrant Parallels Provider Documentation</title>
|
7
|
-
|
8
|
-
<!-- meta -->
|
9
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
10
|
-
|
11
|
-
<!-- lib styles -->
|
12
|
-
<link href="stylesheets/bootstrap-8082a218.css" media="screen" rel="stylesheet" type="text/css" />
|
13
|
-
<link href="stylesheets/vagrant-parallels-a389b6ea.css" media="screen" rel="stylesheet" type="text/css" />
|
14
|
-
|
15
|
-
<!-- lib js -->
|
16
|
-
<script src="javascripts/jquery-15b079d7.js" type="text/javascript"></script>
|
17
|
-
<script src="javascripts/modernizr-d56a170f.js" type="text/javascript"></script>
|
18
|
-
<script src="javascripts/bootstrap.min-98cc7a22.js" type="text/javascript"></script>
|
19
|
-
<script src="javascripts/backstretch-f9c163c1.js" type="text/javascript"></script>
|
20
|
-
<script src="javascripts/vagrant-parallels-966ff22c.js" type="text/javascript"></script>
|
21
|
-
|
22
|
-
<!-- fonts -->
|
23
|
-
<link href='http://fonts.googleapis.com/css?family=Inconsolata' rel='stylesheet' type='text/css'>
|
24
|
-
|
25
|
-
</head>
|
26
|
-
<body>
|
27
|
-
<!-- wrap everything -->
|
28
|
-
<div class="wrapper">
|
29
|
-
|
30
|
-
<!-- nav -->
|
31
|
-
|
32
|
-
<nav class="docs">
|
33
|
-
<div class="container">
|
34
|
-
<!-- vagrant logo -->
|
35
|
-
<a class="vagrant-docs-logo" href="docs/">Vagrant Parallels Documentation</a>
|
36
|
-
<!-- nav -->
|
37
|
-
<ul class="pull-right">
|
38
|
-
<li><a href="https://docs.vagrantup.com">Vagrant Docs</a></li>
|
39
|
-
<li><a href="https://github.com/Parallels/vagrant-parallels">Github</a></li>
|
40
|
-
</ul>
|
41
|
-
</div> <!-- container -->
|
42
|
-
</nav>
|
43
|
-
|
44
|
-
<div class="page docs docs-home">
|
45
|
-
<div class="container">
|
46
|
-
<div class="sidebar span4">
|
47
|
-
<!-- get the sidebar nav -->
|
48
|
-
<!-- side nav docs -->
|
49
|
-
<aside class="sidebar-nav">
|
50
|
-
|
51
|
-
<div class="toggle hidden-desktop">
|
52
|
-
<div class="open-close open"></div>
|
53
|
-
<a href="#">Contents</a>
|
54
|
-
</div>
|
55
|
-
|
56
|
-
<ul class="unstyled">
|
57
|
-
<li><a href="docs/">Overview</a></li>
|
58
|
-
|
59
|
-
<li><a href="docs/installation/">Installation</a></li>
|
60
|
-
|
61
|
-
|
62
|
-
<li><a href="docs/usage.html">Usage</a></li>
|
63
|
-
|
64
|
-
<li><a href="docs/getting-started.html">Getting Started</a></li>
|
65
|
-
|
66
|
-
<li><a href="docs/share.html">Vagrant Share</a></li>
|
67
|
-
|
68
|
-
<li><a href="docs/boxes/">Boxes</a></li>
|
69
|
-
|
70
|
-
|
71
|
-
<li><a href="docs/configuration.html">Configuration</a></li>
|
72
|
-
|
73
|
-
<li><a href="docs/networking/">Networking</a></li>
|
74
|
-
|
75
|
-
|
76
|
-
<li><a href="docs/contacts.html">Contacts</a></li>
|
77
|
-
|
78
|
-
</ul>
|
79
|
-
</aside> <!-- /.sidebar -->
|
80
|
-
</div> <!-- /.sidebar -->
|
81
|
-
|
82
|
-
<div class="page-contents span9">
|
83
|
-
<div class="page-background"></div>
|
84
|
-
|
85
|
-
<!-- start page content -->
|
86
|
-
<div class="row">
|
87
|
-
<div class="span8 offset1">
|
88
|
-
<h2>Page Not Found</h4>
|
89
|
-
|
90
|
-
<p>
|
91
|
-
Sorry, the page you tried to visit doesn't exist. This could be our fault,
|
92
|
-
and if so we'll fix that up right away. Please go back, or go back
|
93
|
-
<a href="/">home</a> to get back on track.
|
94
|
-
</p>
|
95
|
-
|
96
|
-
</div> <!-- /.span8 -->
|
97
|
-
</div> <!-- /.row -->
|
98
|
-
</div> <!-- /.page-contents -->
|
99
|
-
</div> <!-- /.container -->
|
100
|
-
</div> <!-- /.page -->
|
101
|
-
|
102
|
-
<!-- footer -->
|
103
|
-
<footer>
|
104
|
-
<div class="container">
|
105
|
-
<div class="row">
|
106
|
-
<ul class="unstyled logos">
|
107
|
-
<a href="http://www.vagrantup.com/downloads.html">
|
108
|
-
<li class="vagrant-logo-monochrome">
|
109
|
-
<p>Vagrant</p>
|
110
|
-
</li>
|
111
|
-
</a>
|
112
|
-
<a href="http://www.parallels.com/downloads/desktop/">
|
113
|
-
<li class="pd-logo-monochrome">
|
114
|
-
<p>Parallels Desktop</p>
|
115
|
-
</li>
|
116
|
-
</a>
|
117
|
-
</ul> <!-- /span -->
|
118
|
-
|
119
|
-
</div> <!-- /row -->
|
120
|
-
|
121
|
-
<div class="row">
|
122
|
-
<h6 class="legal">
|
123
|
-
© 2015 Parallels IP Holdings GmbH.
|
124
|
-
</h6>
|
125
|
-
</div> <!-- row -->
|
126
|
-
</div> <!-- container -->
|
127
|
-
</footer>
|
128
|
-
|
129
|
-
<!-- close .wrapper -->
|
130
|
-
</div>
|
131
|
-
|
132
|
-
<!-- load scripts -->
|
133
|
-
</body>
|
134
|
-
</html>
|
@@ -1,207 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
|
6
|
-
<title> Creating a Base Box - Vagrant Parallels Provider Documentation</title>
|
7
|
-
|
8
|
-
<!-- meta -->
|
9
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
10
|
-
|
11
|
-
<!-- lib styles -->
|
12
|
-
<link href="../../stylesheets/bootstrap-8082a218.css" media="screen" rel="stylesheet" type="text/css" />
|
13
|
-
<link href="../../stylesheets/vagrant-parallels-a389b6ea.css" media="screen" rel="stylesheet" type="text/css" />
|
14
|
-
|
15
|
-
<!-- lib js -->
|
16
|
-
<script src="../../javascripts/jquery-15b079d7.js" type="text/javascript"></script>
|
17
|
-
<script src="../../javascripts/modernizr-d56a170f.js" type="text/javascript"></script>
|
18
|
-
<script src="../../javascripts/bootstrap.min-98cc7a22.js" type="text/javascript"></script>
|
19
|
-
<script src="../../javascripts/backstretch-f9c163c1.js" type="text/javascript"></script>
|
20
|
-
<script src="../../javascripts/vagrant-parallels-966ff22c.js" type="text/javascript"></script>
|
21
|
-
|
22
|
-
<!-- fonts -->
|
23
|
-
<link href='http://fonts.googleapis.com/css?family=Inconsolata' rel='stylesheet' type='text/css'>
|
24
|
-
|
25
|
-
</head>
|
26
|
-
<body>
|
27
|
-
<!-- wrap everything -->
|
28
|
-
<div class="wrapper">
|
29
|
-
|
30
|
-
<!-- nav -->
|
31
|
-
|
32
|
-
<nav class="docs">
|
33
|
-
<div class="container">
|
34
|
-
<!-- vagrant logo -->
|
35
|
-
<a class="vagrant-docs-logo" href="../">Vagrant Parallels Documentation</a>
|
36
|
-
<!-- nav -->
|
37
|
-
<ul class="pull-right">
|
38
|
-
<li><a href="https://docs.vagrantup.com">Vagrant Docs</a></li>
|
39
|
-
<li><a href="https://github.com/Parallels/vagrant-parallels">Github</a></li>
|
40
|
-
</ul>
|
41
|
-
</div> <!-- container -->
|
42
|
-
</nav>
|
43
|
-
|
44
|
-
<div class="page docs docs-home">
|
45
|
-
<div class="container">
|
46
|
-
<div class="sidebar span4">
|
47
|
-
<!-- get the sidebar nav -->
|
48
|
-
<!-- side nav docs -->
|
49
|
-
<aside class="sidebar-nav">
|
50
|
-
|
51
|
-
<div class="toggle hidden-desktop">
|
52
|
-
<div class="open-close open"></div>
|
53
|
-
<a href="#">Contents</a>
|
54
|
-
</div>
|
55
|
-
|
56
|
-
<ul class="unstyled">
|
57
|
-
<li><a href="../">Overview</a></li>
|
58
|
-
|
59
|
-
<li><a href="../installation/">Installation</a></li>
|
60
|
-
|
61
|
-
|
62
|
-
<li><a href="../usage.html">Usage</a></li>
|
63
|
-
|
64
|
-
<li><a href="../getting-started.html">Getting Started</a></li>
|
65
|
-
|
66
|
-
<li><a href="../share.html">Vagrant Share</a></li>
|
67
|
-
|
68
|
-
<li><a href="./">Boxes</a></li>
|
69
|
-
|
70
|
-
<ul class="sub unstyled">
|
71
|
-
<li class="current"><a href="base.html">Creating a Base Box</a></li>
|
72
|
-
<li><a href="packer.html">Using Packer</a></li>
|
73
|
-
<li><a href="veewee.html">Using Veewee</a></li>
|
74
|
-
</ul>
|
75
|
-
|
76
|
-
|
77
|
-
<li><a href="../configuration.html">Configuration</a></li>
|
78
|
-
|
79
|
-
<li><a href="../networking/">Networking</a></li>
|
80
|
-
|
81
|
-
|
82
|
-
<li><a href="../contacts.html">Contacts</a></li>
|
83
|
-
|
84
|
-
</ul>
|
85
|
-
</aside> <!-- /.sidebar -->
|
86
|
-
</div> <!-- /.sidebar -->
|
87
|
-
|
88
|
-
<div class="page-contents span9">
|
89
|
-
<div class="page-background"></div>
|
90
|
-
|
91
|
-
<!-- start page content -->
|
92
|
-
<div class="row">
|
93
|
-
<div class="span8 offset1">
|
94
|
-
<h1>Creating a Base Box</h1>
|
95
|
-
|
96
|
-
<div class="alert alert-warn">
|
97
|
-
<p>
|
98
|
-
<strong>Warning: Advanced Topic!</strong> Creating a base box can be a
|
99
|
-
time consuming and tedious process, and is not recommended for new
|
100
|
-
Vagrant users. If you're just getting started with Vagrant, we
|
101
|
-
recommend trying to find <a href="https://atlas.hashicorp.com/parallels">
|
102
|
-
existing base boxes</a> to use first.
|
103
|
-
</p>
|
104
|
-
</div>
|
105
|
-
|
106
|
-
<p>This page documents the box format so that you can create your own base boxes
|
107
|
-
manually.</p>
|
108
|
-
|
109
|
-
<p>Prior to reading this page, please check out the <a href="http://docs.vagrantup.com/v2/boxes/format.html">basics of the Vagrant
|
110
|
-
box file format</a>.</p>
|
111
|
-
|
112
|
-
<h2>Contents</h2>
|
113
|
-
|
114
|
-
<p>A Parallels base box is a compressed archive of the necessary contents of
|
115
|
-
a Parallels "pvm" file. Here is an example of what is contained in such a box:</p>
|
116
|
-
|
117
|
-
<pre><code>$ tree
|
118
|
-
.
|
119
|
-
├── Vagrantfile
|
120
|
-
├── box.pvm
|
121
|
-
│ ├── NVRAM.dat
|
122
|
-
│ ├── VmInfo.pvi
|
123
|
-
│ ├── config.pvs
|
124
|
-
│ └── harddisk.hdd
|
125
|
-
│ └── ...
|
126
|
-
└── metadata.json
|
127
|
-
</code></pre>
|
128
|
-
|
129
|
-
<p><code>config.pvs</code> and <code>.hdd</code> files are strictly required for a Parallels virtual
|
130
|
-
machine.</p>
|
131
|
-
|
132
|
-
<p>There is also the "metadata.json" file used by Vagrant itself. This file
|
133
|
-
contains nothing but the defaults which are documented on the <a href="http://docs.vagrantup.com/v2/boxes/format.html">box format</a> page.</p>
|
134
|
-
|
135
|
-
<h2>Installed Software</h2>
|
136
|
-
|
137
|
-
<p>Base boxes for the Parallels provider should have the following software
|
138
|
-
installed, as a bare minimum:</p>
|
139
|
-
|
140
|
-
<ul>
|
141
|
-
<li><p>SSH server with key-based authentication setup. If you want the box to work
|
142
|
-
with default Vagrant settings, the SSH user must be set to accept the <a href="https://github.com/mitchellh/vagrant/blob/master/keys/vagrant.pub">insecure
|
143
|
-
keypair</a>
|
144
|
-
that ships with Vagrant.</p></li>
|
145
|
-
<li><p><a href="http://download.parallels.com/desktop/v9/ga/docs/en_US/
|
146
|
-
Parallels%20Desktop%20User&#x27;s%20Guide/32791.htm">Parallels Tools</a> so that things such as shared
|
147
|
-
folders can function. There are many other benefits to installing the tools,
|
148
|
-
such as networking configuration and device mapping.</p></li>
|
149
|
-
</ul>
|
150
|
-
|
151
|
-
<h2>Optimizing the Box Size</h2>
|
152
|
-
|
153
|
-
<p>Prior to packaging up a box, you should shrink the hard drives as much as
|
154
|
-
possible. This can be done with <code>prl_disk_tool</code>:</p>
|
155
|
-
|
156
|
-
<pre><code>$ prl_disk_tool compact /path/to/harddisk.hdd
|
157
|
-
</code></pre>
|
158
|
-
|
159
|
-
<h2>Packaging</h2>
|
160
|
-
|
161
|
-
<p>Remove any extraneous files from the "pvm" folder and package it. Be sure to
|
162
|
-
compress the tar with gzip (done below in a single command) since Parallels
|
163
|
-
hard disks are not compressed by default.</p>
|
164
|
-
|
165
|
-
<pre><code>$ cd /path/to/my/box.pvm/..
|
166
|
-
$ tar cvzf custom.box ./box.pvm ./Vagrantfile ./metadata.json
|
167
|
-
</code></pre>
|
168
|
-
|
169
|
-
</div> <!-- /.span8 -->
|
170
|
-
</div> <!-- /.row -->
|
171
|
-
</div> <!-- /.page-contents -->
|
172
|
-
</div> <!-- /.container -->
|
173
|
-
</div> <!-- /.page -->
|
174
|
-
|
175
|
-
<!-- footer -->
|
176
|
-
<footer>
|
177
|
-
<div class="container">
|
178
|
-
<div class="row">
|
179
|
-
<ul class="unstyled logos">
|
180
|
-
<a href="http://www.vagrantup.com/downloads.html">
|
181
|
-
<li class="vagrant-logo-monochrome">
|
182
|
-
<p>Vagrant</p>
|
183
|
-
</li>
|
184
|
-
</a>
|
185
|
-
<a href="http://www.parallels.com/downloads/desktop/">
|
186
|
-
<li class="pd-logo-monochrome">
|
187
|
-
<p>Parallels Desktop</p>
|
188
|
-
</li>
|
189
|
-
</a>
|
190
|
-
</ul> <!-- /span -->
|
191
|
-
|
192
|
-
</div> <!-- /row -->
|
193
|
-
|
194
|
-
<div class="row">
|
195
|
-
<h6 class="legal">
|
196
|
-
© 2015 Parallels IP Holdings GmbH.
|
197
|
-
</h6>
|
198
|
-
</div> <!-- row -->
|
199
|
-
</div> <!-- container -->
|
200
|
-
</footer>
|
201
|
-
|
202
|
-
<!-- close .wrapper -->
|
203
|
-
</div>
|
204
|
-
|
205
|
-
<!-- load scripts -->
|
206
|
-
</body>
|
207
|
-
</html>
|