
今、vagrantを使用するたびにプロバイダとして使用しようとしていますlibvirt
。 VirtualBoxを基本的に使いたいです。
vagrant-libvirt
インストールされていません。
次のコマンドの一部が機能しないため、これは問題になりますvagrant status
。
[florian@localhost local]$ vagrant status
The provider 'libvirt' could not be found, but was requested to
back the machine 'foobar'. Please use a provider that exists.
[florian@localhost local]$ vagrant status --provider=virtualbox
An invalid option was specified. The help for this command
is available below.
Usage: vagrant status [name]
-h, --help Print this help
答え1
~によると放浪者の文書、既定のプロバイダーである必要があり、virtualbox
このVAGRANT_DEFAULT_PROVIDER
変数を使用してそれをオーバーライドできます。
ところが空いているからVAGRANT_DEFAULT_PROVIDER
当然そうでしょvirtualbox
?まあ、変数をに設定すると再びvirtualbox
機能します。そのため、Fedoraはデフォルト変数を他の場所に設定したようです。
解決策:
$ echo "export VAGRANT_DEFAULT_PROVIDER=virtualbox" >> ~/.bashrc
$ source ~/.bashrc
答え2
これはこの問題に対する私の経験だけです。
実行すると、vagrant up
私はこれを得ます。
The provider 'libvirt' could not be found, but was requested to
back the machine 'default'. Please use a provider that exists.
上記のコマンドを試しました。
echo "export VAGRANT_DEFAULT_PROVIDER=virtualbox" >> ~/.bashrc
source ~/.bashrc
それから処刑した。vagrant up
The provider 'virtualbox' that was requested to back the machine
'default' is reporting that it isn't usable on this system. The
reason is shown below:
VirtualBox is complaining that the kernel module is not loaded. Please
run `VBoxManage --version` or open the VirtualBox GUI to see the error
message which should contain instructions on how to fix this error.
を使ってVBoxManage --version
私に与えた
The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (4.0.4-303.fc22.x86_64) or it failed to
load. Please recompile the kernel module and install it
これを実行するように求められ、sudo /etc/init.d/vboxdrv setup
問題が解決しました。