Bug 1518899 - vagrant-libvirt creates invalid xml for libvirt-3.7.0-2
Summary: vagrant-libvirt creates invalid xml for libvirt-3.7.0-2
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: vagrant-libvirt
Version: 27
Hardware: noarch
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Pavel Valena
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-29 17:47 UTC by Andreas Bleischwitz
Modified: 2017-12-21 19:02 UTC (History)
6 users (show)

Fixed In Version: vagrant-libvirt-0.0.40-3.fc27
Clone Of:
Environment:
Last Closed: 2017-12-21 19:02:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github vagrant-libvirt vagrant-libvirt issues 831 0 None closed Vagrant up gives me error: Call to virDomainDefineXML failed: internal error: Unknown source mode '' when using "org.qem... 2020-04-20 19:56:22 UTC

Description Andreas Bleischwitz 2017-11-29 17:47:59 UTC
Description of problem:
Starting a new virtual machine throws an error about invalid XML:
Call to virDomainDefineXML failed: internal error: Unknown source mode '' when using "org.qemu.guest_agent.0"

Version-Release number of selected component (if applicable):
libvirt-3.7.0-2.fc27.x86_64
vagrant-libvirt-0.0.40.2.fc27.noarch
vagrant-1.9.8-1.fc27.noarch

How reproducible:
Install vagrant-libvirt, try to start a virtual machine using vagrant, see it failing during the creation of that virtual machine.

===== Vagrant-file ======
Vagrant.configure(2) do |config|
  config.vm.box = "centos/7"
  config.vm.provider :libvirt do |domain|
    domain.memory = 2048
    domain.cpu_mode = 'host-passthrough'
    domain.management_network_name = "private_network"
  end  
  config.vm.define 'centos' do |node|
    node.vm.hostname = 'centos.example.com'
  end
end

========


Steps to Reproduce:
1. yum install vagrant-libvirt
2. place $Vagrant-file in a folder as "Vagrantfile" 
3. try to bring up vm: vagrant up

Actual results:
==> centos:  -- INPUT:               type=mouse, bus=ps2
==> centos:  -- CHANNEL:             type=unix, mode=
==> centos:  -- CHANNEL:             target_type=virtio, target_name=org.qemu.guest_agent.0
==> centos:  -- CHANNEL:             type=spicevmc, mode=
==> centos:  -- CHANNEL:             target_type=virtio, target_name=com.redhat.spice.0
Error while creating domain: Error saving the server: Call to virDomainDefineXML failed: internal error: Unknown source mode ''

Expected results:
virtual machine starting up

Additional info:

See https://github.com/vagrant-libvirt/vagrant-libvirt/issues/831 for further details and fix.

Most recent version from the github source should already contain the fix.

Comment 1 Pavel Valena 2017-11-29 21:15:20 UTC
Hello Andreas,
thank you for your report.

I can confirm the issue occurs on Fedora Rawhide, with a Vagrantfile from corresponding upstream issue #831:

```
Vagrant.configure("2") do |config|

  config.vm.box = "centos/7"

  config.vm.provider :libvirt do |libvirt|
    libvirt.channel :type => 'unix',     :target_name => 'org.qemu.guest_agent.0', :target_type => 'virtio'
  end
end

```

Applying the upstream patch[1], solves the issue. Hopefully, there'll be a release soon(patch is 1d old).

[1] https://github.com/vagrant-libvirt/vagrant-libvirt/commit/a64c538f7fa6b95f4a4bc8cabfd598d2ada149a0.patch

Comment 2 Pavel Valena 2017-12-05 00:56:52 UTC
The release is planned [1], but `fog-libvirt` may complicate things [2].
I'll just backport the patch for now.

[1] https://github.com/vagrant-libvirt/vagrant-libvirt/issues/837
[2] https://github.com/fog/fog-libvirt/pull/29

Comment 3 Fedora Update System 2017-12-08 16:16:43 UTC
vagrant-libvirt-0.0.40-3.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-589585e42e

Comment 4 Fedora Update System 2017-12-10 00:33:36 UTC
vagrant-libvirt-0.0.40-3.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-589585e42e

Comment 5 Fedora Update System 2017-12-21 19:02:33 UTC
vagrant-libvirt-0.0.40-3.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.