Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for vmware_fusion #17

Merged
merged 2 commits into from May 29, 2013

Conversation

6 participants
@rjocoleman
Copy link
Contributor

commented May 27, 2013

Added support in the workaround for VMware Fusion provider.

Couldn't work out how to add tests for vagrant-vmware-fusion as it would not run for me in a bundle environment.

@rjocoleman

This comment has been minimized.

Copy link
Contributor Author

commented May 27, 2013

Without this nothing happens as the Action is called too early i.e. env[:machine].state.id == :not_running

On a fresh Vagrant box:

$ vagrant up --provider=vmware_fusion
Bringing machine 'default' up with 'vmware_fusion' provider...
[default] VMware requires root privileges to make many of the changes
necessary for Vagrant to control it. In a moment, Vagrant will ask for
your administrator password in order to install a helper that will have
permissions to make these changes. Note that Vagrant itself continues
to run without administrative privileges.
Password:
[default] Cloning VMware VM: 'quantal64'. This can take some time...
[default] Verifying vmnet devices are healthy...
[default] Preparing network adapters...
[default] Starting the VMware VM...
[default] Waiting for the VM to finish booting...
[default] The machine is booted and ready!
[default] Ensuring Chef is installed at requested version of 11.4.4.
[default] Chef 11.4.4 Omnibus package is not installed...installing now.
Downloading Chef 11.4.4 for ubuntu...
Installing Chef 11.4.4
Selecting previously unselected package chef.
(Reading database ... 50349 files and directories currently installed.)
Unpacking chef (from .../chef_11.4.4_amd64.deb) ...
Setting up chef (11.4.4-2.ubuntu.11.04) ...
Thank you for installing Chef!
[default] Forwarding ports...
[default] -- 22 => 2222
[default] Configuring network adapters within the VM...
--snip--
@patcon

This comment has been minimized.

Copy link

commented on 04e4631 May 27, 2013

Looks cool. Any chance you'd submit a pull request back to the main project?

EDIT: Oops. Just realized it's only 3 hours old :)

This comment has been minimized.

Copy link

replied May 27, 2013

awesome! Works for me

This comment has been minimized.

Copy link
Owner Author

replied May 27, 2013

@patcon - Yep, it's already over here: chef-boneyard#17

@@ -47,6 +47,10 @@ def self.provision(hook)
# fire after anything boot related which wedges in right before the
# actual real run of the provisioner.

if HashiCorp.const_defined?("VagrantVMwarefusion")

This comment has been minimized.

Copy link
@fnordfish

fnordfish May 29, 2013

Sorry to interfere - to be honest, I haven't tested it yet - but wouldn't that raise a NameError when none of the HashiCorp plugins is installed?

if defined?(HashiCorp) && HashiCorp.const_defined?("VagrantVMwarefusion")

This comment has been minimized.

Copy link
@rjocoleman

rjocoleman May 29, 2013

Author Contributor

I thought this too, but I tried it out with vagrant-vmware-fusion uninstalled and it didn't throw an error. However this could have been the problem I was seeing with tests. I'll investigate and update the PR accordingly.

This comment has been minimized.

Copy link
@rjocoleman

rjocoleman May 29, 2013

Author Contributor

You're quite right this detection method fails when no Hashi plugins are installed. I updated the PR.

@rjocoleman

This comment has been minimized.

Copy link
Contributor Author

commented May 29, 2013

Updated to fail gracefully when no HashiCorp plugins are installed.
As per @fnordfish: https://github.com/schisamo/vagrant-omnibus/pull/17/files#r4431691

@schisamo

This comment has been minimized.

Copy link
Contributor

commented May 29, 2013

@rjocoleman thanks for this! I'm going to merge it but longer term we'll want to hook right into Vagrant::Action::Builtin::Provision now that hashicorp/vagrant#1555 has been fixed.

schisamo added a commit that referenced this pull request May 29, 2013

Merge pull request #17 from rjocoleman/fusion
add support for vmware_fusion

@schisamo schisamo merged commit 1ab0efa into chef-boneyard:master May 29, 2013

1 check passed

default The Travis CI build passed
Details

@rjocoleman rjocoleman deleted the rjocoleman:fusion branch May 29, 2013

@tas50 tas50 added the enhancement label Aug 31, 2016

@tas50 tas50 added Type: Enhancement and removed enhancement labels Jul 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.