Bug 1212546 - [Bug] `vagrant up` fails due to mount errors
Summary: [Bug] `vagrant up` fails due to mount errors
Status: NEW
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: Virtualization:Tools (show other bugs)
Version: Leap 15.4
Hardware: x86-64 openSUSE Leap 15.4
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-20 13:26 UTC by Moritz Röhrich
Modified: 2023-06-21 17:27 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---
jfehlig: needinfo? (moritz.rohrich)


Attachments
Full log with VAGRANT_LOG=debug enabled (70.06 KB, text/plain)
2023-06-20 13:26 UTC, Moritz Röhrich
Details
audit.log (3.29 MB, text/x-log)
2023-06-21 08:14 UTC, Moritz Röhrich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Röhrich 2023-06-20 13:26:59 UTC
Created attachment 867690 [details]
Full log with VAGRANT_LOG=debug enabled

Vagrant with libvirt provider fails to start virtual machines:
Vagrantfile:
> Vagrant.configure("2") do |config|
>   config.vm.box = "opensuse/Leap-15.2.x86_64"
> end

> │ ~/tmp │► vagrant up
> Bringing machine 'default' up with 'libvirt' provider...
> ==> default: Checking if box 'opensuse/Leap-15.2.x86_64' version '15.2.31.632' is up to date...
> ==> default: Starting domain.
> Traceback (most recent call last):
>         60: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/batch_action.rb:86:in `block (2 levels) in run'
>         59: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/machine.rb:201:in `action'
>         58: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/machine.rb:201:in `call'
>         57: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/environment.rb:614:in `lock'
>         56: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/machine.rb:215:in `block in action'
>         55: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/machine.rb:246:in `action_raw'
>         54: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `run'
>         53: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/util/busy.rb:19:in `busy'
>         52: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `block in run'
>         51: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/builder.rb:149:in `call'
>         50: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
>         49: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
>         48: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
>         47: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/builtin/box_check_outdated.rb:93:in `call'
>         46: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
>         45: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/builtin/call.rb:53:in `call'
>         44: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `run'
>         43: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/util/busy.rb:19:in `busy'
>         42: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `block in run'
>         41: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/builder.rb:149:in `call'
>         40: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
>         39: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
>         38: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
>         37: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
>         36: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
>         35: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/builtin/call.rb:53:in `call'
>         34: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `run'
>         33: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/util/busy.rb:19:in `busy'
>         32: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `block in run'
>         31: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/builder.rb:149:in `call'
>         30: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
>         29: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
>         28: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
>         27: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/builtin/call.rb:53:in `call'
>         26: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `run'
>         25: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/util/busy.rb:19:in `busy'
>         24: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `block in run'
>         23: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/builder.rb:149:in `call'
>         22: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
>         21: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
>         20: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
>         19: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/builtin/provision.rb:80:in `call'
>         18: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
>         17: from /usr/share/vagrant/gems/gems/vagrant-libvirt-0.7.0/lib/vagrant-libvirt/action/create_networks.rb:93:in `call'
>         16: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
>         15: from /usr/share/vagrant/gems/gems/vagrant-libvirt-0.7.0/lib/vagrant-libvirt/action/set_boot_order.rb:80:in `call'
>         14: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
>         13: from /usr/share/vagrant/gems/gems/vagrant-libvirt-0.7.0/lib/vagrant-libvirt/action/prepare_nfs_valid_ids.rb:14:in `call'
>         12: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
>         11: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/plugins/synced_folders/nfs/action_cleanup.rb:25:in `call'
>         10: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
>          9: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/builtin/synced_folder_cleanup.rb:28:in `call'
>          8: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
>          7: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/builtin/delayed.rb:19:in `call'
>          6: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
>          5: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/builtin/synced_folders.rb:87:in `call'
>          4: from /usr/share/vagrant/gems/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
>          3: from /usr/share/vagrant/gems/gems/vagrant-libvirt-0.7.0/lib/vagrant-libvirt/action/start_domain.rb:399:in `call'
>          2: from /usr/lib64/ruby/gems/2.5.0/gems/fog-libvirt-0.7.0/lib/fog/libvirt/models/compute/server.rb:75:in `start'
>          1: from /usr/lib64/ruby/gems/2.5.0/gems/fog-libvirt-0.7.0/lib/fog/libvirt/requests/compute/vm_action.rb:7:in `vm_action'
> /usr/lib64/ruby/gems/2.5.0/gems/fog-libvirt-0.7.0/lib/fog/libvirt/requests/compute/vm_action.rb:7:in `create': Call to virDomainCreateWithFlags failed: internal error: Process exited prior to exec: libvirt:  error : Unable to move /dev/console mount to /run/libvirt/qemu/1-tmp_default.console: No such file or directory (Libvirt::Error)



Information for package qemu:
-----------------------------
Repository     : Update repository with updates from SUSE Linux Enterprise 15
Name           : qemu
Version        : 6.2.0-150400.37.17.1
Arch           : x86_64
Vendor         : SUSE LLC <https://www.suse.com/>
Installed Size : 14.9 MiB
Installed      : Yes
Status         : up-to-date
Source package : qemu-6.2.0-150400.37.17.1.src
Upstream URL   : https://www.qemu.org/
Summary        : Machine emulator and virtualizer
Description    : 
    QEMU provides full machine emulation and cross architecture usage. It closely
    integrates with KVM and Xen virtualization, allowing for excellent performance.
    Many options are available for defining the emulated environment, including
    traditional devices, direct host device access, and interfaces specific to
    virtualization.

    This package acts as an umbrella package to the other QEMU sub-packages.

Information for package libvirt:
--------------------------------
Repository     : Update repository with updates from SUSE Linux Enterprise 15
Name           : libvirt
Version        : 8.0.0-150400.7.6.1
Arch           : x86_64
Vendor         : SUSE LLC <https://www.suse.com/>
Installed Size : 0 B
Installed      : Yes
Status         : up-to-date
Source package : libvirt-8.0.0-150400.7.6.1.src
Upstream URL   : http://libvirt.org/
Summary        : Library providing a virtualization API
Description    : 
    Libvirt is a C toolkit to interact with the virtualization
    capabilities of Linux. Virtualization of the Linux Operating System means
    the ability to run multiple instances of Operating Systems concurrently
    on a single hardware system where the basic resources are driven by a
    Linux instance. The library aims to provide long term stable C API
    to interact with Linux virtualization technologies.

Information for package vagrant-libvirt:
----------------------------------------
Repository     : Main Repository
Name           : vagrant-libvirt
Version        : 0.7.0-bp154.1.101
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 605.0 KiB
Installed      : Yes
Status         : up-to-date
Source package : vagrant-libvirt-0.7.0-bp154.1.101.src
Upstream URL   : https://github.com/vagrant-libvirt/vagrant-libvirt
Summary        : Vagrant provider for libvirt
Description    : 
    This is a Vagrant plugin that adds a Libvirt provider to Vagrant, allowing
    Vagrant to control and provision machines via the Libvirt toolkit.

Information for package vagrant:
--------------------------------
Repository     : Main Repository
Name           : vagrant
Version        : 2.2.18-bp154.2.55
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 3.3 MiB
Installed      : Yes
Status         : up-to-date
Source package : vagrant-2.2.18-bp154.2.55.src
Upstream URL   : https://github.com/hashicorp/vagrant
Summary        : Tool for building and distributing virtualized development environments
Description    : 
    Vagrant is a tool for building and distributing virtualized development
    environments.
Comment 1 Moritz Röhrich 2023-06-20 17:11:04 UTC
Same error (in a different color) appears with virt-manager:

> Error starting domain: internal error: Process exited prior to exec: libvirt:  error : Unable to move /dev/console mount to /run/libvirt/qemu/1-k3s-test_master.console: No such file or directory
> 
> Traceback (most recent call last):
>   File "/usr/share/virt-manager/virtManager/asyncjob.py", line 72, in cb_wrapper
>     callback(asyncjob, *args, **kwargs)
>   File "/usr/share/virt-manager/virtManager/asyncjob.py", line 108, in tmpcb
>     callback(*args, **kwargs)
>   File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 57, in newfn
>     ret = fn(self, *args, **kwargs)
>   File "/usr/share/virt-manager/virtManager/object/domain.py", line 1386, in startup
>     self._backend.create()
>   File "/usr/lib64/python3.6/site-packages/libvirt.py", line 1353, in create
>     raise libvirtError('virDomainCreate() failed')
> libvirt.libvirtError: internal error: Process exited prior to exec: libvirt:  error : Unable to move /dev/console mount to /run/libvirt/qemu/1-k3s-test_master.console: No such file or directory

There is a workaround:

> # umount /dev/console

But I'm not sure exactly what the implications of that are in all details, except that libvirt no longer tries to move that mountpoint to some place that doesn't exist in /run . Could someone please clarify?
Comment 2 James Fehlig 2023-06-20 17:57:43 UTC
(In reply to Moritz Röhrich from comment #1)
> There is a workaround:
> 
> > # umount /dev/console
> 
> But I'm not sure exactly what the implications of that are in all details,
> except that libvirt no longer tries to move that mountpoint to some place
> that doesn't exist in /run . Could someone please clarify?

Why is /dev/console mounted? Presumably unmounting it will affect whoever mounted it.

WRT the libvirt error, is apparmor running? If so, anything helpful in /var/log/audit/audit.log?
Comment 3 Moritz Röhrich 2023-06-21 08:14:14 UTC
Created attachment 867711 [details]
audit.log

Apparmor (and SELinux for that matter) are disabled and not running. I'm not sure what I should look for in the audit log, so I attached the whole file.
Comment 4 James Fehlig 2023-06-21 14:05:14 UTC
(In reply to Moritz Röhrich from comment #3)
> Apparmor (and SELinux for that matter) are disabled and not running. I'm not
> sure what I should look for in the audit log, so I attached the whole file.

Nothing interesting in the file if neither of those are running.

And my other question? Why is /dev/console mounted? Who/what mounted it?
Comment 5 Moritz Röhrich 2023-06-21 14:14:04 UTC
I wish I could answer that. I upgraded the kernel and rebooted the machine on the 14th I think. I don't know much about how /dev/console works. Do you know where it is typically mounted to? It's a character device, so I didn't even know it _could_ be mounted. I don't even know where I should start to look to find what and why it was mounted.
Comment 6 James Fehlig 2023-06-21 17:27:53 UTC
(In reply to Moritz Röhrich from comment #5)
> I wish I could answer that. I upgraded the kernel and rebooted the machine
> on the 14th I think. I don't know much about how /dev/console works.

So a kernel update caused the problem? If so, we should change the component to kernel.

> Do you
> know where it is typically mounted to? It's a character device, so I didn't
> even know it _could_ be mounted. I don't even know where I should start to
> look to find what and why it was mounted.

I too have never seen /dev/console mounted, so not sure where to start. Let's cc the vagrant maintainer for any potential ideas.