Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve runtime detection of KVM support #14425

Open
simondeziel opened this issue Nov 9, 2024 · 0 comments
Open

Improve runtime detection of KVM support #14425

simondeziel opened this issue Nov 9, 2024 · 0 comments

Comments

@simondeziel
Copy link
Member

Due to suspected issue with kvm module being loaded and crash during suspend, I rmmod kvm before suspending my laptop. This causes LXD to not noticing that KVM is still supported:

$ lxc launch ubuntu-minimal-daily:24.04 v1 --vm -p lxd-ci
Launching v1
Error: Failed instance creation: Failed creating instance record: Instance type "virtual-machine" is not supported on this server: KVM support is missing (no /dev/kvm)

# Fair, the modules were not loaded, let's fix it
$ sudo modprobe kvm kvm_amd

$ lxc launch ubuntu-minimal-daily:24.04 v1 --vm -p lxd-ci
Launching v1
Error: Failed instance creation: Failed creating instance record: Instance type "virtual-machine" is not supported on this server: KVM support is missing (no /dev/kvm)

This second attempt should have worked but did not.

Workaround: restart LXD for it to pick up the KVM support:

$ sudo snap restart lxd
2024-11-09T11:04:58-05:00 INFO Waiting for "snap.lxd.daemon.service" to stop.
Restarted.
$ lxc launch ubuntu-minimal-daily:24.04 v1 --vm -p lxd-ci
Launching v1

Additional information:

$ snap list lxd
Name  Version      Rev    Tracking     Publisher   Notes
lxd   git-5c0f573  31064  latest/edge  canonical✓  -
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

No branches or pull requests

1 participant