Friday, April 14, 2017

Laravel Homestead on USB Drive

I'm trying to set up a Laravel Homestead on a USB drive given the unfortunate amount of space on my laptop's disk. My current OS is Ubuntu 16.04. I've followed this tutorial: https://www.jeffgeerling.com/blogs/jeff-geerling/running-vagrant-virtualbox

My USB Drive has three directories:

  • "vagrant_home", where I copied and renamed ".vagrant.d", as instructed by the tutorial. I successfully have a laravel/homestead box in here.
  • "VirtualBox VMs", where I set VirtualBox to look for VMs.
  • "Homestead", following the directions in the official Laravel tutorial, I cloned this git repository and changed one of the Homestead.yaml settings to reflect the USB Drive:

folders: - map: /media/nick/Homestead/Code to: /home/vagrant/Code type: "nfs"

When I run "vagrant up", an unwanted .vagrant.d folder is created in my home directory, not on the USB drive. Additionally, I get this error:

There was an error while executing 'VBoxManage', a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "create"]

Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: VBoxNetAdpCtl: ioctl failed for /dev/vboxnetctl: Inappropriate ioctl for devic
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg*)" at line 94 of file VBoxManageHostonly.cpp
`

I have also installed Vagrant and VirtualBox, as described by the official Homestead tutorial: https://laravel.com/docs/5.1/homestead

Thanks for reading. Your help is much appreciated.



via Nick

Advertisement