nixme-vagrant 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (240) hide show
  1. data/.gitignore +15 -0
  2. data/.yardopts +1 -0
  3. data/CHANGELOG.md +261 -0
  4. data/Gemfile +21 -0
  5. data/LICENSE +21 -0
  6. data/README.md +61 -0
  7. data/Rakefile +22 -0
  8. data/bin/vagrant +22 -0
  9. data/config/default.rb +39 -0
  10. data/contrib/README.md +12 -0
  11. data/contrib/emacs/vagrant.el +8 -0
  12. data/contrib/vim/vagrantfile.vim +9 -0
  13. data/keys/README.md +17 -0
  14. data/keys/vagrant +27 -0
  15. data/keys/vagrant.ppk +26 -0
  16. data/keys/vagrant.pub +1 -0
  17. data/lib/vagrant.rb +42 -0
  18. data/lib/vagrant/action.rb +134 -0
  19. data/lib/vagrant/action/box.rb +11 -0
  20. data/lib/vagrant/action/box/destroy.rb +21 -0
  21. data/lib/vagrant/action/box/download.rb +72 -0
  22. data/lib/vagrant/action/box/package.rb +19 -0
  23. data/lib/vagrant/action/box/unpackage.rb +55 -0
  24. data/lib/vagrant/action/box/verify.rb +23 -0
  25. data/lib/vagrant/action/builder.rb +124 -0
  26. data/lib/vagrant/action/builtin.rb +104 -0
  27. data/lib/vagrant/action/env.rb +7 -0
  28. data/lib/vagrant/action/env/set.rb +18 -0
  29. data/lib/vagrant/action/environment.rb +50 -0
  30. data/lib/vagrant/action/general.rb +8 -0
  31. data/lib/vagrant/action/general/package.rb +109 -0
  32. data/lib/vagrant/action/general/validate.rb +19 -0
  33. data/lib/vagrant/action/vm.rb +31 -0
  34. data/lib/vagrant/action/vm/boot.rb +48 -0
  35. data/lib/vagrant/action/vm/check_box.rb +28 -0
  36. data/lib/vagrant/action/vm/check_guest_additions.rb +30 -0
  37. data/lib/vagrant/action/vm/clean_machine_folder.rb +43 -0
  38. data/lib/vagrant/action/vm/clear_forwarded_ports.rb +39 -0
  39. data/lib/vagrant/action/vm/clear_nfs_exports.rb +20 -0
  40. data/lib/vagrant/action/vm/clear_shared_folders.rb +32 -0
  41. data/lib/vagrant/action/vm/customize.rb +21 -0
  42. data/lib/vagrant/action/vm/destroy.rb +19 -0
  43. data/lib/vagrant/action/vm/destroy_unused_network_interfaces.rb +30 -0
  44. data/lib/vagrant/action/vm/discard_state.rb +22 -0
  45. data/lib/vagrant/action/vm/export.rb +52 -0
  46. data/lib/vagrant/action/vm/forward_ports.rb +133 -0
  47. data/lib/vagrant/action/vm/forward_ports_helpers.rb +28 -0
  48. data/lib/vagrant/action/vm/halt.rb +29 -0
  49. data/lib/vagrant/action/vm/host_name.rb +21 -0
  50. data/lib/vagrant/action/vm/import.rb +35 -0
  51. data/lib/vagrant/action/vm/match_mac_address.rb +21 -0
  52. data/lib/vagrant/action/vm/network.rb +139 -0
  53. data/lib/vagrant/action/vm/nfs.rb +159 -0
  54. data/lib/vagrant/action/vm/nfs_helpers.rb +11 -0
  55. data/lib/vagrant/action/vm/package.rb +23 -0
  56. data/lib/vagrant/action/vm/package_vagrantfile.rb +33 -0
  57. data/lib/vagrant/action/vm/provision.rb +41 -0
  58. data/lib/vagrant/action/vm/resume.rb +20 -0
  59. data/lib/vagrant/action/vm/share_folders.rb +70 -0
  60. data/lib/vagrant/action/vm/suspend.rb +20 -0
  61. data/lib/vagrant/action/warden.rb +79 -0
  62. data/lib/vagrant/box.rb +90 -0
  63. data/lib/vagrant/box_collection.rb +53 -0
  64. data/lib/vagrant/cli.rb +55 -0
  65. data/lib/vagrant/command.rb +25 -0
  66. data/lib/vagrant/command/base.rb +106 -0
  67. data/lib/vagrant/command/box.rb +33 -0
  68. data/lib/vagrant/command/destroy.rb +17 -0
  69. data/lib/vagrant/command/group_base.rb +107 -0
  70. data/lib/vagrant/command/halt.rb +18 -0
  71. data/lib/vagrant/command/helpers.rb +33 -0
  72. data/lib/vagrant/command/init.rb +14 -0
  73. data/lib/vagrant/command/named_base.rb +14 -0
  74. data/lib/vagrant/command/package.rb +41 -0
  75. data/lib/vagrant/command/provision.rb +17 -0
  76. data/lib/vagrant/command/reload.rb +17 -0
  77. data/lib/vagrant/command/resume.rb +17 -0
  78. data/lib/vagrant/command/ssh.rb +42 -0
  79. data/lib/vagrant/command/ssh_config.rb +26 -0
  80. data/lib/vagrant/command/status.rb +22 -0
  81. data/lib/vagrant/command/suspend.rb +17 -0
  82. data/lib/vagrant/command/up.rb +19 -0
  83. data/lib/vagrant/command/upgrade_to_060.rb +45 -0
  84. data/lib/vagrant/command/version.rb +13 -0
  85. data/lib/vagrant/config.rb +123 -0
  86. data/lib/vagrant/config/base.rb +85 -0
  87. data/lib/vagrant/config/error_recorder.rb +19 -0
  88. data/lib/vagrant/config/nfs.rb +10 -0
  89. data/lib/vagrant/config/package.rb +9 -0
  90. data/lib/vagrant/config/ssh.rb +33 -0
  91. data/lib/vagrant/config/top.rb +61 -0
  92. data/lib/vagrant/config/vagrant.rb +16 -0
  93. data/lib/vagrant/config/vm.rb +137 -0
  94. data/lib/vagrant/config/vm/provisioner.rb +56 -0
  95. data/lib/vagrant/config/vm/sub_vm.rb +17 -0
  96. data/lib/vagrant/data_store.rb +70 -0
  97. data/lib/vagrant/downloaders.rb +7 -0
  98. data/lib/vagrant/downloaders/base.rb +23 -0
  99. data/lib/vagrant/downloaders/file.rb +22 -0
  100. data/lib/vagrant/downloaders/http.rb +64 -0
  101. data/lib/vagrant/environment.rb +392 -0
  102. data/lib/vagrant/errors.rb +332 -0
  103. data/lib/vagrant/hosts.rb +7 -0
  104. data/lib/vagrant/hosts/base.rb +77 -0
  105. data/lib/vagrant/hosts/bsd.rb +52 -0
  106. data/lib/vagrant/hosts/linux.rb +47 -0
  107. data/lib/vagrant/plugin.rb +57 -0
  108. data/lib/vagrant/provisioners.rb +9 -0
  109. data/lib/vagrant/provisioners/base.rb +63 -0
  110. data/lib/vagrant/provisioners/chef.rb +130 -0
  111. data/lib/vagrant/provisioners/chef_server.rb +97 -0
  112. data/lib/vagrant/provisioners/chef_solo.rb +139 -0
  113. data/lib/vagrant/provisioners/puppet.rb +137 -0
  114. data/lib/vagrant/provisioners/puppet_server.rb +55 -0
  115. data/lib/vagrant/provisioners/shell.rb +52 -0
  116. data/lib/vagrant/ssh.rb +173 -0
  117. data/lib/vagrant/ssh/session.rb +119 -0
  118. data/lib/vagrant/systems.rb +10 -0
  119. data/lib/vagrant/systems/base.rb +87 -0
  120. data/lib/vagrant/systems/debian.rb +36 -0
  121. data/lib/vagrant/systems/freebsd.rb +84 -0
  122. data/lib/vagrant/systems/gentoo.rb +27 -0
  123. data/lib/vagrant/systems/linux.rb +79 -0
  124. data/lib/vagrant/systems/linux/config.rb +21 -0
  125. data/lib/vagrant/systems/linux/error.rb +9 -0
  126. data/lib/vagrant/systems/redhat.rb +39 -0
  127. data/lib/vagrant/systems/solaris.rb +62 -0
  128. data/lib/vagrant/test_helpers.rb +128 -0
  129. data/lib/vagrant/ui.rb +69 -0
  130. data/lib/vagrant/util.rb +13 -0
  131. data/lib/vagrant/util/busy.rb +59 -0
  132. data/lib/vagrant/util/hash_with_indifferent_access.rb +63 -0
  133. data/lib/vagrant/util/plain_logger.rb +25 -0
  134. data/lib/vagrant/util/platform.rb +58 -0
  135. data/lib/vagrant/util/resource_logger.rb +63 -0
  136. data/lib/vagrant/util/retryable.rb +25 -0
  137. data/lib/vagrant/util/stacked_proc_runner.rb +35 -0
  138. data/lib/vagrant/util/template_renderer.rb +83 -0
  139. data/lib/vagrant/version.rb +6 -0
  140. data/lib/vagrant/vm.rb +176 -0
  141. data/templates/chef_server_client.erb +18 -0
  142. data/templates/chef_solo_solo.erb +19 -0
  143. data/templates/commands/init/Vagrantfile.erb +63 -0
  144. data/templates/config/validation_failed.erb +7 -0
  145. data/templates/locales/en.yml +531 -0
  146. data/templates/network_entry_debian.erb +8 -0
  147. data/templates/network_entry_gentoo.erb +7 -0
  148. data/templates/network_entry_redhat.erb +8 -0
  149. data/templates/nfs/exports.erb +5 -0
  150. data/templates/nfs/exports_linux.erb +5 -0
  151. data/templates/package_Vagrantfile.erb +11 -0
  152. data/templates/ssh_config.erb +9 -0
  153. data/test/locales/en.yml +8 -0
  154. data/test/test_helper.rb +26 -0
  155. data/test/vagrant/action/box/destroy_test.rb +18 -0
  156. data/test/vagrant/action/box/download_test.rb +125 -0
  157. data/test/vagrant/action/box/package_test.rb +25 -0
  158. data/test/vagrant/action/box/unpackage_test.rb +84 -0
  159. data/test/vagrant/action/box/verify_test.rb +30 -0
  160. data/test/vagrant/action/builder_test.rb +203 -0
  161. data/test/vagrant/action/env/set_test.rb +24 -0
  162. data/test/vagrant/action/environment_test.rb +27 -0
  163. data/test/vagrant/action/general/package_test.rb +268 -0
  164. data/test/vagrant/action/general/validate_test.rb +31 -0
  165. data/test/vagrant/action/vm/boot_test.rb +66 -0
  166. data/test/vagrant/action/vm/check_box_test.rb +56 -0
  167. data/test/vagrant/action/vm/check_guest_additions_test.rb +9 -0
  168. data/test/vagrant/action/vm/clean_machine_folder_test.rb +84 -0
  169. data/test/vagrant/action/vm/clear_forwarded_ports_test.rb +72 -0
  170. data/test/vagrant/action/vm/clear_nfs_exports_test.rb +22 -0
  171. data/test/vagrant/action/vm/clear_shared_folders_test.rb +49 -0
  172. data/test/vagrant/action/vm/customize_test.rb +30 -0
  173. data/test/vagrant/action/vm/destroy_test.rb +25 -0
  174. data/test/vagrant/action/vm/destroy_unused_network_interfaces_test.rb +49 -0
  175. data/test/vagrant/action/vm/discard_state_test.rb +45 -0
  176. data/test/vagrant/action/vm/export_test.rb +107 -0
  177. data/test/vagrant/action/vm/forward_ports_helpers_test.rb +70 -0
  178. data/test/vagrant/action/vm/forward_ports_test.rb +194 -0
  179. data/test/vagrant/action/vm/halt_test.rb +79 -0
  180. data/test/vagrant/action/vm/host_name_test.rb +36 -0
  181. data/test/vagrant/action/vm/import_test.rb +66 -0
  182. data/test/vagrant/action/vm/match_mac_address_test.rb +36 -0
  183. data/test/vagrant/action/vm/network_test.rb +286 -0
  184. data/test/vagrant/action/vm/nfs_helpers_test.rb +26 -0
  185. data/test/vagrant/action/vm/nfs_test.rb +260 -0
  186. data/test/vagrant/action/vm/package_test.rb +25 -0
  187. data/test/vagrant/action/vm/package_vagrantfile_test.rb +46 -0
  188. data/test/vagrant/action/vm/provision_test.rb +90 -0
  189. data/test/vagrant/action/vm/resume_test.rb +35 -0
  190. data/test/vagrant/action/vm/share_folders_test.rb +139 -0
  191. data/test/vagrant/action/vm/suspend_test.rb +35 -0
  192. data/test/vagrant/action/warden_test.rb +119 -0
  193. data/test/vagrant/action_test.rb +89 -0
  194. data/test/vagrant/box_collection_test.rb +45 -0
  195. data/test/vagrant/box_test.rb +74 -0
  196. data/test/vagrant/cli_test.rb +35 -0
  197. data/test/vagrant/command/base_test.rb +23 -0
  198. data/test/vagrant/command/group_base_test.rb +15 -0
  199. data/test/vagrant/command/helpers_test.rb +88 -0
  200. data/test/vagrant/command/package_test.rb +27 -0
  201. data/test/vagrant/config/base_test.rb +52 -0
  202. data/test/vagrant/config/error_recorder_test.rb +18 -0
  203. data/test/vagrant/config/ssh_test.rb +12 -0
  204. data/test/vagrant/config/vagrant_test.rb +35 -0
  205. data/test/vagrant/config/vm/provisioner_test.rb +92 -0
  206. data/test/vagrant/config/vm_test.rb +86 -0
  207. data/test/vagrant/config_test.rb +162 -0
  208. data/test/vagrant/data_store_test.rb +77 -0
  209. data/test/vagrant/downloaders/base_test.rb +28 -0
  210. data/test/vagrant/downloaders/file_test.rb +48 -0
  211. data/test/vagrant/downloaders/http_test.rb +80 -0
  212. data/test/vagrant/environment_test.rb +508 -0
  213. data/test/vagrant/errors_test.rb +42 -0
  214. data/test/vagrant/hosts/base_test.rb +46 -0
  215. data/test/vagrant/hosts/bsd_test.rb +53 -0
  216. data/test/vagrant/hosts/linux_test.rb +54 -0
  217. data/test/vagrant/plugin_test.rb +9 -0
  218. data/test/vagrant/provisioners/base_test.rb +63 -0
  219. data/test/vagrant/provisioners/chef_server_test.rb +186 -0
  220. data/test/vagrant/provisioners/chef_solo_test.rb +219 -0
  221. data/test/vagrant/provisioners/chef_test.rb +179 -0
  222. data/test/vagrant/provisioners/puppet_server_test.rb +68 -0
  223. data/test/vagrant/provisioners/puppet_test.rb +182 -0
  224. data/test/vagrant/provisioners/shell_test.rb +68 -0
  225. data/test/vagrant/ssh/session_test.rb +40 -0
  226. data/test/vagrant/ssh_test.rb +342 -0
  227. data/test/vagrant/systems/base_test.rb +18 -0
  228. data/test/vagrant/systems/linux_test.rb +114 -0
  229. data/test/vagrant/ui_test.rb +29 -0
  230. data/test/vagrant/util/busy_test.rb +106 -0
  231. data/test/vagrant/util/hash_with_indifferent_access_test.rb +39 -0
  232. data/test/vagrant/util/plain_logger_test.rb +17 -0
  233. data/test/vagrant/util/platform_test.rb +18 -0
  234. data/test/vagrant/util/resource_logger_test.rb +78 -0
  235. data/test/vagrant/util/retryable_test.rb +38 -0
  236. data/test/vagrant/util/stacked_proc_runner_test.rb +43 -0
  237. data/test/vagrant/util/template_renderer_test.rb +145 -0
  238. data/test/vagrant/vm_test.rb +291 -0
  239. data/vagrant.gemspec +36 -0
  240. metadata +442 -0
@@ -0,0 +1,25 @@
1
+ module Vagrant
2
+ module Util
3
+ module Retryable
4
+ # Retries a given block a specified number of times in the
5
+ # event the specified exception is raised. If the retries
6
+ # run out, the final exception is raised.
7
+ #
8
+ # This code is adapted slightly from the following blog post:
9
+ # http://blog.codefront.net/2008/01/14/retrying-code-blocks-in-ruby-on-exceptions-whatever/
10
+ def retryable(opts=nil)
11
+ opts = { :tries => 1, :on => Exception }.merge(opts || {})
12
+
13
+ begin
14
+ return yield
15
+ rescue opts[:on]
16
+ if (opts[:tries] -= 1) > 0
17
+ sleep opts[:sleep].to_f if opts[:sleep]
18
+ retry
19
+ end
20
+ raise
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,35 @@
1
+ module Vagrant
2
+ module Util
3
+ # Represents the "stacked proc runner" behavior which is used a
4
+ # couple places within Vagrant. This allows procs to "stack" on
5
+ # each other, then all execute in a single action. An example of
6
+ # its uses can be seen in the {Config} class.
7
+ module StackedProcRunner
8
+ # Returns the proc stack. This should always be called as the
9
+ # accessor of the stack. The instance variable itself should _never_
10
+ # be used.
11
+ #
12
+ # @return [Array<Proc>]
13
+ def proc_stack
14
+ @_proc_stack ||= []
15
+ end
16
+
17
+ # Adds (pushes) a proc to the stack. The actual proc added here is
18
+ # not executed, but merely stored.
19
+ #
20
+ # @param [Proc] block
21
+ def push_proc(&block)
22
+ proc_stack << block
23
+ end
24
+
25
+ # Executes all the procs on the stack, passing in the given arguments.
26
+ # The stack is not cleared afterwords. It is up to the user of this
27
+ # mixin to clear the stack by calling `proc_stack.clear`.
28
+ def run_procs!(*args)
29
+ proc_stack.each do |proc|
30
+ proc.call(*args)
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,83 @@
1
+ require 'ostruct'
2
+ require 'erubis'
3
+
4
+ module Vagrant
5
+ module Util
6
+ # This class is used to render the ERB templates in the
7
+ # `GEM_ROOT/templates` directory.
8
+ class TemplateRenderer < OpenStruct
9
+ class << self
10
+ # Render a given template and return the result. This method optionally
11
+ # takes a block which will be passed the renderer prior to rendering, which
12
+ # allows the caller to set any view variables within the renderer itself.
13
+ #
14
+ # @return [String] Rendered template
15
+ def render(*args)
16
+ render_with(:render, *args)
17
+ end
18
+
19
+ # Render a given string and return the result. This method optionally
20
+ # takes a block which will be passed the renderer prior to rendering, which
21
+ # allows the caller to set any view variables within the renderer itself.
22
+ #
23
+ # @param [String] template The template data string.
24
+ # @return [String] Rendered template
25
+ def render_string(*args)
26
+ render_with(:render_string, *args)
27
+ end
28
+
29
+ # Method used internally to DRY out the other renderers. This method
30
+ # creates and sets up the renderer before calling a specified method on it.
31
+ def render_with(method, template, data={})
32
+ renderer = new(template, data)
33
+ yield renderer if block_given?
34
+ renderer.send(method.to_sym)
35
+ end
36
+ end
37
+
38
+ def initialize(template, data = {})
39
+ super()
40
+
41
+ data[:template] = template
42
+ data.each do |key, value|
43
+ send("#{key}=", value)
44
+ end
45
+ end
46
+
47
+ # Renders the template using the class intance as the binding. Because the
48
+ # renderer inherits from `OpenStruct`, additional view variables can be
49
+ # added like normal accessors.
50
+ #
51
+ # @return [String]
52
+ def render
53
+ # TODO: Seems like a pretty dirty way to do this. Perhaps refactor this
54
+ old_template = template
55
+ result = nil
56
+ File.open(full_template_path, 'r') do |f|
57
+ self.template = f.read
58
+ result = render_string
59
+ end
60
+
61
+ result
62
+ ensure
63
+ self.template = old_template
64
+ end
65
+
66
+ # Renders a template, handling the template as a string, but otherwise
67
+ # acting the same way as {#render}.
68
+ #
69
+ # @return [String]
70
+ def render_string
71
+ Erubis::Eruby.new(template, :trim => true).result(binding)
72
+ end
73
+
74
+ # Returns the full path to the template, taking into accoun the gem directory
75
+ # and adding the `.erb` extension to the end.
76
+ #
77
+ # @return [String]
78
+ def full_template_path
79
+ Vagrant.source_root.join('templates', "#{template}.erb").to_s.squeeze("/")
80
+ end
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,6 @@
1
+ module Vagrant
2
+ # This will always be up to date with the current version of Vagrant,
3
+ # since it is used to generate the gemspec and is also the source of
4
+ # the version for `vagrant -v`
5
+ VERSION = "0.7.2"
6
+ end
@@ -0,0 +1,176 @@
1
+ module Vagrant
2
+ class VM
3
+ include Vagrant::Util
4
+
5
+ attr_reader :env
6
+ attr_reader :name
7
+ attr_reader :vm
8
+
9
+ class << self
10
+ # Finds a virtual machine by a given UUID and either returns
11
+ # a Vagrant::VM object or returns nil.
12
+ def find(uuid, env=nil, name=nil)
13
+ vm = VirtualBox::VM.find(uuid)
14
+ new(:vm => vm, :env => env, :name => name)
15
+ end
16
+ end
17
+
18
+ def initialize(opts=nil)
19
+ defaults = {
20
+ :vm => nil,
21
+ :env => nil,
22
+ :name => nil
23
+ }
24
+
25
+ opts = defaults.merge(opts || {})
26
+
27
+ @vm = opts[:vm]
28
+ @name = opts[:name]
29
+
30
+ if !opts[:env].nil?
31
+ # We have an environment, so we create a new child environment
32
+ # specifically for this VM. This step will load any custom
33
+ # config and such.
34
+ @env = Vagrant::Environment.new({
35
+ :cwd => opts[:env].cwd,
36
+ :parent => opts[:env],
37
+ :vm => self
38
+ }).load!
39
+
40
+ # Load the associated system.
41
+ load_system!
42
+ end
43
+
44
+ @loaded_system_distro = false
45
+ end
46
+
47
+ # Loads the system associated with the VM. The system class is
48
+ # responsible for OS-specific functionality. More information
49
+ # can be found by reading the documentation on {Vagrant::Systems::Base}.
50
+ #
51
+ # **This method should never be called manually.**
52
+ def load_system!(system=nil)
53
+ system ||= env.config.vm.system
54
+
55
+ if system.is_a?(Class)
56
+ raise Errors::VMSystemError, :_key => :invalid_class, :system => system.to_s if !(system <= Systems::Base)
57
+ @system = system.new(self)
58
+ elsif system.is_a?(Symbol)
59
+ # Hard-coded internal systems
60
+ mapping = {
61
+ :debian => Systems::Debian,
62
+ :freebsd => Systems::FreeBSD,
63
+ :gentoo => Systems::Gentoo,
64
+ :redhat => Systems::Redhat,
65
+ :linux => Systems::Linux,
66
+ :solaris => Systems::Solaris
67
+ }
68
+
69
+ raise Errors::VMSystemError, :_key => :unknown_type, :system => system.to_s if !mapping.has_key?(system)
70
+ @system = mapping[system].new(self)
71
+ else
72
+ raise Errors::VMSystemError, :unspecified
73
+ end
74
+ end
75
+
76
+ # Returns the system for this VM, loading the distro of the system if
77
+ # we can.
78
+ def system
79
+ if !@loaded_system_distro && created? && vm.running?
80
+ # Load the system distro for the first time
81
+ result = @system.distro_dispatch
82
+ load_system!(result)
83
+ @loaded_system_distro = true
84
+ end
85
+
86
+ @system
87
+ end
88
+
89
+ # Access the {Vagrant::SSH} object associated with this VM.
90
+ # On the initial call, this will initialize the object. On
91
+ # subsequent calls it will reuse the existing object.
92
+ def ssh
93
+ @ssh ||= SSH.new(env)
94
+ end
95
+
96
+ # Returns a boolean true if the VM has been created, otherwise
97
+ # returns false.
98
+ #
99
+ # @return [Boolean]
100
+ def created?
101
+ !vm.nil?
102
+ end
103
+
104
+ # Sets the currently active VM for this VM. If the VM is a valid,
105
+ # created virtual machine, then it will also update the local data
106
+ # to persist the VM. Otherwise, it will remove itself from the
107
+ # local data (if it exists).
108
+ def vm=(value)
109
+ @vm = value
110
+ env.local_data[:active] ||= {}
111
+
112
+ if value && value.uuid
113
+ env.local_data[:active][name.to_s] = value.uuid
114
+ else
115
+ env.local_data[:active].delete(name.to_s)
116
+ end
117
+
118
+ # Commit the local data so that the next time vagrant is initialized,
119
+ # it realizes the VM exists
120
+ env.local_data.commit
121
+ end
122
+
123
+ def uuid
124
+ vm ? vm.uuid : nil
125
+ end
126
+
127
+ def reload!
128
+ @vm = VirtualBox::VM.find(@vm.uuid)
129
+ end
130
+
131
+ def package(options=nil)
132
+ env.actions.run(:package, { "validate" => false }.merge(options || {}))
133
+ end
134
+
135
+ def up(options=nil)
136
+ env.actions.run(:up, options)
137
+ end
138
+
139
+ def start(options=nil)
140
+ return if @vm.running?
141
+ return resume if @vm.saved?
142
+
143
+ env.actions.run(:start, options)
144
+ end
145
+
146
+ def halt(options=nil)
147
+ env.actions.run(:halt, options)
148
+ end
149
+
150
+ def reload
151
+ env.actions.run(:reload)
152
+ end
153
+
154
+ def provision
155
+ env.actions.run(:provision)
156
+ end
157
+
158
+ def destroy
159
+ env.actions.run(:destroy)
160
+ end
161
+
162
+ def suspend
163
+ env.actions.run(:suspend)
164
+ end
165
+
166
+ def resume
167
+ env.actions.run(:resume)
168
+ end
169
+
170
+ def saved?
171
+ @vm.saved?
172
+ end
173
+
174
+ def powered_off?; @vm.powered_off? end
175
+ end
176
+ end
@@ -0,0 +1,18 @@
1
+ log_level <%= log_level.inspect %>
2
+ log_location STDOUT
3
+ <% if node_name %>
4
+ node_name "<%= node_name %>"
5
+ <% end %>
6
+ ssl_verify_mode :verify_none
7
+ chef_server_url "<%= chef_server_url %>"
8
+
9
+ validation_client_name "<%= validation_client_name %>"
10
+ validation_key "<%= validation_key %>"
11
+ client_key "<%= client_key %>"
12
+
13
+ file_store_path "/srv/chef/file_store"
14
+ file_cache_path "/srv/chef/cache"
15
+
16
+ pid_file "/var/run/chef/chef-client.pid"
17
+
18
+ Mixlib::Log::Formatter.show_time = true
@@ -0,0 +1,19 @@
1
+ <% if node_name %>
2
+ node_name "<%= node_name %>"
3
+ <% end %>
4
+ file_cache_path "<%= provisioning_path %>"
5
+ cookbook_path <%= cookbooks_path %>
6
+ role_path <%= roles_path %>
7
+ log_level <%= log_level.inspect %>
8
+
9
+ <% if recipe_url -%>
10
+ recipe_url "<%= recipe_url %>"
11
+ <% end -%>
12
+
13
+ http_proxy <%= http_proxy.inspect %>
14
+ http_proxy_user <%= http_proxy_user.inspect %>
15
+ http_proxy_pass <%= http_proxy_pass.inspect %>
16
+ https_proxy <%= https_proxy.inspect %>
17
+ https_proxy_user <%= https_proxy_user.inspect %>
18
+ https_proxy_pass <%= https_proxy_pass.inspect %>
19
+ no_proxy <%= no_proxy.inspect %>
@@ -0,0 +1,63 @@
1
+ Vagrant::Config.run do |config|
2
+ # All Vagrant configuration is done here. The most common configuration
3
+ # options are documented and commented below. For a complete reference,
4
+ # please see the online documentation at vagrantup.com.
5
+
6
+ # Every Vagrant virtual environment requires a box to build off of.
7
+ config.vm.box = "<%= box_name %>"
8
+
9
+ # The url from where the 'config.vm.box' box will be fetched if it
10
+ # doesn't already exist on the user's system.
11
+ <% if box_url.nil? %># <% end %>config.vm.box_url = "<%= box_url || "http://domain.com/path/to/above.box" %>"
12
+
13
+ # Boot with a GUI so you can see the screen. (Default is headless)
14
+ # config.vm.boot_mode = :gui
15
+
16
+ # Assign this VM to a host only network IP, allowing you to access it
17
+ # via the IP.
18
+ # config.vm.network "33.33.33.10"
19
+
20
+ # Forward a port from the guest to the host, which allows for outside
21
+ # computers to access the VM, whereas host only networking does not.
22
+ # config.vm.forward_port "http", 80, 8080
23
+
24
+ # Share an additional folder to the guest VM. The first argument is
25
+ # an identifier, the second is the path on the guest to mount the
26
+ # folder, and the third is the path on the host to the actual folder.
27
+ # config.vm.share_folder "v-data", "/vagrant_data", "../data"
28
+
29
+ # Enable provisioning with chef solo, specifying a cookbooks path (relative
30
+ # to this Vagrantfile), and adding some recipes and/or roles.
31
+ #
32
+ # config.vm.provision :chef_solo do |chef|
33
+ # chef.cookbooks_path = "cookbooks"
34
+ # chef.add_recipe "mysql"
35
+ # chef.add_role "web"
36
+ #
37
+ # # You may also specify custom JSON attributes:
38
+ # chef.json = { :mysql_password => "foo" }
39
+ # end
40
+
41
+ # Enable provisioning with chef server, specifying the chef server URL,
42
+ # and the path to the validation key (relative to this Vagrantfile).
43
+ #
44
+ # The Opscode Platform uses HTTPS. Substitute your organization for
45
+ # ORGNAME in the URL and validation key.
46
+ #
47
+ # If you have your own Chef Server, use the appropriate URL, which may be
48
+ # HTTP instead of HTTPS depending on your configuration. Also change the
49
+ # validation key to validation.pem.
50
+ #
51
+ # config.vm.provision :chef_server do |chef|
52
+ # chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME"
53
+ # chef.validation_key_path = "ORGNAME-validator.pem"
54
+ # end
55
+ #
56
+ # If you're using the Opscode platform, your validator client is
57
+ # ORGNAME-validator, replacing ORGNAME with your organization name.
58
+ #
59
+ # IF you have your own Chef Server, the default validation client name is
60
+ # chef-validator, unless you changed the configuration.
61
+ #
62
+ # chef.validation_client_name = "ORGNAME-validator"
63
+ end
@@ -0,0 +1,7 @@
1
+ <% errors.each do |key, container| -%>
2
+ <%= key %>:
3
+ <% container.errors.each do |error| -%>
4
+ * <%= error %>
5
+ <% end -%>
6
+
7
+ <% end -%>
@@ -0,0 +1,531 @@
1
+ en:
2
+ vagrant:
3
+ general:
4
+ creating_home_dir: "Creating home directory since it doesn't exist: %{directory}"
5
+
6
+ #-------------------------------------------------------------------------------
7
+ # Translations for exception classes
8
+ #-------------------------------------------------------------------------------
9
+ errors:
10
+ base_vm_not_found: The base VM with the name '%{name}' was not found.
11
+ box_not_found: Box '%{name}' could not be found.
12
+ chef_not_detected: |-
13
+ The chef (either `chef-solo` or `chef-client`) binary was not found on
14
+ the VM and is required for chef provisioning. Please verify that chef
15
+ is installed and that the binary is available on the PATH.
16
+ puppet_not_detected: |-
17
+ The `puppet` binary was not found on the VM and is required for Puppet provisioning.
18
+ Please verify that Puppet is installed and that the binary is available on the PATH.
19
+ puppetd_not_detected: |-
20
+ The `puppetd` binary was not found on the VM is required for Puppet Server provisioning.
21
+ Please verify that Puppet is installed and that the binary is available on the PATH.
22
+ cli_missing_env: This command requires that a Vagrant environment be properly passed in as the last parameter.
23
+ config_validation: |-
24
+ There was a problem with the configuration of Vagrant. The error message(s)
25
+ are printed below:
26
+
27
+ %{messages}
28
+ dotfile_is_directory: |-
29
+ The local file Vagrant uses to store data ".vagrant" already exists
30
+ and is a directory! If you are in your home directory, then please run
31
+ this command in another directory. If you aren't in a home directory,
32
+ then please rename ".vagrant" to something else, or configure Vagrant
33
+ to use another filename by modifying `config.vagrant.dotfile_name`.
34
+ interrupted: "Vagrant exited after cleanup due to external interrupt."
35
+ multi_vm_required: "A multi-vm environment is required for name specification to this command."
36
+ multi_vm_target_required: "`vagrant %{command}` requires a specific VM name to target in a multi-VM environment."
37
+ no_env: "No Vagrant environment detected. Run `vagrant init` to set one up."
38
+ provisioner_equals_not_supported: |-
39
+ The `config.vm.provisioner =` syntax has been removed in Vagrant 0.7.0.
40
+ Please change your provisioners to use the new syntax described below.
41
+ All of these changes are reflected on the Vagrant website as well.
42
+
43
+ Before:
44
+
45
+ config.vm.provisioner = :chef_solo
46
+ config.chef.cookbooks_path = "my_cookbooks"
47
+ config.chef.add_recipe "apache"
48
+
49
+ After:
50
+
51
+ config.vm.provision :chef_solo, :cookbooks_path => "my_cookbooks",
52
+ :run_list => ["recipe[apache]"]
53
+
54
+ Instead of just a hash, you may use a block as well to get access to the
55
+ configuration object:
56
+
57
+ config.vm.provision :chef_solo do |chef|
58
+ chef.cookbooks_path = "my_cookbooks"
59
+ chef.add_recipe "apache"
60
+ end
61
+
62
+ This error message will be removed in later versions of Vagrant.
63
+ ssh_authentication_failed: |-
64
+ SSH authentication failed! This is typically caused by the public/private
65
+ keypair for the SSH user not being properly set on the guest VM. Please
66
+ verify that the guest VM is setup with the proper public key, and that
67
+ the private key path for Vagrant is setup properly as well.
68
+ ssh_bad_exit_status: |-
69
+ The following SSH command responded with a non-zero exit status.
70
+ Vagrant assumes that this means the command failed!
71
+
72
+ %{command}
73
+
74
+ The output of the command prior to failing is outputted below:
75
+
76
+ %{output}
77
+ ssh_connection_refused: |-
78
+ SSH connection was refused! This usually happens if the VM failed to
79
+ boot properly. Some steps to try to fix this: First, try reloading your
80
+ VM with `vagrant reload`, since a simple restart sometimes fixes things.
81
+ If that doesn't work, destroy your VM and recreate it with a `vagrant destroy`
82
+ followed by a `vagrant up`. If that doesn't work, contact a Vagrant
83
+ maintainer (support channels listed on the website) for more assistance.
84
+ ssh_key_bad_permissions: |-
85
+ The private key to connect to this box via SSH has invalid permissions
86
+ set on it. The permissions of the private key should be set to 0600, otherwise SSH will
87
+ ignore the key. Vagrant tried to do this automatically for you but failed. Please set the
88
+ permissions on the following file to 0600 and then try running this command again:
89
+
90
+ %{key_path}
91
+ ssh_port_not_detected: |-
92
+ Vagrant couldn't determine the SSH port for your VM! This is a rare,
93
+ exceptional event, and a bug should be filed. Please try recreating your
94
+ VM (vagrant destroy, then vagrant up). Sorry!
95
+ ssh_unavailable: "`ssh` binary could not be found. Is an SSH client installed?"
96
+ ssh_unavailable_windows: |-
97
+ `vagrant ssh` isn't available on the Windows platform. The
98
+ vagrant.ppk file for use with Putty is available at:
99
+
100
+ %{key_path}.ppk
101
+
102
+ To use this create a new Putty session for `vagrant@localhost`
103
+ on port `%{ssh_port}`, in the Connection>SSH>Auth
104
+ configuration section navigate to the vagrant.ppk file,
105
+ select it, save the session for later use, and connect.
106
+
107
+ For a more detailed guide please consult:
108
+
109
+ http://vagrantup.com/docs/getting-started/setup/windows.html
110
+
111
+ system:
112
+ invalid_class: |-
113
+ The specified system does not inherit from `Vagrant::Systems::Base`. The
114
+ specified system class must inherit from this class.
115
+
116
+ The specified system class was: %{system}
117
+ unknown_type: |-
118
+ The specified system type is unknown: %{system}. Please change this
119
+ to a proper value.
120
+ unspecified: |-
121
+ A VM system type must be specified! This is done via the `config.vm.system`
122
+ configuration value. Please read the documentation online for more information.
123
+ vagrantfile_syntax_error: |-
124
+ There is a syntax error in the following Vagrantfile. The syntax error
125
+ message is reproduced below for convenience:
126
+
127
+ %{file}
128
+ virtualbox_invalid_version: |-
129
+ Vagrant has detected that you have VirtualBox version %{version} installed!
130
+ Vagrant requires that you use at least VirtualBox version 4.0. Please install
131
+ a more recent version of VirtualBox to continue.
132
+
133
+ The Vagrant 0.6.x series supports VirtualBox 3.2, so if you're stuck with that
134
+ version, then please use the 0.6.x series of Vagrant.
135
+
136
+ Any earlier versions of VirtualBox are completely unsupported. Please upgrade.
137
+ virtualbox_not_detected: |-
138
+ Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
139
+ If VirtualBox is installed, it may be an incorrect version. Vagrant currently
140
+ requires VirtualBox 4.0.x. Please install the proper version to continue.
141
+ virtualbox_not_detected_win64: |-
142
+ Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed
143
+ with version 4.0.0 or higher.
144
+
145
+ Additionally, it appears you're on 64-bit Windows. If this is the case, and
146
+ VirtualBox is properly installed with the correct version, then please make
147
+ sure you're running Vagrant via JRuby on a 64-bit Java runtime. For more
148
+ information on how to set this up and how to verify it is properly setup,
149
+ please view the guide online at:
150
+
151
+ http://vagrantup.com/docs/getting-started/setup/windows_x64.html
152
+
153
+ vm_creation_required: "VM must be created before running this command. Run `vagrant up` first."
154
+ vm_not_found: "A VM by the name of %{name} was not found."
155
+ vm_not_running: "VM must be running to open SSH connection."
156
+
157
+ #-------------------------------------------------------------------------------
158
+ # Translations for config validation errors
159
+ #-------------------------------------------------------------------------------
160
+ config:
161
+ common:
162
+ error_empty: `%{field}` must be filled in.
163
+ chef:
164
+ run_list_empty: "Run list must not be empty."
165
+ cookbooks_path_empty: "Must specify a cookbooks path for chef solo."
166
+ server_url_empty: "Chef server URL must be populated."
167
+ validation_key_path: "Validation key path must be valid path to your chef server validation key."
168
+ ssh:
169
+ private_key_missing: "`private_key_path` file must exist: %{path}"
170
+ vm:
171
+ base_mac_invalid: "Base MAC address for eth0/NAT must be set. Contact box maintainer for more information."
172
+ boot_mode_invalid: "Boot mode must be one of: vrdp or gui"
173
+ box_missing: "A box must be specified."
174
+ box_not_found: "The box '%{name}' could not be found."
175
+ shared_folder_hostpath_missing: "Shared folder host path for '%{name}' doesn't exist: %{path}"
176
+ provisioner_not_found: "The provisioner '%{shortcut}' doesn't exist."
177
+ provisioner_invalid_class: "The provisioner '%{shortcut}' must inherit from `Vagrant::Provisioners::Base`."
178
+
179
+ #-------------------------------------------------------------------------------
180
+ # Translations for commands. e.g. `vagrant x`
181
+ #-------------------------------------------------------------------------------
182
+ commands:
183
+ common:
184
+ vm_not_created: "VM not created. Moving on..."
185
+ box:
186
+ no_installed_boxes: "There are no installed boxes! Use `vagrant box add` to add some."
187
+ ssh:
188
+ execute: "Execute: %{command}"
189
+ status:
190
+ output: |-
191
+ Current VM states:
192
+
193
+ %{states}
194
+
195
+ %{message}
196
+ not_created: |-
197
+ The environment has not yet been created. Run `vagrant up` to
198
+ create the environment.
199
+ powered_off: The VM is powered off. To restart the VM, simply run `vagrant up`
200
+ running: |-
201
+ The VM is running. To stop this VM, you can run `vagrant halt` to
202
+ shut it down forcefully, or you can run `vagrant suspend` to simply
203
+ suspend the virtual machine. In either case, to restart it again,
204
+ simply run `vagrant up`.
205
+ saved: To resume this VM, simply run `vagrant up`.
206
+ stuck: |-
207
+ The VM is "stuck!" This is a very rare state which means that
208
+ VirtualBox is unable to recover the current state of the VM.
209
+ The only known solution to this problem is to restart your
210
+ machine, sorry.
211
+ listing: |-
212
+ This environment represents multiple VMs. The VMs are all listed
213
+ above with their current state. For more information about a specific
214
+ VM, run `vagrant status NAME`.
215
+ up:
216
+ vm_created: "VM already created. Booting if its not already running..."
217
+ upgrade_to_060:
218
+ already_done: "Environment appears to already be upgraded to 0.6.0. Doing nothing!"
219
+ ask: "Are you sure you want to execute this command?"
220
+ backing_up: "Backing up previous .vagrant file..."
221
+ complete: "Environment upgraded to 0.6.0 successfully."
222
+ info: |-
223
+ This command will upgrade the current environment from a pre-0.6.0
224
+ environment to a 0.6.x compatible environment. Running this command
225
+ multiple times should be okay. This command will make a backup file
226
+ prior to making any changes. Therefore, if anything goes wrong, then
227
+ restore that file to ".vagrant" in the same directory as the Vagrantfile.
228
+ quit: "Not executing this command by user request. Quitting..."
229
+ version:
230
+ output: "Vagrant version %{version}"
231
+
232
+ #-------------------------------------------------------------------------------
233
+ # Translations for Vagrant middleware acions
234
+ #-------------------------------------------------------------------------------
235
+ actions:
236
+ runner:
237
+ waiting_cleanup: "Waiting for cleanup before exiting..."
238
+ exit_immediately: "Exiting immediately, without cleanup!"
239
+ vm:
240
+ boot:
241
+ booting: Booting VM...
242
+ waiting: Waiting for VM to boot. This can take a few minutes.
243
+ ready: VM booted and ready for use!
244
+ failed: Failed to connect to VM!
245
+ failed_to_boot: |-
246
+ Failed to connect to VM via SSH. Please verify the VM successfully booted
247
+ by looking at the VirtualBox GUI.
248
+ check_box:
249
+ not_found: Box %{name} was not found. Fetching box from specified URL...
250
+ not_specified: |-
251
+ No base box was specified! A base box is required as a staring point
252
+ for every vagrant virtual machine. Please specify one in your Vagrantfile
253
+ using `config.vm.box`
254
+ does_not_exist: |-
255
+ Specified box `%{name}` does not exist!
256
+
257
+ The box must be added through the `vagrant box add` command. Please view
258
+ the documentation associated with the command for more information.
259
+ check_guest_additions:
260
+ not_detected: |-
261
+ No guest additions were detected on the base box for this VM! Guest
262
+ additions are required for forwarded ports, shared folders, host only
263
+ networking, and more. If SSH fails on this machine, please install
264
+ the guest additions and repackage the box to continue.
265
+
266
+ This is not an error message; everything may continue to work properly,
267
+ in which case you may ignore this message.
268
+ version_mismatch: |-
269
+ The guest additions on this VM do not match the install version of
270
+ VirtualBox! This may cause things such as forwarded ports, shared
271
+ folders, and more to not work properly. If any of those things fail on
272
+ this machine, please update the guest additions and repackage the
273
+ box.
274
+
275
+ Guest Additions Version: %{guest_version}
276
+ VirtualBox Version: %{virtualbox_version}
277
+ clear_forward_ports:
278
+ deleting: Clearing any previously set forwarded ports...
279
+ clear_shared_folders:
280
+ deleting: Cleaning previously set shared folders...
281
+ customize:
282
+ running: Running any VM customizations...
283
+ destroy:
284
+ destroying: Destroying VM and associated drives...
285
+ destroy_network:
286
+ destroying: Destroying unused networking interface...
287
+ disable_networks:
288
+ disabling: Disabling host only networks...
289
+ discard_state:
290
+ discarding: Discarding saved state of VM...
291
+ export:
292
+ create_dir: Creating temporary directory for export...
293
+ exporting: Exporting VM...
294
+ power_off: "The Vagrant virtual environment you are trying to package must be powered off."
295
+ forward_ports:
296
+ auto_empty: |-
297
+ Vagrant found a port collision for the specified port and virtual machine.
298
+ While this port was marked to be auto-corrected, the ports in the
299
+ auto-correction range are all also used.
300
+
301
+ VM: %{vm_name}
302
+ Forwarded port: %{name} (%{guest_port} => %{host_port})
303
+ below_threshold_error: |-
304
+ The host port of all forwarded ports must be above 1024. VirtualBox
305
+ does not allow host ports to be below 1024. (Guest ports below 1024
306
+ are fine. For example: SSH on port 22 on the guest can be forwarded
307
+ to port 2222, but not 222).
308
+ collision_error: |-
309
+ Vagrant cannot forward the specified ports on this VM, since they
310
+ would collide with another VirtualBox virtual machine's forwarded
311
+ ports! The '%{name}' forwarded port (%{host_port}) is already in use on the host
312
+ machine.
313
+
314
+ To fix this, modify your current projects Vagrantfile to use another
315
+ port. Example, where '1234' would be replaced by a unique host port:
316
+
317
+ config.vm.forward_port("%{name}", %{guest_port}, 1234)
318
+
319
+ fixed_collision: Fixed port collision '%{name}'. Now on port %{new_port}.
320
+ forwarding: Forwarding ports...
321
+ forwarding_entry: "-- %{name}: %{guest_port} => %{host_port} (adapter %{adapter})"
322
+ non_nat: |-
323
+ VirtualBox adapter #%{adapter} not configured as "NAT"
324
+ Skipping port forwarding '%{name}'.
325
+ halt:
326
+ force: Forcing shutdown of VM...
327
+ host_name:
328
+ setting: "Setting host name..."
329
+ import:
330
+ importing: Importing base box '%{name}'...
331
+ failure: |-
332
+ The VM import failed! Try running `VBoxManage import` on the box file
333
+ manually for more verbose error output.
334
+ match_mac:
335
+ matching: Matching MAC address for NAT networking...
336
+ no_base_mac: |-
337
+ No base MAC address was specified. This is required for the NAT networking
338
+ to work properly (and hence port forwarding, SSH, etc.). Specifying this
339
+ MAC address is typically up to the box and box maintiner. Please contact
340
+ the relevant person to solve this issue.
341
+ network:
342
+ collides: |-
343
+ The specified host network collides with a non-hostonly network!
344
+ This will cause your specified IP to be inaccessible. Please change
345
+ the IP or name of your host only network to not match that of
346
+ a bridged or non-hostonly network.
347
+ creating: "Creating new host only network for environment..."
348
+ enabling: "Enabling host only network..."
349
+ not_found: |-
350
+ The specified host network could not be found: '%{name}.'
351
+ If the name specification is removed, Vagrant will create a new
352
+ host only network for you. Alternatively, please create the
353
+ specified network manually.
354
+ preparing: "Preparing host only network..."
355
+ windows_not_implemented: |-
356
+ Host only networking is currently broken on Windows due to a bug
357
+ in jruby-win32ole. When the bug is fixed, a patch release for Vagrant
358
+ will be released to remove this error. Until then, please just use
359
+ forwarded ports.
360
+ nfs:
361
+ host_required: |-
362
+ A host class is required for NFS shared folders. By default, these
363
+ are auto-detected, but can be overridden with `config.vagrant.host`.
364
+ There is currently not host class loaded.
365
+ no_host_network: |-
366
+ NFS shared folders requires that host only networking is enabled.
367
+ Please enable host only networking via `config.vm.network`.
368
+ not_supported: |-
369
+ The host class is reporting that NFS is not supported by this host,
370
+ or `nfsd` may not be installed. Please verify that `nfsd` is installed
371
+ on your machine, and retry.
372
+ exporting: Exporting NFS shared folders...
373
+ mounting: Mounting NFS shared folders...
374
+ persist:
375
+ dotfile_error: |-
376
+ The dotfile which Vagrant uses to store the UUID of the project's
377
+ virtual machine already exists and is not a file! The dotfile is
378
+ currently configured to be '%{dotfile_path}'
379
+
380
+ To change this value, please see `config.vagrant.dotfile_name`
381
+
382
+ Are you trying to use Vagrant from your home directory? This is the
383
+ leading cause of this error message. To resolve this, simply use a
384
+ different directory. Or, if you really want to run Vagrant from your
385
+ home directory, modify the `config.vagrant.dotfile_name` configuration
386
+ key.
387
+ persisting: "Persisting the VM UUID (%{uuid})..."
388
+ provision:
389
+ beginning: "Running provisioner: %{provisioner}..."
390
+ enabled: "Provisioning enabled with %{provisioner}..."
391
+ resume:
392
+ resuming: Resuming suspended VM...
393
+ share_folders:
394
+ creating: Creating shared folders metadata...
395
+ mounting: Mounting shared folders...
396
+ mounting_entry: "-- %{name}: %{guest_path}"
397
+ nomount_entry: "-- %{name}: Automounting disabled."
398
+ suspend:
399
+ suspending: Saving VM state and suspending execution...
400
+
401
+ box:
402
+ destroy:
403
+ destroying: "Deleting box '%{name}'..."
404
+ download:
405
+ with: "Downloading with %{class}..."
406
+ cleaning: "Cleaning up downloaded box..."
407
+ unknown_type: "Unknown or unsupported URI type given for box download."
408
+ unpackage:
409
+ extracting: "Extracting box..."
410
+ already_exists: |-
411
+ A box already exists under the name of '%{name}'. This may or may
412
+ not be the same box you are trying to add. Please use another name
413
+ or remove the previous box then try to add it again.
414
+ verify:
415
+ verifying: "Verifying box..."
416
+ failed: |-
417
+ The box file you're attempting to add is invalid. This can be
418
+ commonly attributed to typos in the path given to the box add
419
+ command. Another common case of this is invalid packaging of the
420
+ box itself.
421
+
422
+ general:
423
+ package:
424
+ packaging: "Packaging additional file: %{file}"
425
+ compressing: "Compressing package to: %{tar_path}"
426
+ output_exists: |-
427
+ The specified file to save the package as already exists. Please
428
+ remove this file or specify a different file name for outputting.
429
+ requires_directory: |-
430
+ A directory was not specified to package. This should never happen
431
+ and is a result of an internal inconsistency.
432
+ include_file_missing: |-
433
+ Package include file doesn't exist: %{file}
434
+
435
+ downloaders:
436
+ file:
437
+ download: "Copying box to temporary location..."
438
+ file_missing: "The specified path to a file doesn't exist."
439
+ http:
440
+ download: "Downloading box: %{url}"
441
+ socket_error: |-
442
+ An error occurred while trying to download the specified box. This most
443
+ often happens if there is no internet connection or the address is
444
+ invalid.
445
+
446
+ hosts:
447
+ bsd:
448
+ nfs_export:
449
+ prepare: "Preparing to edit /etc/exports. Administrator privileges will be required..."
450
+ linux:
451
+ nfs_export:
452
+ prepare: "Preparing to edit /etc/exports. Administrator privileges will be required..."
453
+
454
+ provisioners:
455
+ chef:
456
+ json: "Generating chef JSON and uploading..."
457
+ client_key_folder: "Creating folder to hold client key..."
458
+ upload_validation_key: "Uploading chef client validation key..."
459
+ running_client: "Running chef-client..."
460
+ running_solo: "Running chef-solo..."
461
+ invalid_provisioner: "Vagrant::Provisioners::Chef is not a valid provisioner! Use ChefSolo or ChefServer instead."
462
+ not_detected: |-
463
+ The `%{binary}` binary appears to not be in the PATH of the guest. This
464
+ could be because the PATH is not properly setup or perhaps chef is not
465
+ installed on this guest. Chef provisioning can not continue without
466
+ chef properly installed.
467
+ server_url_required: |-
468
+ Chef server provisioning requires that the `config.chef.chef_server_url` be set to the
469
+ URL of your chef server. Examples include "http://12.12.12.12:4000" and
470
+ "http://myserver.com:4000" (the port of course can be different, but 4000 is the default)
471
+ server_validation_key_required: |-
472
+ Chef server provisioning requires that the `config.chef.validation_key_path` configuration
473
+ be set to a path on your local machine of the validation key used to register the
474
+ VM with the chef server.
475
+ server_validation_key_doesnt_exist: |-
476
+ The validation key set for `config.chef.validation_key_path` does not exist! This
477
+ file needs to exist so it can be uploaded to the virtual machine.
478
+
479
+ puppet:
480
+ not_detected: |-
481
+ The `%{binary}` binary appears to not be in the PATH of the guest. This
482
+ could be because the PATH is not properly setup or perhaps Puppet is not
483
+ installed on this guest. Puppet provisioning can not continue without
484
+ Puppet properly installed.
485
+ running_puppet: "Running Puppet with %{manifest}..."
486
+ manifest_missing: "The Puppet %{manifest} manifest is missing. You cannot configure this box."
487
+ manifests_path_missing: "The manifests path specified for Puppet does not exist: %{path}"
488
+ module_path_missing: "The configured module path doesn't exist: %{path}"
489
+
490
+ puppet_server:
491
+ not_detected: |-
492
+ The `%{binary}` binary appears to not be in the PATH of the guest. This
493
+ could be because the PATH is not properly setup or perhaps Puppet is not
494
+ installed on this guest. Puppet provisioning can not continue without
495
+ Puppet properly installed.
496
+ running_puppetd: "Running Puppet agent..."
497
+
498
+ shell:
499
+ path_not_set: "`path` parameter pointing to script file to execute for shell provisioner is required"
500
+ path_invalid: "`path` for shell provisioner does not exist on the host system: %{path}"
501
+ upload_path_not_set: "`upload_path` must be set for the shell provisioner."
502
+
503
+ systems:
504
+ base:
505
+ unsupported_host_only: |-
506
+ Host only networking is very distro-specific. Vagrant has support for many
507
+ distros built-in: Debian, Ubuntu, Gentoo, and RedHat. The distro of your VM
508
+ couldn't be detected, or isn't supported for host only networking.
509
+
510
+ Most of the time this is simply due to the fact that no one has contributed
511
+ back the SSH commands necessary to set this up. Please report a bug and this
512
+ will be fixed for your distro.
513
+ unsupported_host_name: |-
514
+ Setting host name is currently only supported on Debian, Ubuntu and RedHat.
515
+ If you'd like your guest OS to be supported, please open a ticket on the
516
+ project.
517
+ linux:
518
+ attempting_halt: "Attempting graceful shutdown of linux..."
519
+ mount_fail: "Failed to mount shared folders. `vboxsf` was not available."
520
+ mount_nfs_fail: |-
521
+ Mounting NFS shared folders failed. This is most often caused by the NFS
522
+ client software not being installed on the guest machine. Please verify
523
+ that the NFS client software is properly installed, and consult any resources
524
+ specific to the linux distro you're using for more information on how to
525
+ do this.
526
+
527
+ solaris:
528
+ attempting_halt: "Attempting graceful shutdown of solaris..."
529
+
530
+ freebsd:
531
+ attempting_halt: "Attempting graceful shutdown of FreeBSD..."