2017-04-15 80 views
3

我试图在USB驱动器上设置Laravel Homestead,因为笔记本电脑的磁盘空间不足。我目前的操作系统是Ubuntu 16.04。我已经按照这个教程: https://www.jeffgeerling.com/blogs/jeff-geerling/running-vagrant-virtualboxUSB驱动器上的Laravel Homestead

我的USB驱动器有三个目录:

  • “vagrant_home”,在那里我复制和重命名“.vagrant.d”,通过本教程的指示。我成功地在这里有一个laravel/homestead框。
  • “VirtualBox虚拟机”,我设置VirtualBox来寻找虚拟机。
  • “家园”,继在官方Laravel教程的方向,我这个克隆的Git仓库和改变的Homestead.yaml设置一个反映USB驱动器:

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

当我运行“vagrant up”,一个不需要的.vagrant.d文件夹被创建在我的主目录中,而不是在USB驱动器上。此外,我得到这个错误:

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 
` 

我还安装了流浪和VirtualBox的,由官方家园教程中介绍:https://laravel.com/docs/5.1/homestead

感谢您的阅读。非常感谢您的帮助。

+1

有何帮助https://askubuntu.com/questions/787471/virtualbox-5-is-unable-to-create-a-host-only-adapter-on -ubuntu-16-04? –

+0

与在该线程中解决该问题的人类似,我在运行mokutil时得到'EFI变量在此系统上不受支持'。但感谢您挖掘它!很高兴知道我对这个问题并不孤单。 – Nick

+0

然后https://unix.stackexchange.com/a/91623/216125 –

回答

0

尝试重新启动虚拟框或vagrant重新加载命令。

确保它不是一个权限问题

+0

我关闭电源并启动Vagrant重新载入引发与上述相同的错误。试图重新安装整个事情的根。没有成功。不知道如何在Ubuntu上正确地重新启动VirtualBox,但它似乎根据服务监控正常打开和关闭。 – Nick