vagrant up fails without sudo after upgrading to OS X 10.8.2

Created on 14 Jan 2013  路  9Comments  路  Source: hashicorp/vagrant

I am currently using Vagrant 1.0.6 with VirtualBox 4.2.6. However, I also experienced this issue with Vagrant 1.0.5 with VirtualBox 4.2.2.

After upgrading to OS X 10.8.2, vagrant up fails. However, if I sudo vagrant up, I am able to create and boot a VM. All commands related to the instance of this VM (vagrant ssh, vagrant halt, vagrant destroy, etc.) must also be run with sudo.

Here's the output of VAGRANT_LOG=DEBUG vagrant up:

````` INFO global: Vagrant version: 1.0.6 INFO vagrant:vagrant` invoked: ["up"]
DEBUG vagrant: Creating Vagrant environment
INFO environment: Environment initialized (#)
INFO environment: - cwd: /Volumes/Macintosh HD/Users/jp1971
INFO environment: Home path: /Volumes/Macintosh HD/Users/jp1971/.vagrant.d
INFO plugin: Searching and loading any available plugins...
INFO plugin: Loaded 0 plugins.
DEBUG vagrant: Loading environment
INFO environment: Loading configuration...
DEBUG loader: Set :default = "/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/config/default.rb"
DEBUG loader: Populating proc cache for "/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/config/default.rb"
DEBUG loader: Load procs for pathname: #
DEBUG loader: Set :root = #
DEBUG loader: Populating proc cache for #
DEBUG loader: Load procs for pathname: #
DEBUG loader: Loading configuration in order: [:default, :box, :home, :root, :vm]
DEBUG loader: Loading from: default (evaluating)
DEBUG loader: Loading from: root (evaluating)
DEBUG loader: Configuration loaded successfully
DEBUG environment: Loading configuration for VM: default
DEBUG loader: Set :default = "/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/config/default.rb"
DEBUG loader: Set :root = #
DEBUG loader: Set :vm = []
DEBUG loader: Loading configuration in order: [:default, :box, :home, :root, :vm]
DEBUG loader: Loading from: default (cache)
DEBUG loader: Loading from: root (cache)
DEBUG loader: Configuration loaded successfully
DEBUG loader: Set :default = "/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/config/default.rb"
DEBUG loader: Set :box = #
DEBUG loader: Populating proc cache for #
DEBUG loader: Load procs for pathname: #
DEBUG loader: Set :root = #
DEBUG loader: Set :vm = []
DEBUG loader: Loading configuration in order: [:default, :box, :home, :root, :vm]
DEBUG loader: Loading from: default (cache)
DEBUG loader: Loading from: box (evaluating)
DEBUG loader: Loading from: box (evaluating)
DEBUG loader: Loading from: box (evaluating)
DEBUG loader: Loading from: root (cache)
DEBUG loader: Configuration loaded successfully
INFO cli: CLI: [] "up" []
DEBUG cli: Invoking command class: Vagrant::Command::Up []
DEBUG up: 'Up' each target VM...
INFO datastore: Created: /Volumes/Macintosh HD/Users/jp1971/.vagrant
INFO virtualbox_base: VBoxManage path: VBoxManage
INFO subprocess: Starting process: ["VBoxManage", "--version"]
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: 4.2.6r82870

DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
DEBUG virtualbox: Finding driver for VirtualBox version: 4.2.6
INFO virtualbox: Using VirtualBox driver: Vagrant::Driver::VirtualBox_4_2
INFO virtualbox_base: VBoxManage path: VBoxManage
INFO subprocess: Starting process: ["VBoxManage", "showvminfo", "c73751cd-3ce9-49da-bd2f-51a629b58418"]
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stderr: VBoxManage: error: Could not find a registered machine with UUID {c73751cd-3ce9-49da-bd2f-51a629b58418}
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBox, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "FindMachine(Bstr(VMNameOrUuid).raw(), machine.asOutParam())" at line 2495 of file VBoxManageInfo.cpp

DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 31999
DEBUG subprocess: Exit status: 1
INFO virtualbox_base: VBoxManage path: VBoxManage
INFO subprocess: Starting process: ["VBoxManage", "--version"]
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: 4.2.6r82870

DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
DEBUG virtualbox: Finding driver for VirtualBox version: 4.2.6
INFO virtualbox: Using VirtualBox driver: Vagrant::Driver::VirtualBox_4_2
INFO virtualbox_base: VBoxManage path: VBoxManage
INFO vm: Loading guest: linux
INFO up: Creating: default
DEBUG hosts: Host path search classes: [Vagrant::Hosts::Windows, Vagrant::Hosts::Arch, Vagrant::Hosts::Gentoo, Vagrant::Hosts::Fedora, Vagrant::Hosts::OpenSUSE, Vagrant::Hosts::FreeBSD, Vagrant::Hosts::Linux, Vagrant::Hosts::BSD]
INFO hosts: Host class: Vagrant::Hosts::BSD
INFO runner: Running action: up
INFO warden: Calling action: #
INFO subprocess: Starting process: ["VBoxManage", "list", "hostonlyifs"]
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: Name: vboxnet0
GUID: 786f6276-656e-4074-8000-0a0027000000
DHCP: Disabled
IPAddress: 192.168.2.1
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:00
MediumType: Ethernet
Status: Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet0

Name: vboxnet1
GUID: 786f6276-656e-4174-8000-0a0027000001
DHCP: Disabled
IPAddress: 192.168.2.1
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:01
MediumType: Ethernet
Status: Up
VBoxNetworkName: HostInterfaceNetworking-vboxnet1

DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
INFO warden: Calling action: #
INFO warden: Calling action: #
INFO warden: Calling action: #
INFO warden: Calling action: #
INFO interface: info: Importing base box 'package'...
[default] Importing base box 'package'...
INFO subprocess: Starting process: ["VBoxManage", "import", "/Volumes/Macintosh HD/Users/jp1971/.vagrant.d/boxes/package/box.ovf"]
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stderr: 0%...
DEBUG subprocess: stderr: 10%...20%...30%...40%...50%...60%...70%...80%...90%...
DEBUG subprocess: stderr: 100%

DEBUG subprocess: stderr: Interpreting /Volumes/Macintosh HD/Users/jp1971/.vagrant.d/boxes/package/box.ovf...

DEBUG subprocess: stderr: OK.

DEBUG subprocess: stderr: 0%...
DEBUG subprocess: stderr:
Progress state: VBOX_E_IPRT_ERROR

DEBUG subprocess: stderr: VBoxManage: error: Appliance import failed

DEBUG subprocess: stderr: VBoxManage: error: Could not create the directory '/Users/jp1971/VirtualBox VMs/JP1971_1357926727' (VERR_ACCESS_DENIED)
VBoxManage: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component Appliance, interface IAppliance
VBoxManage: error: Context: "int handleImportAppliance(HandlerArg*)" at line 781 of file VBoxManageAppliance.cpp

DEBUG subprocess: stdout: Disks: vmdisk1 85899345920 -1 http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized box-disk1.vmdk -1 -1

Virtual system 0:
0: Suggested OS type: "Ubuntu"
(change with "--vsys 0 --ostype "; use "list ostypes" to list all possible values)
1: Suggested VM name "JP1971_1357926727"
(change with "--vsys 0 --vmname ")
2: Number of CPUs: 1
(change with "--vsys 0 --cpus ")
3: Guest memory: 512 MB
(change with "--vsys 0 --memory ")
4: Network adapter: orig NAT, config 3, extra slot=0;type=NAT
5: Network adapter: orig HostOnly, config 3, extra slot=1;type=HostOnly
6: CD-ROM
(disable with "--vsys 0 --unit 6 --ignore")
7: IDE controller, type PIIX4
(disable with "--vsys 0 --unit 7 --ignore")
8: IDE controller, type PIIX4
(disable with "--vsys 0 --unit 8 --ignore")
9: SATA controller, type AHCI
(disable with "--vsys 0 --unit 9 --ignore")
10: Hard disk image: source image=box-disk1.vmdk, target path=/Users/jp1971/VirtualBox VMs/JP1971_1357926727/box-disk1.vmdk, controller=9;channel=0
(change target path with "--vsys 0 --unit 10 --disk path";
disable with "--vsys 0 --unit 10 --ignore")

DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 1
ERROR warden: Error occurred: There was an error executing the following command with VBoxManage:

["import", "/Volumes/Macintosh HD/Users/jp1971/.vagrant.d/boxes/package/box.ovf"]

For more information on the failure, enable detailed logging with
VAGRANT_LOG.
INFO warden: Calling recover: #
ERROR warden: Error occurred: There was an error executing the following command with VBoxManage:

["import", "/Volumes/Macintosh HD/Users/jp1971/.vagrant.d/boxes/package/box.ovf"]

For more information on the failure, enable detailed logging with
VAGRANT_LOG.
ERROR warden: Error occurred: There was an error executing the following command with VBoxManage:

["import", "/Volumes/Macintosh HD/Users/jp1971/.vagrant.d/boxes/package/box.ovf"]

For more information on the failure, enable detailed logging with
VAGRANT_LOG.
ERROR warden: Error occurred: There was an error executing the following command with VBoxManage:

["import", "/Volumes/Macintosh HD/Users/jp1971/.vagrant.d/boxes/package/box.ovf"]

For more information on the failure, enable detailed logging with
VAGRANT_LOG.
ERROR warden: Error occurred: There was an error executing the following command with VBoxManage:

["import", "/Volumes/Macintosh HD/Users/jp1971/.vagrant.d/boxes/package/box.ovf"]

For more information on the failure, enable detailed logging with
VAGRANT_LOG.
ERROR vagrant: Vagrant experienced an error! Details:
ERROR vagrant: #

["import", "/Volumes/Macintosh HD/Users/jp1971/.vagrant.d/boxes/package/box.ovf"]

For more information on the failure, enable detailed logging with
VAGRANT_LOG.>
ERROR vagrant: There was an error executing the following command with VBoxManage:

["import", "/Volumes/Macintosh HD/Users/jp1971/.vagrant.d/boxes/package/box.ovf"]

For more information on the failure, enable detailed logging with
VAGRANT_LOG.
ERROR vagrant: /Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/driver/virtualbox_base.rb:278:in block in execute' /Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/util/retryable.rb:14:inretryable'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/driver/virtualbox_base.rb:268:in execute' /Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/driver/virtualbox_4_2.rb:183:inimport'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/vm/import.rb:14:in call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/warden.rb:33:incall'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/vm/check_box.rb:28:in call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/warden.rb:33:incall'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/vm/check_accessible.rb:18:in call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/warden.rb:33:incall'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/general/validate.rb:13:in call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/warden.rb:33:incall'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/general/check_virtualbox.rb:23:in call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/warden.rb:33:incall'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/builder.rb:92:in call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/runner.rb:49:inblock in run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/util/busy.rb:19:in busy' /Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/runner.rb:49:inrun'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/vm.rb:192:in run_action' /Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/vm.rb:145:inup'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/command/up.rb:31:in block in execute' /Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/command/base.rb:116:inblock in with_target_vms'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/command/base.rb:111:in each' /Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/command/base.rb:111:inwith_target_vms'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/command/up.rb:24:in execute' /Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/cli.rb:42:inexecute'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/environment.rb:167:in cli' /Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/bin/vagrant:43:in /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in load' /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in

'
INFO interface: error: There was an error executing the following command with VBoxManage:

["import", "/Volumes/Macintosh HD/Users/jp1971/.vagrant.d/boxes/package/box.ovf"]

For more information on the failure, enable detailed logging with
VAGRANT_LOG.
There was an error executing the following command with VBoxManage:

["import", "/Volumes/Macintosh HD/Users/jp1971/.vagrant.d/boxes/package/box.ovf"]

For more information on the failure, enable detailed logging with
VAGRANT_LOG.```

Please let me know if I can provide any other information or output to help resolve this issue.
``````

Most helpful comment

I have this figured out. My upgrade to OS X 10.8.2 was prompted by a hardware upgrade. My machine's os and applications now reside on a separate volume from the one that contains the home folder for user jp1971. The home directory is at /Volumes/Macintosh HD/Users/jp1971. VBoxManage was attempting to create a directory at /Users/jp1971...

I opened VirtualBox's preferences and changed the Default Machine Folder to /Volumes/Macintosh HD/Users/jp1971/VirtualBox VMs. That did the trick.

Thanks for taking a look at the debug log and pointing me in the right direction.

All 9 comments

Can you please grab me this:

ls -al /Users/jp1971 | grep -i vm

Specifically, what is the permissions on your "VirtualBox VMs" folder.

It appears they are wrong, but itd' be great to build in detection into Vagrant.

Here are the permissions for the Virtual Box BMs folder:

drwx------ 3 jp1971 staff 102 Jan 11 21:58 VirtualBox VMs

Interesting well here is the error:

DEBUG subprocess: stderr: VBoxManage: error: Could not create the directory '/Users/jp1971/VirtualBox VMs/JP1971_1357926727' (VERR_ACCESS_DENIED)

So it looks like there is a permissions error somewhere in there.

I have this figured out. My upgrade to OS X 10.8.2 was prompted by a hardware upgrade. My machine's os and applications now reside on a separate volume from the one that contains the home folder for user jp1971. The home directory is at /Volumes/Macintosh HD/Users/jp1971. VBoxManage was attempting to create a directory at /Users/jp1971...

I opened VirtualBox's preferences and changed the Default Machine Folder to /Volumes/Macintosh HD/Users/jp1971/VirtualBox VMs. That did the trick.

Thanks for taking a look at the debug log and pointing me in the right direction.

I ran into this same issue today, and I agree with @mitchellh that it'd be great to build in some detections for this.

I had this exact problem; @jp1971 's solution was the fix. Virtual Box was looking in the wrong place. Whew.

I had this problem after installing a SSD in my mac pro with OSX 10.10.1, I can confirm @jp1971 's fix works here. Check your VM direcory.

I found this thread after trying every service restart command under the sun to no avail.

@jp1971 Thanks! I restored a backup to a new home directory and VB was trying the old location. (I think I actually uninstalled VB a long time ago but it picked up an ancient config file from somewhere.)

I ran into this problem in spite of having uninstalled VirtualBox using the uninstaller on the dmg and then reinstalled. I'm assuming that VirtualBox picked up an old preferences/settings file. Should that pref file be deleted by the uninstaller?

Was this page helpful?
0 / 5 - 0 ratings