54 Commits

Author SHA1 Message Date
Mitchell Hashimoto
003ebc811c VirtualBox uses the new validation middleware 2013-01-18 13:29:20 -08:00
Mitchell Hashimoto
7f55d5eac8 Builtin: ConfigValidate will validate your configuration 2013-01-18 13:26:14 -08:00
Mitchell Hashimoto
5c9f27626c Provisioner built-in uses new API 2013-01-13 16:09:32 -08:00
Mitchell Hashimoto
84c45a854c Remove the ProvisionerCLeanup action from VirtualBox 2013-01-13 16:03:34 -08:00
Mitchell Hashimoto
f1f4f276a0 Set the virtualbox config scope 2013-01-13 12:38:51 -08:00
Mitchell Hashimoto
212e634c3b Make Provision a built-in action.
This allows other providers to just use it.
2013-01-12 16:22:37 -08:00
Mitchell Hashimoto
48eaa93745 Raise proper error if there aren't any NIC slots available 2013-01-11 15:57:08 -08:00
Mitchell Hashimoto
7cd663391e Forwarded ports allow for scoped hash overrides 2013-01-11 15:52:45 -08:00
Mitchell Hashimoto
102e8f23d6 Use scoped hash overrides for high-level config 2013-01-11 15:50:09 -08:00
Mitchell Hashimoto
ccc4da0d32 Remove the old networking code 2013-01-11 15:23:20 -08:00
Mitchell Hashimoto
48995f6036 Support mac address and nic_type for host only networks 2013-01-11 15:22:55 -08:00
Mitchell Hashimoto
d09dc91d1b Add support for bridged networks again 2013-01-11 15:21:09 -08:00
Mitchell Hashimoto
37e158c9b2 Configure networks on the VM 2013-01-11 15:06:38 -08:00
Mitchell Hashimoto
da7f227fff Forwarded ports use the new high-level configuration 2013-01-11 14:51:49 -08:00
Mitchell Hashimoto
7e5f175d2c Check port collisions now uses the new high-level networking 2013-01-11 14:44:27 -08:00
Mitchell Hashimoto
2d8f9baf7f New Network VirtualBox middleware to handle the changes.
Note this is a WIP (hence committed on a branch)
2013-01-11 14:16:00 -08:00
Mitchell Hashimoto
7a9363e8a1 Fix ordering of forwarded_port call 2013-01-04 16:35:13 -10:00
Mitchell Hashimoto
559cf25b5f Temporarily disable Network action while it is broken 2013-01-04 16:25:20 -10:00
Mitchell Hashimoto
2d3c0b7148 VirtualBox forwarding port uses new network calls 2013-01-04 16:22:38 -10:00
Mitchell Hashimoto
640b296f5a Explicitly set error handling for port collision on resume 2013-01-04 16:11:40 -10:00
Mitchell Hashimoto
be36c702d6 Booting new VirtualBox VM should check for port collisions 2013-01-04 16:08:37 -10:00
Mitchell Hashimoto
e955596939 Set a default for the "gui" option for VirtualBox 2012-12-25 09:18:47 -08:00
Mitchell Hashimoto
54a2f6b89e Change boot_mode to a provider config gui.
OLD:

config.vm.boot_mode = :gui

NEW:

config.vm.provider :virtualbox do |vb|
  vb.gui = true
end
2012-12-25 09:00:06 -08:00
Mitchell Hashimoto
6478139cee Move config.vm.customize to VirtualBox specific option 2012-12-23 16:29:25 -08:00
Mitchell Hashimoto
66849fda20 When recovering on import and destroying, force it 2012-12-23 16:29:25 -08:00
Mitchell Hashimoto
b9f6afd2a0 Scrub LD_LIBRARY_PATH prior to executing VBoxManage 2012-12-16 10:37:43 -08:00
Mitchell Hashimoto
42f157143f Forward-port fix for OS X and VirtualBox bug from 1-0-stable 2012-11-20 11:00:19 -08:00
Mitchell Hashimoto
81ca275792 Providers to V2 2012-11-06 21:20:55 -08:00
Mitchell Hashimoto
3c0341b7be Disable DNS proxy for 12.10 too 2012-10-12 20:03:25 -07:00
Paul Visscher
f36ab8a165 Fixes a bug with DNS resolution in Ubuntu 12.10. 2012-10-08 22:12:41 -04:00
Mitchell Hashimoto
678c6a070d VirtualBox 4.2 support 2012-09-13 19:11:32 -07:00
Mitchell Hashimoto
391dc39267 Merge branch 'machine-abstraction'
This branch brings in the "machine abstraction" code. This is a major
milestone in the development of Vagrant as it abstracts all of the
VirtualBox-specific code out into a plugin. There is zero VirtualBox
specific code in the core ("lib/") directory at this point. Read on for
important points.

== Gotchas

White it is technically possible now to write plugins for other
providers, there is still major work to be done to make this feasible.
The plugin interface itself is pretty much done, but there are some
issues:

* ":virtualbox" is the hardcoded provider to be used at the moment.

* There is no way to configure a provider. For example,
  `config.vm.customize` would never work for anything other than
  VirtualBox, so there needs to be a way to have provider-specific
  configuration. This will come soon.

* Shared folders and networking need to be rearchitected to be friendly
  for multiple providers, since it is unrealistic that a provider such as
  EC2 could provide the same level of networking, for example.

* There is no way easy way (like `vagrant package --base`) to create
  boxes for providers other than VirtualBox. This will be addressed in a
  whole new feature of Vagrant probably in a future release after
  provider stuff has shipped.

== Writing a Provider

To write a provider, you create a Vagrant plugin that defines a
"provider". See the "plugins/providers/virtualbox/plugin.rb" for more
details. Providers themselves have an exremely simple API. The burden
for writing providers mostly rests on the fact that you must define
complex middleware sequences.

Lots more work to come in the future, but this is a BIG MILESTONE!
2012-08-19 19:27:09 -07:00
Mitchell Hashimoto
85a4fb82a8 vagrant package a single VM works! 2012-08-15 21:04:37 -07:00
Mitchell Hashimoto
b659191a02 vagrant up! 2012-08-14 22:38:41 -07:00
Mitchell Hashimoto
aaeb060f33 vagrant provision 2012-08-14 21:21:31 -07:00
Mitchell Hashimoto
7aa083d259 vagrant reload now works with the new machine abstraction 2012-08-14 21:12:41 -07:00
Mitchell Hashimoto
85a499ffb8 Properly handle the case that VM doesn't exist for the VB driver. 2012-08-14 20:27:28 -07:00
Mitchell Hashimoto
0cc63c05e2 vagrant destroy fully works 2012-08-13 23:31:12 -07:00
Mitchell Hashimoto
2fc18f7207 destroy gets a little farther, and properly halts the VM 2012-08-13 23:18:50 -07:00
Mitchell Hashimoto
bca8663742 vagrant resume works with the new machine abstraction 2012-08-13 20:03:35 -07:00
Mitchell Hashimoto
83b908f3d8 vagrant suspend works with new machine abstraction 2012-08-13 19:30:41 -07:00
Mitchell Hashimoto
0eddda3552 Halt works with new machine.
This required some modifications to the linux guest implementation. And
the other guests will have to be modified as well. This is because
`channel` is now `communicate`.
2012-08-12 18:54:52 -07:00
Mitchell Hashimoto
f9752d78d8 Properly resolve and load the guest class impl for Machines 2012-08-12 18:35:19 -07:00
Mitchell Hashimoto
5e70ad0ec2 vagrant ssh -c now uses a middleware sequence 2012-08-10 00:57:23 -07:00
Mitchell Hashimoto
e0ec679838 vagrant ssh with full console works with new provider.
This works by now calling the `:ssh` action on the provider. This action
is allowed to do whatever it pleases, but should at some point probably
call the `SSHExec` built-in middleware.

The `SSHExec` built-in middleware was added. This uses the information
returned by `Machine#ssh_info` and uses the `Vagrant::Util::SSH` helper
to exec into the remote machine. The provider should do any work upfront
in verifying that the machine is ready to be SSHed into.
2012-08-05 13:45:24 -07:00
Mitchell Hashimoto
9db982f7a4 Expose the provider via the machine object. 2012-08-04 11:16:31 -07:00
Mitchell Hashimoto
1e997f87d7 Clean up the actions a bit, move logic into actual middleware.
This is a good idea because in the future it will allow plugins to
properly override these behaviors.
2012-07-28 19:58:10 -07:00
Mitchell Hashimoto
31a3a3f2e2 Start moving the halt commands over to the new provider interface 2012-07-28 10:43:16 -07:00
Mitchell Hashimoto
e5f250121a Call now only yields the environment 2012-07-27 19:34:46 -07:00
Mitchell Hashimoto
118377e6f0 Destroy sequence asks the user for confirmation. 2012-07-27 19:29:40 -07:00