[DRE-maint] Bug#884808: vagrant-libvirt creates invalid xml for libvirt

Sascha Girrulat sascha at girrulat.de
Tue Dec 19 22:09:50 UTC 2017


Package: vagrant-libvirt
Version: 0.0.40-1
Severity: normal

Dear Maintainer,

vagrant-libvirt creates a invalid xml for libvirt. 

If i try to create a machine i got the following error:

Bringing machine 'dummy-01' up with 'libvirt' provider...
==> dummy-01: Creating image (snapshot of base box volume).
==> dummy-01: Creating domain with the following settings...
==> dummy-01:  -- Name:              platform_dummy-01
==> dummy-01:  -- Domain type:       kvm
==> dummy-01:  -- Cpus:              1
==> dummy-01:  -- Feature:           acpi
==> dummy-01:  -- Feature:           apic
==> dummy-01:  -- Feature:           pae
==> dummy-01:  -- Memory:            1024M
==> dummy-01:  -- Management MAC: 
==> dummy-01:  -- Loader:             
==> dummy-01:  -- Base box:          debian-9-amd64
==> dummy-01:  -- Storage pool:      default
==> dummy-01:  -- Image:             /var/lib/libvirt/images/platform_dummy-01.img (10G)
==> dummy-01:  -- Volume Cache:      default
==> dummy-01:  -- Kernel:   
==> dummy-01:  -- Initrd:             
==> dummy-01:  -- Graphics Type:     spice
==> dummy-01:  -- Graphics Port:     5900
==> dummy-01:  -- Graphics IP:       127.0.0.1
==> dummy-01:  -- Graphics Password: Not defined
==> dummy-01:  -- Video Type:        qxl
==> dummy-01:  -- Video VRAM:        9216
==> dummy-01:  -- Sound Type:   
==> dummy-01:  -- Keymap:            en-us
==> dummy-01:  -- TPM Path:           
==> dummy-01:  -- INPUT:             type=mouse, bus=ps2
==> dummy-01:  -- CHANNEL:             type=unix, mode=
==> dummy-01:  -- CHANNEL:             target_type=virtio, target_name=org.qemu.guest_agent.0
==> dummy-01:  -- CHANNEL:             type=spicevmc, mode=
==> dummy-01:  -- 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 ''

Reproduce it in the following way:
  - Install vagrant-libvirt,
  - try to start a virtual machine with $ vagrant up dummy-01,
  - see it failing during the creation of that virtual machine with the error above from the vagrant file below.

Vagrantfile:

boxes = [
  {
    :name => "dummy-01",
    :ip => "192.168.1.2",
    :mem => "1024",
    :cpu => "1",
    :group => 'dummy',
    :application => "dummy",
  }
]

Vagrant.configure("2") do |config|
  config.vm.box = "debian-9-amd64"

  boxes.each do |opts|
    config.vm.define opts[:name] do |config|
      config.vm.hostname = opts[:name]

      config.vm.provider "libvirt" do |libvirt|
        libvirt.memory = opts[:mem]
        libvirt.cpus = opts[:cpu]
      end

      config.vm.provider "virtualbox" do |v|
        v.customize ["modifyvm", :id, "--memory", opts[:mem]]
        v.customize ["modifyvm", :id, "--cpus", opts[:cpu]]
      end

      config.vm.network :private_network, ip: opts[:ip]

      config.vm.provision :ansible do |ansible|
        ansible.playbook = opts[:play] ||="site.yaml"
        ansible.groups = {
          opts[:group] => [opts[:name]],
        }
        ansible.extra_vars = {
          application: opts[:application]
        }
        ansible.limit = "all"
        ansible.verbose = ENV['ANSIBLE_VERBOSE'] ||= "v"
        ansible.tags = ENV['ANSIBLE_TAGS'] ||= "all"
      end
    end
  end
end

There is a related Red Hat Bug with some other details:
  https://bugzilla.redhat.com/show_bug.cgi?id=1518899

Cheers
Sascha

-- System Information:
Debian Release: 9.1
  APT prefers stable
  APT policy: (500, 'stable'), (100, 'testing'), (10, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages vagrant-libvirt depends on:
ii  ruby                        1:2.3.3
ii  ruby-fog-core               1.42.0-1
ii  ruby-fog-libvirt            0.3.0-1
ii  ruby-nokogiri               1.6.8.1-1
ii  ruby2.1 [ruby-interpreter]  2.1.5-2+deb8u2
ii  vagrant                     1.9.1+dfsg-1

Versions of packages vagrant-libvirt recommends:
pn  libguestfs-tools   <none>
ii  nfs-kernel-server  1:1.3.4-2.1
ii  qemu-utils         1:2.8+dfsg-6+deb9u2

vagrant-libvirt suggests no packages.

-- no debconf information



More information about the Pkg-ruby-extras-maintainers mailing list