vagrant-libvirt: VM creation fails 2nd time
Steps to reproduce
vagrant upvagrant destroyvagrant up
Expected behaviour
VM properly setup, with SSH and internet connectivity.
Actual behaviour
VM only works 1st time, not 2nd.
Workaround 1: logout, login. Then it works again 1st time.
Workaround 2: randomize vm name, because it works always the 1st time per vm name.
System configuration
OS/Distro version:: Fedora 34 Silverblue.
Libvirt version: libvirt-daemon-7.0.0-6.fc34.x86_64
Output of vagrant version; vagrant plugin list:
Installed Version: 2.2.16
Vagrant was unable to check for the latest version of Vagrant. Please check manually at https://www.vagrantup.com vagrant-libvirt (0.5.3, system)
Attach Output of VAGRANT_LOG=debug vagrant ... --provider=libvirt >vagrant.log 2>&1
A Vagrantfile to reproduce the issue:
Vagrant.configure('2') do |config|
if Vagrant.has_plugin?('vagrant-cachier')
config.cache.scope = 'machine'
end
config.vm.define "server0" do |c|
##
# Box definition
##
c.vm.box = "generic/ubuntu2004"
##
# Config options
##
c.vm.synced_folder ".", "/vagrant", disabled: true
c.ssh.insert_key = true
c.vm.hostname = "server0"
##
# Network
##
c.vm.network "public_network", dev: "virbr0", mode: "bridge", type: "bridge"
##
# Provider
##
c.vm.provider "libvirt" do |libvirt, override|
libvirt.memory = 512
libvirt.cpus = 2
libvirt.management_network_autostart = true
libvirt.management_network_mode = "open"
libvirt.qemu_use_session = true
end
end
end
Are you using upstream vagrant package or your distros package? Distro
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 29 (16 by maintainers)
Commits related to this issue
- Add aliases for devices It is more reliable to identify disk and network devices by use of aliases, in addition to being able to establish in the absence of information the purpose of such devices. ... — committed to vagrant-libvirt/vagrant-libvirt by electrofelix 3 years ago
- Add aliases for devices (#1374) It is more reliable to identify disk and network devices by use of aliases, in addition to being able to establish in the absence of information the purpose of such ... — committed to vagrant-libvirt/vagrant-libvirt by electrofelix 3 years ago
- Add aliases for devices (#1374) It is more reliable to identify disk and network devices by use of aliases, in addition to being able to establish in the absence of information the purpose of such ... — committed to mmguero-dev/vagrant-libvirt by electrofelix 3 years ago
- Reorder qemu agent usage for use with sessions Adjust the order of checks around use of qemu sessions to allow use of the agent as a priority when enabled, which should remove the need to retrieve th... — committed to vagrant-libvirt/vagrant-libvirt by electrofelix 3 years ago
- Reorder qemu agent usage for use with sessions (#1396) Adjust the order of checks around use of qemu sessions to allow use of the agent as a priority when enabled, which should remove the need to r... — committed to vagrant-libvirt/vagrant-libvirt by electrofelix 3 years ago
- Reorder qemu agent usage for use with sessions (#1396) Adjust the order of checks around use of qemu sessions to allow use of the agent as a priority when enabled, which should remove the need to r... — committed to mmguero-dev/vagrant-libvirt by electrofelix 3 years ago
- Switch back to read-only system connection (#1397) With the rework to use the default connection to retrieve the domain to allow running of the qemu agent, no longer necessary to use a read write s... — committed to mmguero-dev/vagrant-libvirt by electrofelix 3 years ago
Ah sorry, I went looking into the wrong commits and found them untagged. cc @joao-p-marques