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

qemu-system-x86_64: failed to initialize KVM: Operation not permitted #13

Closed
tx8r opened this issue May 31, 2021 · 26 comments
Closed

qemu-system-x86_64: failed to initialize KVM: Operation not permitted #13

tx8r opened this issue May 31, 2021 · 26 comments

Comments

@tx8r
Copy link

tx8r commented May 31, 2021

I get this error when I download and run the packages.

tx8r@Asusleptop:~$ utqemu start

05/31 17:38:52 [NOTICE] Downloading 1 item(s)

05/31 17:38:52 [NOTICE] Allocating disk space. Use --file-allocation=none to disable it. See --file-allocation option in man page for more details.
 *** Download Progress Summary as of Mon May 31 17:39:52 2021 ***              
===============================================================================
[#9e11de 574MiB/743MiB(77%) CN:1 DL:10MiB ETA:16s]
FILE: /home/tx8r/snap/utqemu/common/ubuntu-touch-mainline-generic-amd64.img.xz
-------------------------------------------------------------------------------

[#9e11de 733MiB/743MiB(98%) CN:1 DL:10MiB]                                     
05/31 17:40:09 [NOTICE] Download complete: /home/tx8r/snap/utqemu/common/ubuntu-touch-mainline-generic-amd64.img.xz

Download Results:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
9e11de|OK  |   9.8MiB/s|/home/tx8r/snap/utqemu/common/ubuntu-touch-mainline-generic-amd64.img.xz

Status Legend:
(OK):download completed.

WARNING: Image format was not specified for '/home/tx8r/snap/utqemu/common/ubuntu-touch-mainline-generic-amd64.img' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
Could not access KVM kernel module: Operation not permitted
qemu-system-x86_64: failed to initialize KVM: Operation not permitted
@tx8r
Copy link
Author

tx8r commented May 31, 2021

I tried the solution here but the GUI screen did not appear. Only login screen appears

@Fuseteam
Copy link

actually did you run sudo snap connect utqemu:kvm?

@tx8r
Copy link
Author

tx8r commented May 31, 2021

The command worked. But I still get qemu virgl error.
qemu-virgil -enable-kvm -m 2G -device virtio-vga,virgl=on -display sdl,gl=on -netdev user,id=ethernet.0,hostfwd=tcp::10022-:22 -device rtl8139,netdev=ethernet.0 ~/snap/utqemu/common/ubuntu-touch-mainline-generic-amd64.img
This command worked but Ubuntu touch GUI didn't appear

@Fuseteam
Copy link

guess that's related to #7 once that's fixed that would no longer be an issue
i have the same problem and i think it may be related to the pull request i linked there
the issue with kvm however is due to the connection not being autoconnected for obvious reasons

@tx8r tx8r closed this as completed Jun 1, 2021
@tx8r
Copy link
Author

tx8r commented Jun 1, 2021

The problem is solved. But the login screen still appears. I will open a new issue

@Fuseteam
Copy link

Fuseteam commented Jun 2, 2021

@tx8r appearently the latest image is broken
this image is reported to be working: https://ci.ubports.com/job/rootfs/job/rootfs-generic-amd64/603/artifact/ubuntu-touch-mainline-generic-amd64.img.xz
to use it you'll need to extract it with xz -v /path/to/downloaded/image and then run with the command mentioned in #7

@tx8r
Copy link
Author

tx8r commented Jun 2, 2021

You mean unxz /path/to/downloaded/image :)
I tried run on qemu but qemu crashed. Now I'm try on virtualbox. Thanks for image link.

@tx8r
Copy link
Author

tx8r commented Jun 2, 2021

virtualbox didn't work. qemu output this error.

gl_version 45 - core profile enabled
X Error:  GLXBadContext
  Request Major code 152 (GLX)
  Request Minor code 4 ()
  Error Serial #96339
  Current Serial #96340

I searched on the internet and I think it has something to do with kvm.

@Fuseteam
Copy link

Fuseteam commented Jun 2, 2021

the qemu-virgil command for #7 worked for me fwiw so

qemu-virgil -enable-kvm -m 2G -device virtio-vga,virgl=on -display sdl,gl=on -netdev user,id=ethernet.0,hostfwd=tcp::10022-:22 -device rtl8139,netdev=ethernet.0 ~/path/to/ubuntu-touch-mainline-generic-amd64.img

You mean unxz /path/to/downloaded/image :)

yeah true 😂

@tx8r
Copy link
Author

tx8r commented Jun 3, 2021

@Fuseteam What is your distro?
qemu-virgil -enable-kvm -m 2G -device virtio-vga,virgl=on -display sdl,gl=on -netdev user,id=ethernet.0,hostfwd=tcp::10022-:22 -device rtl8139,netdev=ethernet.0 ~/path/to/ubuntu-touch-mainline-generic-amd64.img
This command doesn't work for me

@Fuseteam
Copy link

Fuseteam commented Jun 3, 2021

i'm on ubuntu, what error are you getting from that?

@tx8r
Copy link
Author

tx8r commented Jun 3, 2021

virtualbox didn't work. qemu output this error.

gl_version 45 - core profile enabled
X Error:  GLXBadContext
  Request Major code 152 (GLX)
  Request Minor code 4 ()
  Error Serial #96339
  Current Serial #96340

I searched on the internet and I think it has something to do with kvm.

This error. I am trying to install qemu from another source.

@Fuseteam
Copy link

Fuseteam commented Jun 3, 2021

that from virtualbox right? but what error are you getting from qemu-virgil?

@tx8r
Copy link
Author

tx8r commented Jun 3, 2021

that from virtualbox right? but what error are you getting from qemu-virgil?

No. This error from qemu. Virtualbox just crashed.

@tx8r
Copy link
Author

tx8r commented Jun 3, 2021

virtualbox didn't work. qemu output this error.

:]

@Fuseteam
Copy link

Fuseteam commented Jun 3, 2021

ooooops i can't read, hmmmm
i was also testing

qemu-system-x86_64-spice -enable-kvm -m 2G -device virtio-vga,virgl=on -display sdl,gl=on -netdev user,id=ethernet.0,hostfwd=tcp::10022-:22 -device rtl8139,netdev=ethernet.0 ~/path/to/ubuntu-touch-mainline-generic-amd64.img

as well but unlike virgil is get stuck with booting the network daemons

@tx8r
Copy link
Author

tx8r commented Jun 3, 2021

@tx8r appearently the latest image is broken
this image is reported to be working: https://ci.ubports.com/job/rootfs/job/rootfs-generic-amd64/603/artifact/ubuntu-touch-mainline-generic-amd64.img.xz
to use it you'll need to extract it with xz -v /path/to/downloaded/image and then run with the command mentioned in #7

I deleted the img file for re-download but this link is now broken. I downloaded the latest successful build.
build list: https://ci.ubports.com/job/rootfs/job/rootfs-generic-amd64/

@Fuseteam
Copy link

Fuseteam commented Jun 3, 2021

i think the latest build is broken, that's the build utqemu downloads automatically
last i heard #610 was working but #613 was broken now sure about the state of #611 and #612

@tx8r
Copy link
Author

tx8r commented Jun 3, 2021

i think the latest build is broken, that's the build utqemu downloads automatically

Yeah. Doesn't work. :( It's too early to choose the right image. I'm on it

@Fuseteam
Copy link

Fuseteam commented Jun 3, 2021

https://ci.ubports.com/job/rootfs/job/rootfs-generic-amd64/610/artifact/ubuntu-touch-mainline-generic-amd64.img.xz is this now set to be kept forever or, you know, until the newest image is fixed

@tx8r
Copy link
Author

tx8r commented Jun 3, 2021

https://ci.ubports.com/job/rootfs/job/rootfs-generic-amd64/610/artifact/ubuntu-touch-mainline-generic-amd64.img.xz is this now set to be kept forever or, you know, until the newest image is fixed

I think the file will be kept forever. I found successful builds of 2019.

@Fuseteam
Copy link

Fuseteam commented Jun 3, 2021

https://ci.ubports.com/job/rootfs/job/rootfs-generic-amd64/610/artifact/ubuntu-touch-mainline-generic-amd64.img.xz is this now set to be kept forever or, you know, until the newest image is fixed

I think the file will be kept forever. I found successful builds of 2019.

i said "it is now", because i just had just messaged with dalton about it :P

@tx8r
Copy link
Author

tx8r commented Jun 3, 2021

https://ci.ubports.com/job/rootfs/job/rootfs-generic-amd64/610/artifact/ubuntu-touch-mainline-generic-amd64.img.xz is this now set to be kept forever or, you know, until the newest image is fixed

I think the file will be kept forever. I found successful builds of 2019.

i said "it is now", because i just had just messaged with dalton about it :P

Oh, 😆 my english is a little bad. :)

@Fuseteam
Copy link

Fuseteam commented Jun 3, 2021

https://ci.ubports.com/job/rootfs/job/rootfs-generic-amd64/610/artifact/ubuntu-touch-mainline-generic-amd64.img.xz is this now set to be kept forever or, you know, until the newest image is fixed

I think the file will be kept forever. I found successful builds of 2019.

i said "it is now", because i just had just messaged with dalton about it :P

Oh, laughing my english is a little bad. :)

mine might be worse xD

virtualbox didn't work. qemu output this error.

:]

remember? 😆

@Fuseteam
Copy link

Fuseteam commented Jun 4, 2021

@Flohack74
Copy link
Member

Can I suggest, as this is an issue tracker, if the original issue is resolved, to not start a long discussion inside here and move to the forum? Thanks!

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

3 participants