Skip to content

qemu-system-x86_64 does not execute. How can I troubleshoot this?

[ SOLVED ]

​

Hello all,

Two days ago I installed the qemu package from extra and followed this article on how to set up Windows10, and it all worked properly.

Yesterday I created a new image which was to be used for a local arch web server. As per the archwiki I used $ qemu-img create -f raw image_file 20G to create the image. And to boot it up I used qemu-system-x86_64 -enable-kvm -cpu host -cdrom ~/Downloads/archlinux-2019.04.01-x86_64.iso -boot order=d -drive file=/mnt/VMS/webserver_test_arch/webserver_test_arch.img,format=raw -m 4G, however this is when qemu-system-x86_64 did not return any output and instantly dropped me back to $. running qemu-system-x86_64 on it's own does the same.

I should note that both the windows VM and the arch VM are on encrypted partitions (luks2) containing a btrfs filesystem and are mounted (manually only when needed) on /mnt/. However the user I am logged in as is the owner of both their mount points and has r / w/ x permissions. So before qemu stopped working as the archwiki suggests I disabled CoW on the directories containing my VMs using the following tip in the green paragraph. Despite this since then I have shredded those partitions, encrypted them again and this time have put ext4 as a filesystem and now I am still facing the exact same case of qemu not executing which makes me think this had nothing to do with filesystems in the first place.

I can confirm I have all the dependencies (besides optional) listed here. I have removed and installed the package a few times since then and the problem still persists. Here is the output of a few commands to confirm my hardware and kernel support of kvm:

[tsvetkov@anna ~]$ LC_ALL=C lscpu | grep Virtualization
Virtualization:      VT-x

[tsvetkov@anna ~]$ zgrep CONFIG_KVM /proc/config.gz
CONFIG_KVM_GUEST=y
# CONFIG_KVM_DEBUG_FS is not set
CONFIG_KVM_MMIO=y
CONFIG_KVM_ASYNC_PF=y
CONFIG_KVM_VFIO=y
CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y
CONFIG_KVM_COMPAT=y
CONFIG_KVM=m
CONFIG_KVM_INTEL=m
CONFIG_KVM_AMD=m
CONFIG_KVM_AMD_SEV=y
CONFIG_KVM_MMU_AUDIT=y

[tsvetkov@anna ~]$ lsmod | grep kvm
kvm_intel             245760  0
kvmgt                  28672  0
mdev                   20480  2 kvmgt,vfio_mdev
vfio                   32768  3 kvmgt,vfio_mdev,vfio_iommu_type1
kvm                   737280  2 kvmgt,kvm_intel
irqbypass              16384  1 kvm

[tsvetkov@anna ~]$ zgrep VIRTIO /proc/config.gz
CONFIG_BLK_MQ_VIRTIO=y
CONFIG_VIRTIO_VSOCKETS=m
CONFIG_VIRTIO_VSOCKETS_COMMON=m
CONFIG_NET_9P_VIRTIO=m
CONFIG_VIRTIO_BLK=m
# CONFIG_VIRTIO_BLK_SCSI is not set
CONFIG_SCSI_VIRTIO=m
CONFIG_VIRTIO_NET=m
CONFIG_CAIF_VIRTIO=m
CONFIG_VIRTIO_CONSOLE=m
CONFIG_HW_RANDOM_VIRTIO=m
CONFIG_DRM_VIRTIO_GPU=m
CONFIG_VIRTIO=m
CONFIG_VIRTIO_MENU=y
CONFIG_VIRTIO_PCI=m
CONFIG_VIRTIO_PCI_LEGACY=y
CONFIG_VIRTIO_BALLOON=m
CONFIG_VIRTIO_INPUT=m
CONFIG_VIRTIO_MMIO=m
CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
CONFIG_RPMSG_VIRTIO=m
CONFIG_CRYPTO_DEV_VIRTIO=m

[tsvetkov@anna ~]$ lsmod | grep virtio
[tsvetkov@anna ~]$ sudo modprobe virtio
[tsvetkov@anna ~]$ lsmod | grep virtio
virtio                 16384  0

As you can see only the virtio module is not loaded on boot but even when I manually load it it still doesn't work. If I forgot to post the output of anything important please let me know. Any guidance in troubleshooting this issue is highly appreciated.

Many thanks!

Edited 4 Apr 2019. We only hold this version.

26 points12 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
26 · 100% up
Kind
Text
ID
b9emxp

Author

44
posts
132
comments
0
media
View profile

12 comments

Does qemu-system-x86_64 --help give you the help output?

4 points

It doesn't give any output. However /usr/bin/qemu-system-x86_64 does exist and it is an executable.

2 points

That suggests there's something wrong with your installation. Probably has nothing to do with your vm. Run the following commands and make sure you get the same output:

$ file /usr/bin/qemu-system-x86_64
/usr/bin/qemu-system-x86_64: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=0abc9c3de327725dd02c4ddb528770bc722d8aef, stripped
$ sha1sum /usr/bin/qemu-system-x86_64
722daa0aca2254f8b2af74e6598666f758467e21  /usr/bin/qemu-system-x86_64
$ ldd /usr/bin/qemu-system-x86_64 | wc -l
69
3 points

Why don't you try using qemu-headless? If that doesn't work either, the problem might be elsewhere.

2 points

Ends up in the exact same state. And it fails due to the same reason as from the strace output:

openat(AT_FDCWD, "/etc/qemu/qemu.conf", O_RDONLY) = -1 EACCES (Permission denied) exit_group(1)

​

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.