vagrant + libvirt
Hoi,
Mijn eerste expirement met de combinatie Vagrant en Libvirt is geen
succes, ik hoop reacties "works for me" te krijgen.
Zowel vagrant als "libvirt" zitten in Debian. Dat is ook waar ik ze
vandaan heb. Vagrant heb ik vandaag ge-installeerd `sudo apt install
vagrant`, "libvirt" is langer geleden, waarschijnlijk met `sudo apt
install virt-manager`. ( `dpkg -l '*libvirt*' | grep --count ^ii` geeft 17
als output)
Mijn Vagrantfile:
-------------------
$ cat Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "debian/buster64"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.provider "libvirt" do |l|
l.memory = "1024"
end
end
------------
Vanaf hier wat er bij mij is, dus niet belangrijk
voor een "voor mij werkt het gewoon" bericht.
----------8<------8<-------
stappers@myhost:~
$ vagrant up
Bringing machine 'default' up with 'libvirt' provider...
==> default: Box 'debian/buster64' could not be found. Attempting to find and install...
default: Box Provider: libvirt
default: Box Version: >= 0
==> default: Loading metadata for box 'debian/buster64'
default: URL: https://vagrantcloud.com/debian/buster64
==> default: Adding box 'debian/buster64' (v10.20220328.1) for provider: libvirt
default: Downloading: https://vagrantcloud.com/debian/boxes/buster64/versions/10.20220328.1/providers/libvirt.box
==> default: Successfully added box 'debian/buster64' (v10.20220328.1) for 'libvirt'!
==> default: Uploading base box image as volume into Libvirt storage...
==> default: Creating image (snapshot of base box volume).
==> default: Creating domain with the following settings...
==> default: -- Name: stappers_default
==> default: -- Description: Source: /home/stappers/Vagrantfile
==> default: -- Domain type: kvm
==> default: -- Cpus: 1
==> default: -- Feature: acpi
==> default: -- Feature: apic
==> default: -- Feature: pae
==> default: -- Clock offset: utc
==> default: -- Memory: 1024M
==> default: -- Management MAC:
==> default: -- Loader:
==> default: -- Nvram:
==> default: -- Base box: debian/buster64
==> default: -- Storage pool: default
==> default: -- Image(vda): /var/lib/libvirt/images/stappers_default.img, virtio, 20G
==> default: -- Disk driver opts: cache='default'
==> default: -- Kernel:
==> default: -- Initrd:
==> default: -- Graphics Type: vnc
==> default: -- Graphics Port: -1
==> default: -- Graphics IP: 127.0.0.1
==> default: -- Graphics Password: Not defined
==> default: -- Video Type: cirrus
==> default: -- Video VRAM: 16384
==> default: -- Video 3D accel: false
==> default: -- Sound Type:
==> default: -- Keymap: en-us
==> default: -- TPM Backend: passthrough
==> default: -- TPM Path:
==> default: -- INPUT: type=mouse, bus=ps2
==> default: Removing domain...
==> default: Deleting the machine folder
/usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.8.0/lib/vagrant-libvirt/util/network_util.rb:190:in `bridge_name': Call to virNetworkGetBridgeName failed: internal error: netwerk 'vmrtr-net' heeft geen brug naam. (Libvirt::Error)
from /usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.8.0/lib/vagrant-libvirt/util/network_util.rb:190:in `block in libvirt_networks'
from /usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.8.0/lib/vagrant-libvirt/util/network_util.rb:159:in `each'
from /usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.8.0/lib/vagrant-libvirt/util/network_util.rb:159:in `libvirt_networks'
from /usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.8.0/lib/vagrant-libvirt/action/create_networks.rb:64:in `block (2 levels) in call'
from /usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.8.0/lib/vagrant-libvirt/action/create_networks.rb:52:in `each'
from /usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.8.0/lib/vagrant-libvirt/action/create_networks.rb:52:in `block in call'
from /usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.8.0/lib/vagrant-libvirt/action/create_networks.rb:49:in `synchronize'
from /usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.8.0/lib/vagrant-libvirt/action/create_networks.rb:49:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.8.0/lib/vagrant-libvirt/action/create_domain.rb:465:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.8.0/lib/vagrant-libvirt/action/create_domain_volume.rb:94:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.8.0/lib/vagrant-libvirt/action/handle_box_image.rb:123:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.8.0/lib/vagrant-libvirt/action/handle_storage_pool.rb:63:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.8.0/lib/vagrant-libvirt/action/set_name_of_domain.rb:34:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.8.0/lib/vagrant-libvirt/action/cleanup_on_failure.rb:21:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/builder.rb:149:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/runner.rb:89:in `block in run'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/util/busy.rb:19:in `busy'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/runner.rb:89:in `run'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/builtin/call.rb:53:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/builtin/box_check_outdated.rb:31:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/builder.rb:149:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/runner.rb:89:in `block in run'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/util/busy.rb:19:in `busy'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/runner.rb:89:in `run'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/machine.rb:246:in `action_raw'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/machine.rb:215:in `block in action'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/environment.rb:614:in `lock'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/machine.rb:201:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/machine.rb:201:in `action'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/batch_action.rb:86:in `block (2 levels) in run'
stappers@myhost:~
$ virsh --connect qemu:///system net-list --all
Name State Autostart Persistent
------------------------------------------------------
default active yes yes
mcvlan-dck-home inactive no yes
vmrtr-net active yes yes
stappers@myhost:~
$
Groeten
Geert Stappers
--
Silence is hard to parse
Reply to: