Comment 1 for bug 1784229

Revision history for this message
TJ (tj) wrote :

I'm currently working around it by bind-mounting the upstream source over the Ubuntu package thus:

mkdir -p /home/all/SourceCode/vagrant
cd /home/all/Sourcecode/vagrant
git clone https://github.com/vagrant-libvirt/vagrant-libvirt.git
sudo mount --bind /home/all/SourceCode/vagrant/vagrant-libvirt /usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.0.43

After this I can use management_network_device in the Vagrantfile. E.g.:

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

        config.vm.define :tactyle do |tactyle|

                tactyle.vm.box = "ubuntu/bionic"

                tactyle.vm.network :public_network,
                        :dev => "virbr0",
                        :mode => "bridge",
                        :type => "bridge"

                # tactyle.vm.synced_folder "../data", "/vagrant_data"
                tactyle.ssh.insert_key = false

                tactyle.vm.hostname = "tactyle"
                tactyle.vm.provider :libvirt do |libvirt|
                        # volatile memory in MegaBytes
                        libvirt.memory = 1024
                        # virtual CPU qty
                        libvirt.cpus = 4
                        # headless system (no video output)
                        libvirt.graphics_type = "none"
                        # UK keyboard
                        libvirt.keymap = "en-gb"
                        # VM architecture requires 64-bit
                        libvirt.machine_arch = "x86_64"
                        # pass the host's /dev/random device to the guest
                        libvirt.random :model => "random"
                        # set the management interface
                        libvirt.management_network_device = 'virbr1'
                end

Alas, although the VM now starts, it fails in the initramfs and drops to the shell due to the root fs block device missing!