Skip to content

Conversation

@Sploder12
Copy link
Contributor

This PR removes libvirt from the list of drivers in the GUI. If a user has libvirt they will still be on libvirt, however, once they switch to a different driver libvirt will no-longer be selectable.

MULTI-1889

@Sploder12 Sploder12 force-pushed the gui-remove-libvirt-option branch from e69743f to e3a69b1 Compare March 31, 2025 16:25
@codecov
Copy link

codecov bot commented Mar 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.33%. Comparing base (5385fac) to head (20b3f75).
Report is 3408 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4018   +/-   ##
=======================================
  Coverage   89.33%   89.33%           
=======================================
  Files         260      260           
  Lines       14735    14735           
=======================================
  Hits        13164    13164           
  Misses       1571     1571           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

levkropp
levkropp previously approved these changes Mar 31, 2025
Copy link
Contributor

@levkropp levkropp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested with

  • sudo snap install multipass
  • setting the driver to libvirt in the gui
  • confirming it can launch instances after installing libvirt and connecting multipass to libvirt with snap connect multipass:libvirt

Then I installed this PR with sudo snap refresh multipass --channel edge/pr4018 and was able to select a different backend in the GUI and could not return to the libvirt backend as expected

@Sploder12 Sploder12 force-pushed the gui-remove-libvirt-option branch from a7fd894 to 20b3f75 Compare April 2, 2025 17:03
Copy link
Contributor

@levkropp levkropp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this change works for not showing libvirt as one of the drivers in the settings menu after switching away from it, but it does break being able to launch instances with libvirt after snap refresh installs this version. I'm not sure if this was happening when it was a provider as well
image

@Sploder12
Copy link
Contributor Author

So this change works for not showing libvirt as one of the drivers in the settings menu after switching away from it, but it does break being able to launch instances with libvirt after snap refresh installs this version. I'm not sure if this was happening when it was a provider as well

I was able to recreate on the CLI as well, the full error ends in Could not open '/home/<user>/.local/share/multipassd/vault/instances/<instance>/<image>.img': Permission denied
This appears to be related to permissions. 😭

@ricab
Copy link
Collaborator

ricab commented Apr 2, 2025

Hey @Sploder12, @levkropp, libvirt is very restrictive by default and a locally built Multipass daemon usually fails to launch VMs with "Permission denied" errors (that's regardless of the new permissions). I am not aware of that affecting the snap, so there is probably something else going on in here, but I wanted to make sure you guys don't confuse the two problems.

The permissions error we've always had on local builds can be overcome with something like:

  1. sudoedit /etc/libvirt/qemu.conf
  2. uncomment user = "root" line
  3. close the editor
  4. systemctl restart libvirtd

@Sploder12
Copy link
Contributor Author

Thanks @ricab! That fixed it for me, I almost went on a wild goose chase!

@ricab
Copy link
Collaborator

ricab commented Apr 2, 2025

Glad to be of service 🙂

Copy link
Contributor

@levkropp levkropp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm that this fixed it on my end as well. Thank you @ricab !

Copy link
Contributor

@andrei-toterman andrei-toterman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, all good 😄

@Sploder12 Sploder12 added this pull request to the merge queue Apr 2, 2025
Merged via the queue into main with commit a2692ac Apr 2, 2025
16 checks passed
@Sploder12 Sploder12 deleted the gui-remove-libvirt-option branch April 2, 2025 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants