mam podręczny Vagrant i chcesz go używać z KVM/qemu (i Virtual Machine Manager GUI), zamiast instalowania VirtualBox. Więc najpierw zainstalować Vagrant:Korzystanie Vagrant skonfigurować maszynę wirtualną z KVM/qemu bez VirtualBox
$ vagrant --version
Vagrant 1.9.1
$ vagrant box list
There are no installed boxes! Use `vagrant box add` to add some
Jak pertheseposts, wymagam vagrant-libvirt
go do pracy z KVM, więc zainstalowałem że następnym:
$ vagrant plugin list
vagrant-libvirt (0.0.37)
vagrant-share (1.1.6, system)
Następnie, aby dodać CentOS (7) przy użyciu vagrant box add "centos/7"
i zaznaczonego libvirt
, gdy pojawi się monit. Po czym, wpadłem vagrant init
i nie pojawią się jakieś błędy:
$ vagrant init centos/7
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
Jednak vagrant up
wydaje się być erroring się, jak w przykładzie:
$ vagrant up
No usable default provider could be found for your system.
Vagrant relies on interactions with 3rd party systems, known as
"providers", to provide Vagrant with resources to run development
environments. Examples are VirtualBox, VMware, Hyper-V.
The easiest solution to this message is to install VirtualBox, which
is available for free on all major platforms.
If you believe you already have a provider available, make sure it
is properly installed and configured. You can see more details about
why a particular provider isn't working by forcing usage with
`vagrant up --provider=PROVIDER`, which should give you a more specific
error message for that particular provider.
Oto dostawcy sekcja w
Vagrantfile
config.vm.provider :libvirt do |domain| domain.driver = "qemu" domain.memory = 512 domain.cpus = 1 end
Próbowałem modyfikowania go:
config.vm.provider :libvirt do |domain| domain.driver = "kvm" domain.host = 'localhost' domain.uri = 'qemu:///system' domain.memory = 512 domain.cpus = 1 end
Próbowałem też
vagrant up --provider=kvm
,vagrant up --provider=qemu
ivagrant up --provider=libvirt
też bezskutecznie.
Czy jest jakiś krok, który przeoczyłem? Lub inny pakiet/zależność, która musi być zainstalowana?
Edit: Po dodając centos/7
wykorzystaniem włóczęgę, to pojawia się, gdy uruchomiony vagrant box list
.
$ vagrant box list
centos/7 (libvirt, 1611.01)
Czy możesz ponownie uruchomić 'listę pudełek Vagrant' po dodaniu pola –
@ FrédéricHenri' centos/7' pojawia się na liście. Dodano wyjście w pytaniu – rahuL
hum .. czy twoja instalacja libvirt i qemu działa poprawnie? jesteś w stanie tworzyć maszyny wirtualne typu qemu lub kvm z 'virsh' lub' virt-manager' –