vagrant
vagrant copied to clipboard
Vagrant Network issue: Call to virConnectListAllNetworks failed
Please note that the Vagrant issue tracker is in priority reserved for bug reports and enhancements. For general usage questions, please use HashiCorp Discuss: https://discuss.hashicorp.com/c/vagrant/24 Thank you!
When submitting a bug report, please provide the minimal configuration and required information necessary to reliably reproduce the issue. It should include a basic Vagrantfile that only contains settings to reproduce the described behavior.
Tip: Before submitting your issue, don't hesitate to remove the above introductory text, possible empty sections (e.g. References), and this tip.
Vagrant version
> vagrant -v
Vagrant 2.2.16
Host operating system
> cat /etc/os-release
NAME="Fedora Linux"
VERSION="35 (Workstation Edition)"
ID=fedora
VERSION_ID=35
VERSION_CODENAME=""
PLATFORM_ID="platform:f35"
PRETTY_NAME="Fedora Linux 35 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:35"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f35/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=35
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=35
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Workstation Edition"
VARIANT_ID=workstation
Guest operating system
CentOS 8
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'libvirt'
Vagrant.configure("2") do |config|
##### DEFINE VM #####
config.vm.define "centosvm1" do |config|
config.vm.hostname = "centosvm1"
config.vm.box = "centos/8"
config.vm.box_check_update = false
config.vm.provider :libvirt do |v|
v.memory = 2800
v.cpus = 2
end
end
end
Vagrant.configure("2") do |config|
##### DEFINE VM #####
config.vm.define "centosvm2" do |config|
config.vm.hostname = "centosvm2"
config.vm.box = "centos/8"
config.vm.box_check_update = false
config.vm.provider :libvirt do |v|
v.memory = 1024
v.cpus = 2
end
end
end
Please ensure the Vagrantfile provided is a minimal Vagrantfile which contains only the required configuration to reproduce the behavior. Please note that if your Vagrantfile contains an excess of configuration unrelated the the reported issue, or is in a different format, we may be unable to assist with your issue. Always start with a minimal Vagrantfile and include only the relevant configuration to reproduce the reported behavior.
Debug output
Provide a link to a GitHub Gist containing the complete debug output: https://www.vagrantup.com/docs/other/debugging.html. The debug output should be very long. Do NOT paste the debug output in the issue, just paste the link to the Gist. https://gist.github.com/fabstao/d8f3dd2b33519670c74da6b3abe5061e
Expected behavior
Two VMs created with CentOS 8 and network configured, SSH pubkey added
Actual behavior
What actually happened?
Bringing machine 'centosvm1' up with 'libvirt' provider...
Bringing machine 'centosvm2' up with 'libvirt' provider...
==> centosvm2: Starting domain.
==> centosvm2: Waiting for domain to get an IP address...
==> centosvm1: Starting domain.
==> centosvm2: Halting domain...
==> centosvm1: Waiting for domain to get an IP address...
==> centosvm1: Halting domain...
==> centosvm2: An error occurred. The error will be shown after all tasks complete.
==> centosvm1: An error occurred. The error will be shown after all tasks complete.
An error occurred while executing multiple actions in parallel.
Any errors that occurred are shown below.
An unexpected error occurred when executing the action on the
'centosvm1' machine. Please report this as a bug:
Call to virConnectListAllNetworks failed: Failed to connect socket to '/var/run/libvirt/virtnetworkd-sock-ro': No such file or directory
Steps to reproduce
- Install Vagrant
- Create Vagrant file as attached
- Run vagrant up as regular user
Seeing the same here with the following Vagrantfile:
Vagrant.configure("2") do |config|
config.vm.box = "debian/bullseye64"
It might be worth noting that the same VM appears in GNOME Boxes (a user-friendly VM management GUI tool / libvirt frontend) and starts normally when launched.
@fabstao Looks like this suggestion from https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1258 works:
running sudo virsh net-list --all
before vagrant up
.
@fabstao Looks like this suggestion from vagrant-libvirt/vagrant-libvirt#1258 works: running
sudo virsh net-list --all
beforevagrant up
.
This issue still persists in Fedora 37. The above suggestion by @axelsimon works.
It has been fixed here: https://github.com/vagrant-libvirt/vagrant-libvirt/pull/1409 and should be available @ Fedora 39: https://src.fedoraproject.org/rpms/vagrant-libvirt.
@fabstao Looks like this suggestion from vagrant-libvirt/vagrant-libvirt#1258 works: running
sudo virsh net-list --all
beforevagrant up
.
This trick works on Fedora 38 as well.
@fabstao Looks like this suggestion from vagrant-libvirt/vagrant-libvirt#1258 works: running
sudo virsh net-list --all
beforevagrant up
.
This trick works too on Fedora 39 as well. thank you ☑️