hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.3k stars 4.44k forks source link

Vagrant up will not run with Windows Administration privileges, which are required for SMB shares, complains about missing vboxmanage #4041

Closed starrychloe closed 10 years ago

starrychloe commented 10 years ago

I tried to set up an SMB share, but it complained that it needed administrative privileges to run. So I open an administrative privileged console and run vagrant up, but now it complains that it cannot find vboxmanage, even though I DID put it on the path!

C:\Users\Chloe\Documents\ODesk\AIDC> vagrant -v
Vagrant 1.5.4

C:\Users\Chloe\Documents\ODesk\AIDC>vagrant up
Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
Vagrant uses the `VBoxManage` binary that ships with VirtualBox, and requires
this to be available on the PATH. If VirtualBox is installed, please find the
`VBoxManage` binary and add it to the PATH environmental variable.

C:\Users\Chloe\Documents\ODesk\AIDC>vboxmanage -v
4.3.12r93733

Vagrant works fine without SMB and without Administrative privileges and without vboxmanage on the path.

bjornmagnusson commented 10 years ago

Are you completely sure Vagrant with VirtualBox works when using a non-administrator console? I just tried with same version of Vagrant and VirtualBox.

This might be related to a change for VirtualBox. Since VirtualBox 4.3.12 it is using a environmental variable called VBOX_MSI_INSTALL_PATH to hold the path to vboxmanage, earlier VBOX_INSTALL_PATH. The path to VirtualBox does not need to be on your PATH variable for Vagrant to work.

To solve this you may add VBOX_MSI_INSTALL_PATH (with same value as VBOX_INSTALL_PATH) to your variables or install Vagrant 1.6.3, where this issue is solved.

andyjansson commented 10 years ago

I've found that you need to run both Vagrant and VirtualBox with administrative privileges for the communication between the two to work properly when using SMB shares. However, it's worth noting that SMB won't work on Windows guests since the 'mount_smb_shared_folder' capability is yet to be (properly) implemented.

starrychloe commented 10 years ago

@bjornmagnusson Yes. I'm using it now (without Admin console). I didn't realize there was a newer Vagrant. I use Chocolatey to install it and Chocolatey said I had the latest version of Vagrant. I'll try setting VBOX_MSI_INSTALL_PATH and pre-launching VirtualBox window. Oh, I see Vagrant was just updated on Chocolatey this Monday. I'll try that version too.

starrychloe commented 10 years ago

Yes 1.6.3 worked, thanks.