vagrant-vbguest 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -1
- data/Gemfile +2 -0
- data/Readme.md +9 -2
- data/lib/vagrant-vbguest/download.rb +12 -1
- data/lib/vagrant-vbguest/hosts/virtualbox.rb +1 -1
- data/lib/vagrant-vbguest/installers/fedora.rb +1 -1
- data/lib/vagrant-vbguest/installers/linux.rb +22 -13
- data/lib/vagrant-vbguest/installers/opensuse.rb +2 -2
- data/lib/vagrant-vbguest/installers/redhat.rb +3 -1
- data/lib/vagrant-vbguest/installers/ubuntu.rb +7 -2
- data/lib/vagrant-vbguest/machine.rb +1 -0
- data/lib/vagrant-vbguest/version.rb +1 -1
- data/locales/en.yml +7 -4
- data/vagrant-vbguest.gemspec +4 -6
- metadata +15 -45
- data/testdrive/Vagrantfile +0 -76
- data/testdrive/bin/vagrant +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc1f6f2bd15b21df77135855d0e54bdcb9fd55fe
|
4
|
+
data.tar.gz: a061a813e16a494c9326d0a2f075dfde2a249541
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8da979cc83735bbcca444ca81c35e0fd9b14fc0d1e0cd22b9f9bc1b9b5c5103d69036b81e2f9189d24ba0de169cbeb0a522c91c4c0e540a249705c2570e5c14d
|
7
|
+
data.tar.gz: fd8f2ffad4995dc674d3fe8e63609b2f62bd86c738735c6cff1c2794113a679c0ad84e89c0778b7949085ad38256c6b736bb4494ad1d7a58b30da879b583b62d
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,26 @@
|
|
1
|
-
## 0.
|
1
|
+
## 0.12.0 (2016-06-16)
|
2
|
+
|
3
|
+
- Fix version comparison when version is reported with revision. Thanks @apeabody for [GH-179], [GH-201]
|
4
|
+
- Fix package manager detection on Fedora. Thanks @robnagler for [GH-185]
|
5
|
+
- Fix missing `binutils` dependency for RedHat. Thanks @andy-maier for [GH-188]
|
6
|
+
- Fix detecting of `chkconfg` or `service` command. Thanks @jherre for [GH-191]
|
7
|
+
- Fix cleaning up temp files on Windows. Thanks @JexCheng for [GH-212]
|
8
|
+
- Fix ubuntu removing packaged_additions for old installations. [GH-199] Also thanks @thpang67 for [GH-208]
|
9
|
+
- Fix driver and service version comparison. Big thanks to @NeMO84 for [GH-213] and [GH-214]
|
10
|
+
- Improve installing dependencies on openSUSE. Thanks @vpereira for [GH-190]
|
11
|
+
- Improve detection of the VBoxGuestAdditions.iso file. Thanks @Raskil for [GH-206]
|
12
|
+
- Add the vm name to log outputs. Thanks @Tomohiro for [GH-210]
|
13
|
+
|
14
|
+
|
15
|
+
For those who want to create their own (or overwrite existing) installers, this sample for a vbguest driver plugin might help you to get started: https://github.com/dotless-de/vagrant-vbguest/tree/master/testdrive/vagrant-vbguest-unikorn
|
16
|
+
|
17
|
+
For a full diff see: https://github.com/dotless-de/vagrant-vbguest/compare/v0.11.0...v0.12.0
|
18
|
+
|
19
|
+
## 0.11.0 (2015-10-29)
|
2
20
|
|
3
21
|
- Add installer for opensuse. Thanks @darnells for [GH-163]
|
4
22
|
- Add installer for fedora. Thanks @jamesgecko and @PatrickCoffey for [GH-158]
|
23
|
+
- Add installer for oracle. Thanks @TobyHFerguson for [GH-145]
|
5
24
|
- Add redhat installer support for centos7. Thanks @roidelapluie for [GH-162]
|
6
25
|
- Add debian installer support for debian8. Thanks @ubermuda for [GH-171]
|
7
26
|
- Add ISO autodetection on Archlinux hosts. [GH-135]
|
data/Gemfile
CHANGED
data/Readme.md
CHANGED
@@ -2,7 +2,11 @@
|
|
2
2
|
|
3
3
|
*vagrant-vbguest* is a [Vagrant](http://vagrantup.com) plugin which automatically installs the host's VirtualBox Guest Additions on the guest system.
|
4
4
|
|
5
|
-
[![
|
5
|
+
[![Join the chat at https://gitter.im/dotless-de/vagrant-vbguest](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dotless-de/vagrant-vbguest?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
6
|
+
[![Code Climate](https://codeclimate.com/github/dotless-de/vagrant-vbguest.png)](https://codeclimate.com/github/dotless-de/vagrant-vbguest)
|
7
|
+
[![Dependency Status](https://gemnasium.com/dotless-de/vagrant-vbguest.png)](https://gemnasium.com/dotless-de/vagrant-vbguest)
|
8
|
+
[![Inline docs](http://inch-ci.org/github/dotless-de/vagrant-vbguest.svg?branch=master)](http://inch-ci.org/github/dotless-de/vagrant-vbguest)
|
9
|
+
[![Gem Version](https://badge.fury.io/rb/vagrant-vbguest.svg)](https://badge.fury.io/rb/vagrant-vbguest)
|
6
10
|
|
7
11
|
|
8
12
|
## Installation
|
@@ -42,8 +46,10 @@ Vagrant::Config.run do |config|
|
|
42
46
|
# we will try to autodetect this path.
|
43
47
|
# However, if we cannot or you have a special one you may pass it like:
|
44
48
|
# config.vbguest.iso_path = "#{ENV['HOME']}/Downloads/VBoxGuestAdditions.iso"
|
45
|
-
# or
|
49
|
+
# or an URL:
|
46
50
|
# config.vbguest.iso_path = "http://company.server/VirtualBox/%{version}/VBoxGuestAdditions.iso"
|
51
|
+
# or relative to the Vagrantfile:
|
52
|
+
# config.vbguest.iso_path = File.expand_path("../relative/path/to/VBoxGuestAdditions.iso", __FILE__)
|
47
53
|
|
48
54
|
# set auto_update to false, if you do NOT want to check the correct
|
49
55
|
# additions version when booting this machine
|
@@ -58,6 +64,7 @@ end
|
|
58
64
|
|
59
65
|
* `iso_path` : The full path or URL to the VBoxGuestAdditions.iso file. <br/>
|
60
66
|
The `iso_path` may contain the optional placeholder `%{version}` replaced with detected VirtualBox version (e.g. `4.1.8`).
|
67
|
+
Relative paths are tricky, try to use an absolute path where possible. If not, the path is relative to the current working directory, that is where the `vagrant` command is issued. You can make sure to always be relative to the `Vagrantfile` with a little bit of ruby: `File.expand_path("../relative/path/to/VBoxGuestAdditions.iso", __FILE__)`
|
61
68
|
The default URI for the actual iso download is: `http://download.virtualbox.org/virtualbox/%{version}/VBoxGuestAdditions_%{version}.iso`<br/>
|
62
69
|
vbguest will try to autodetect the best option for your system. WTF? see below.
|
63
70
|
* `iso_upload_path` (String, default: `/tmp`): A writeable directory where to put the VBoxGuestAdditions.iso file on the guest system.
|
@@ -20,7 +20,18 @@ module VagrantVbguest
|
|
20
20
|
def cleanup
|
21
21
|
if destination && File.exist?(destination)
|
22
22
|
@ui.info I18n.t("vagrant_vbguest.download.cleaning")
|
23
|
-
|
23
|
+
# Unlinking the downloaded file might crash on Windows
|
24
|
+
# see: https://github.com/dotless-de/vagrant-vbguest/issues/189
|
25
|
+
begin
|
26
|
+
# Even if delete failed on Windows, we still can clean this file to save disk space
|
27
|
+
File.open(destination,'wb') do |f|
|
28
|
+
f.write('')
|
29
|
+
f.close()
|
30
|
+
end
|
31
|
+
File.unlink(destination)
|
32
|
+
rescue Errno::EACCES => e
|
33
|
+
@ui.warn I18n.t("vagrant_vbguest.download.cleaning_failed", message: e.message, destination: destination)
|
34
|
+
end
|
24
35
|
end
|
25
36
|
end
|
26
37
|
end
|
@@ -87,7 +87,7 @@ module VagrantVbguest
|
|
87
87
|
# Makes an educated guess where the GuestAdditions iso file
|
88
88
|
# on windows systems
|
89
89
|
def windows_path
|
90
|
-
if (p = ENV["VBOX_INSTALL_PATH"]) && !p.empty?
|
90
|
+
if (p = ENV["VBOX_INSTALL_PATH"] || ENV["VBOX_MSI_INSTALL_PATH"]) && !p.empty?
|
91
91
|
File.join(p, "VBoxGuestAdditions.iso")
|
92
92
|
elsif (p = ENV["PROGRAM_FILES"] || ENV["ProgramW6432"] || ENV["PROGRAMFILES"]) && !p.empty?
|
93
93
|
File.join(p, "/Oracle/VirtualBox/VBoxGuestAdditions.iso")
|
@@ -79,12 +79,15 @@ module VagrantVbguest
|
|
79
79
|
# available on the guest, or `nil` if none installed.
|
80
80
|
def guest_version(reload = false)
|
81
81
|
return @guest_version if @guest_version && !reload
|
82
|
-
driver_version = super
|
82
|
+
driver_version = super.to_s[/^(\d+\.\d+.\d+)/, 1]
|
83
83
|
|
84
84
|
communicate.sudo('VBoxService --version', :error_check => false) do |type, data|
|
85
|
-
|
86
|
-
|
87
|
-
|
85
|
+
service_version = data.to_s[/^(\d+\.\d+.\d+)/, 1]
|
86
|
+
if service_version
|
87
|
+
if driver_version != service_version
|
88
|
+
@env.ui.warn(I18n.t("vagrant_vbguest.guest_version_reports_differ", :driver => driver_version, :service => service_version))
|
89
|
+
end
|
90
|
+
@guest_version = service_version
|
88
91
|
end
|
89
92
|
end
|
90
93
|
@guest_version
|
@@ -104,9 +107,8 @@ module VagrantVbguest
|
|
104
107
|
# @yieldparam [String] data Data for the given output.
|
105
108
|
def start(opts=nil, &block)
|
106
109
|
opts = {:error_check => false}.merge(opts || {})
|
107
|
-
|
108
|
-
|
109
|
-
communicate.sudo("#{systemd[:path]} vboxadd #{systemd[:up]}", opts, &block)
|
110
|
+
if systemd_tool
|
111
|
+
communicate.sudo("#{systemd_tool[:path]} vboxadd #{systemd_tool[:up]}", opts, &block)
|
110
112
|
else
|
111
113
|
communicate.sudo("#{vboxadd_tool} start", opts, &block)
|
112
114
|
end
|
@@ -120,17 +122,25 @@ module VagrantVbguest
|
|
120
122
|
# command string for starting.
|
121
123
|
# +nil* if neither was found.
|
122
124
|
def systemd_tool
|
125
|
+
return nil if @systemd_tool == false
|
126
|
+
|
123
127
|
result = nil
|
124
128
|
communicate.sudo('(which chkconfg || which service) 2>/dev/null', {:error_check => false}) do |type, data|
|
125
|
-
path = data.to_s
|
129
|
+
path = data.to_s.strip
|
126
130
|
case path
|
127
131
|
when /\bservice\b/
|
128
|
-
result = { path: path, up: "start" }
|
129
|
-
when /\
|
130
|
-
result = { path: path, up: "on" }
|
132
|
+
result = { path: path, up: "start", down: "stop" }
|
133
|
+
when /\bchkconfg\b/
|
134
|
+
result = { path: path, up: "on", down: "off" }
|
131
135
|
end
|
132
136
|
end
|
133
|
-
|
137
|
+
|
138
|
+
if result.nil?
|
139
|
+
@systemd_tool = false
|
140
|
+
nil
|
141
|
+
else
|
142
|
+
@systemd_tool = result
|
143
|
+
end
|
134
144
|
end
|
135
145
|
|
136
146
|
# Checks for the correct location of the 'vboxadd' tool.
|
@@ -149,7 +159,6 @@ module VagrantVbguest
|
|
149
159
|
"/lib/VBoxGuestAdditions/vboxadd",
|
150
160
|
"/etc/init.d/vboxadd",
|
151
161
|
]
|
152
|
-
bin_path = ""
|
153
162
|
cmd = <<-SHELL
|
154
163
|
for c in #{candidates.join(" ")}; do
|
155
164
|
if test -x "$c"; then
|
@@ -19,11 +19,11 @@ module VagrantVbguest
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def install_dependencies_cmd
|
22
|
-
"zypper --non-interactive install #{dependencies}"
|
22
|
+
"zypper --non-interactive install -t pattern #{dependencies}"
|
23
23
|
end
|
24
24
|
|
25
25
|
def dependencies
|
26
|
-
packages = ['
|
26
|
+
packages = ['devel_C_C++', 'devel_basis', 'devel_kernel']
|
27
27
|
packages.join ' '
|
28
28
|
end
|
29
29
|
end
|
@@ -9,7 +9,12 @@ module VagrantVbguest
|
|
9
9
|
def install(opts=nil, &block)
|
10
10
|
if packaged_additions?
|
11
11
|
unload_packaged_additions(opts, &block)
|
12
|
-
|
12
|
+
begin
|
13
|
+
remove_packaged_additions(opts, &block)
|
14
|
+
rescue
|
15
|
+
communicate.sudo('apt-get update', opts, &block)
|
16
|
+
remove_packaged_additions(opts, &block)
|
17
|
+
end
|
13
18
|
end
|
14
19
|
super
|
15
20
|
end
|
@@ -28,7 +33,7 @@ module VagrantVbguest
|
|
28
33
|
|
29
34
|
def unload_packaged_additions(opts=nil, &block)
|
30
35
|
commands = [
|
31
|
-
"
|
36
|
+
"#{systemd_tool[:path]} virtualbox-guest-utils #{systemd_tool[:down]}",
|
32
37
|
"umount -a -t vboxsf",
|
33
38
|
"rmmod vboxsf",
|
34
39
|
"rmmod vboxguest"
|
data/locales/en.yml
CHANGED
@@ -25,10 +25,10 @@ en:
|
|
25
25
|
unknown: unknown
|
26
26
|
|
27
27
|
status:
|
28
|
-
clean: "No installation found."
|
29
|
-
unmatched: "GuestAdditions versions on your host (%{host_version}) and guest (%{guest_version}) do not match."
|
30
|
-
not_running: "GuestAdditions seems to be installed (%{guest_version}) correctly, but not running."
|
31
|
-
ok: "GuestAdditions %{guest_version} running --- OK."
|
28
|
+
clean: "[%{vm_name}] No installation found."
|
29
|
+
unmatched: "[%{vm_name}] GuestAdditions versions on your host (%{host_version}) and guest (%{guest_version}) do not match."
|
30
|
+
not_running: "[%{vm_name}] GuestAdditions seems to be installed (%{guest_version}) correctly, but not running."
|
31
|
+
ok: "[%{vm_name}] GuestAdditions %{guest_version} running --- OK."
|
32
32
|
|
33
33
|
errors:
|
34
34
|
autodetect_iso_path: |-
|
@@ -60,4 +60,7 @@ en:
|
|
60
60
|
started: "Downloading VirtualBox Guest Additions ISO from %{source}"
|
61
61
|
with: "Downloading VirtualBox Guest Additions ISO with %{class}..."
|
62
62
|
cleaning: "Cleaning up downloaded VirtualBox Guest Additions ISO..."
|
63
|
+
cleaning_failed: |-
|
64
|
+
FAILED: %{message}
|
65
|
+
You might want to delete this file manually: %{destination}
|
63
66
|
unknown_type: "Unknown or unsupported URI type given for VirtualBox Guest Additions ISO download."
|
data/vagrant-vbguest.gemspec
CHANGED
@@ -14,17 +14,15 @@ Gem::Specification.new do |s|
|
|
14
14
|
|
15
15
|
s.required_rubygems_version = ">= 1.3.6"
|
16
16
|
|
17
|
-
s.add_dependency "micromachine", "~>
|
18
|
-
s.add_development_dependency "bundler", ">= 1.2.0"
|
17
|
+
s.add_dependency "micromachine", "~> 2.0.0"
|
19
18
|
|
20
19
|
# those should be satisfied by vagrant
|
21
20
|
s.add_dependency "i18n"
|
22
21
|
s.add_dependency "log4r"
|
23
|
-
s.add_development_dependency "rake"
|
24
22
|
|
25
|
-
s.files = `git ls-files`.split("\
|
26
|
-
s.
|
27
|
-
s.executables =
|
23
|
+
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|testdrive)/}) }
|
24
|
+
s.bindir = "exe"
|
25
|
+
s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
26
|
s.require_paths = ["lib"]
|
29
27
|
|
30
28
|
end
|
metadata
CHANGED
@@ -1,83 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-vbguest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Schulze
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: micromachine
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: bundler
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - '>='
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 1.2.0
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - '>='
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 1.2.0
|
26
|
+
version: 2.0.0
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: i18n
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
44
30
|
requirements:
|
45
|
-
- -
|
31
|
+
- - ">="
|
46
32
|
- !ruby/object:Gem::Version
|
47
33
|
version: '0'
|
48
34
|
type: :runtime
|
49
35
|
prerelease: false
|
50
36
|
version_requirements: !ruby/object:Gem::Requirement
|
51
37
|
requirements:
|
52
|
-
- -
|
38
|
+
- - ">="
|
53
39
|
- !ruby/object:Gem::Version
|
54
40
|
version: '0'
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: log4r
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
58
44
|
requirements:
|
59
|
-
- -
|
45
|
+
- - ">="
|
60
46
|
- !ruby/object:Gem::Version
|
61
47
|
version: '0'
|
62
48
|
type: :runtime
|
63
49
|
prerelease: false
|
64
50
|
version_requirements: !ruby/object:Gem::Requirement
|
65
51
|
requirements:
|
66
|
-
- -
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rake
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - '>='
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - '>='
|
52
|
+
- - ">="
|
81
53
|
- !ruby/object:Gem::Version
|
82
54
|
version: '0'
|
83
55
|
description: A Vagrant plugin which automatically installs the host's VirtualBox Guest
|
@@ -88,7 +60,7 @@ executables: []
|
|
88
60
|
extensions: []
|
89
61
|
extra_rdoc_files: []
|
90
62
|
files:
|
91
|
-
- .gitignore
|
63
|
+
- ".gitignore"
|
92
64
|
- CHANGELOG.md
|
93
65
|
- Gemfile
|
94
66
|
- LICENSE
|
@@ -134,8 +106,6 @@ files:
|
|
134
106
|
- lib/vagrant-vbguest/version.rb
|
135
107
|
- lib/vagrant_init.rb
|
136
108
|
- locales/en.yml
|
137
|
-
- testdrive/Vagrantfile
|
138
|
-
- testdrive/bin/vagrant
|
139
109
|
- vagrant-vbguest.gemspec
|
140
110
|
homepage: https://github.com/dotless-de/vagrant-vbguest
|
141
111
|
licenses:
|
@@ -147,17 +117,17 @@ require_paths:
|
|
147
117
|
- lib
|
148
118
|
required_ruby_version: !ruby/object:Gem::Requirement
|
149
119
|
requirements:
|
150
|
-
- -
|
120
|
+
- - ">="
|
151
121
|
- !ruby/object:Gem::Version
|
152
122
|
version: '0'
|
153
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
124
|
requirements:
|
155
|
-
- -
|
125
|
+
- - ">="
|
156
126
|
- !ruby/object:Gem::Version
|
157
127
|
version: 1.3.6
|
158
128
|
requirements: []
|
159
129
|
rubyforge_project:
|
160
|
-
rubygems_version: 2.
|
130
|
+
rubygems_version: 2.4.5.1
|
161
131
|
signing_key:
|
162
132
|
specification_version: 4
|
163
133
|
summary: A Vagrant plugin to install the VirtualBoxAdditions into the guest VM
|
data/testdrive/Vagrantfile
DELETED
@@ -1,76 +0,0 @@
|
|
1
|
-
# -*- mode: ruby -*-
|
2
|
-
# vi: set ft=ruby :
|
3
|
-
|
4
|
-
require 'ipaddr'
|
5
|
-
|
6
|
-
class NextIP
|
7
|
-
def initialize(start_ip)
|
8
|
-
@ip_addr = IPAddr.new start_ip
|
9
|
-
end
|
10
|
-
|
11
|
-
def get
|
12
|
-
@ip_addr = @ip_addr.succ
|
13
|
-
@ip_addr
|
14
|
-
end
|
15
|
-
|
16
|
-
def box vagrant_config, name, box, &block
|
17
|
-
ip_addr = get
|
18
|
-
|
19
|
-
vagrant_config.vm.define name do |config|
|
20
|
-
config.vm.box = box
|
21
|
-
config.vm.hostname = name
|
22
|
-
config.vm.network :private_network, ip: ip_addr.to_s
|
23
|
-
|
24
|
-
config.vm.provider "virtualbox" do |vb, override|
|
25
|
-
# Display the VirtualBox GUI when booting the machine
|
26
|
-
vb.gui = false
|
27
|
-
|
28
|
-
# Customize the amount of memory on the VM:
|
29
|
-
vb.memory = "512"
|
30
|
-
vb.cpus = "4"
|
31
|
-
|
32
|
-
# Specify default provider configuration
|
33
|
-
# - give the VM a name - can be better localized in the VirtualBox GUI
|
34
|
-
# - make the DNS resolution faster
|
35
|
-
vb.customize [
|
36
|
-
"modifyvm", :id,
|
37
|
-
"--name", "vbguest_testdrive-#{name}",
|
38
|
-
"--natdnshostresolver1", "on",
|
39
|
-
"--natdnshostresolver2", "on"
|
40
|
-
]
|
41
|
-
end
|
42
|
-
|
43
|
-
yield(config) if block
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
Vagrant.configure("2") do |config|
|
49
|
-
next_ip = NextIP.new("44.44.0.10/24")
|
50
|
-
|
51
|
-
next_ip.box config, "debian8", "oar-team/debian8"
|
52
|
-
next_ip.box config, "opensuse13", "bento/opensuse-13.2"
|
53
|
-
next_ip.box config, "ubuntu1404", "ubuntu/trusty64"
|
54
|
-
next_ip.box config, "centos7", "centos/7"
|
55
|
-
next_ip.box config, "oracle65", "tobyhferguson_oracle-65-x64" do |cfg|
|
56
|
-
cfg.vm.box_url = "http://tobyhferguson.org/boxes/oracle-6-5-x64-virtualbox.box"
|
57
|
-
end
|
58
|
-
next_ip.box config, "fedora22", "Fedora-Cloud-Base-Virtualbox-22" do |cfg|
|
59
|
-
cfg.vm.box_url = "https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-virtualbox.box"
|
60
|
-
end
|
61
|
-
|
62
|
-
config.vm.provider "virtualbox" do |v|
|
63
|
-
# v.gui = true
|
64
|
-
end
|
65
|
-
|
66
|
-
# config.vbguest.installer_arguments = "--nox11 -- --force"
|
67
|
-
# config.vbguest.auto_update = false
|
68
|
-
# config.vbguest.iso_path = '/Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso'
|
69
|
-
# config.vbguest.iso_path = 'http://download.virtualbox.org/virtualbox/%{version}/VBoxGuestAdditions_%{version}.iso' #% {version: '4.2.12'}
|
70
|
-
# config.vbguest.iso_path = "#{ENV["HOME"]}/Downloads/VBoxGuestAdditions_4.2.12.iso"
|
71
|
-
# config.vbguest.installer = My_Installer
|
72
|
-
|
73
|
-
# require 'Date'
|
74
|
-
# config.vm.provision :shell, :inline => "touch /vagrant/testrun-#{DateTime.now.strftime '%FT%T.%S%L'}"
|
75
|
-
|
76
|
-
end
|