oracle / vagrant-projects

Vagrant projects for Oracle products and other examples
Universal Permissive License v1.0
930 stars 474 forks source link

Vagrant can't detect that I'm using Virtualbox #413

Closed pguerin3 closed 2 years ago

pguerin3 commented 2 years ago

I have Oracle Virtualbox installed (not libvirt), and there are no problems running Virtualbox in my Fedora 35 host. In fact, I do have the Oracle DB Developer VM appliance installed, and it runs.

The problem is I can't start an instance in Vagrant.

To start an OL8 VM in Vagrant, I go to the ~/vagrant-projects/OracleLinux/8 directory. I do get an error on 'vagrant up' but the real issue is the first line of the log says this:

Bringing machine 'ol8-vagrant' up with 'libvirt' provider...

I'm not using libvirt - and I don't even have it installed.... Also there is no setting of libvirt in the /OracleLinux/8 Vagrant file.

Environment

Additional information The full log is as follows:

> vagrant up
Bringing machine 'ol8-vagrant' up with 'libvirt' provider...
==> ol8-vagrant: Checking if box 'oraclelinux/8' version '8.5.286' is up to date...
==> ol8-vagrant: Creating image (snapshot of base box volume).
==> ol8-vagrant: Creating domain with the following settings...
==> ol8-vagrant:  -- Name:              8_ol8-vagrant
==> ol8-vagrant:  -- Domain type:       kvm
==> ol8-vagrant:  -- Cpus:              2
==> ol8-vagrant:  -- Feature:           apic
==> ol8-vagrant:  -- Feature:           acpi
==> ol8-vagrant:  -- Clock offset:      utc
==> ol8-vagrant:  -- Memory:            2048M
==> ol8-vagrant:  -- Management MAC:    
==> ol8-vagrant:  -- Loader:            
==> ol8-vagrant:  -- Nvram:             
==> ol8-vagrant:  -- Base box:          oraclelinux/8
==> ol8-vagrant:  -- Storage pool:      default
==> ol8-vagrant:  -- Image:             /home/me/.local/share/libvirt/images/8_ol8-vagrant.img (37G)
==> ol8-vagrant:  -- Disk driver opts:  cache='default'
==> ol8-vagrant:  -- Kernel:            
==> ol8-vagrant:  -- Initrd:            
==> ol8-vagrant:  -- Graphics Type:     vnc
==> ol8-vagrant:  -- Graphics Port:     -1
==> ol8-vagrant:  -- Graphics IP:       127.0.0.1
==> ol8-vagrant:  -- Graphics Password: Not defined
==> ol8-vagrant:  -- Video Type:        cirrus
==> ol8-vagrant:  -- Video VRAM:        16384
==> ol8-vagrant:  -- Sound Type:    
==> ol8-vagrant:  -- Keymap:            en-us
==> ol8-vagrant:  -- TPM Backend:       passthrough
==> ol8-vagrant:  -- TPM Path:          
==> ol8-vagrant:  -- INPUT:             type=mouse, bus=ps2
==> ol8-vagrant: Creating shared folders metadata...
==> ol8-vagrant: Starting domain.
There was an error talking to Libvirt. The error message is shown
below:

Call to virDomainCreateWithFlags failed: internal error: /usr/libexec/qemu-bridge-helper --use-vnet --br=virbr0 --fd=29: failed to communicate with bridge helper: Transport endpoint is not connected
stderr=failed to get mtu of bridge `virbr0': No such device
AmedeeBulle commented 2 years ago

For whatever reason, your Vagrant environment prioritize libvirt over virtualbox.

You can force usage of the virtualbox provider by using the --provider=virtualbox command line option, or by setting the VAGRANT_DEFAULT_PROVIDER environment variable to virtualbox.

See Basic Provider Usage section of the Vagrant documentation for more detailed information

pguerin3 commented 2 years ago

Cheers

pguerin3 commented 2 years ago

Says here: https://docs.fedoraproject.org/en-US/quick-docs/getting-started-with-virtualization/ "Fedora uses the libvirt family of tools as its virtualization solution."

scoter-oracle commented 2 years ago

Says here: https://docs.fedoraproject.org/en-US/quick-docs/getting-started-with-virtualization/ "Fedora uses the libvirt family of tools as its virtualization solution."

With the solution, shared above, by @AmedeeBulle you can easily leverage VirtualBox on Fedora.