Questions tagged [qemu]

QEMU is a generic and open source machine emulator and virtualizer

QEMU is a generic and open source machine emulator and virtualizer.

When used as a machine emulator, QEMU can run OSes and programs made for one machine (e.g. an ARM board) on a different machine (e.g. your own PC). By using dynamic translation, it achieves very good performance.

When used as a virtualizer, QEMU achieves near native performances by executing the guest code directly on the host CPU. QEMU supports virtualization when executing under the Xen hypervisor or using the KVM kernel module in Linux. When using KVM, QEMU can virtualize x86, server and embedded PowerPC, and S390 guests.

References:

2489 questions
14
votes
4 answers

In QEMU, is it possible to intercept packets being sent/received by the Linux Guest OS?

We are doing a little project that involves monitoring the Guest OS (for example Linux) from the hypervisor layer (i.e. QEMU). One of the things that we want to monitor is network traffic going in/out of the Guest OS. Is it possible to do so without…
Wasif
  • 161
  • 1
  • 5
14
votes
1 answer

How to run gdb with LD_PRELOAD?

I have a program using LD_PRELOAD. The program should be run like this, "LD_PRELOAD=/path/to/libfoo.so qemu -U LD_PRELOAD a.out", if without gdb. Here are what I did while running gdb. (gdb) set environment…
chenwj
  • 1,989
  • 2
  • 16
  • 30
14
votes
1 answer

QEMU not installing in Ubuntu

After ./configure it's showing this error: ERROR: pixman >= 0.21.8 not present. Your options: (1) Preferred: Install the pixman devel package (any recent distro should have packages as Xorg needs pixman too). (2)…
14
votes
3 answers

Low level qemu based debugging

I've to test some low level code on an ARM architecture. Typically experimentation is quite complicated on the real board, so I was thinking about QEMU. What I'd like to get is some kind of debugging information like printfs or gdb. I know that this…
Dacav
  • 13,590
  • 11
  • 60
  • 87
14
votes
2 answers

How to set boot order on KVM (libvirt/virsh)?

How would you set the boot order on KVM when using libvirt/virsh? (Either via config or command)
Bravo Delta
  • 842
  • 2
  • 10
  • 24
14
votes
2 answers

Debugging user-code on xv6 with gdb

I'm doing an OS class that's based on xv6 and I wrote a program that needs to run on it. I know that I can debug kernel code with make qemu-gdb but I'm not sure how to debug my own user program. Lets say I want to debug cat, how would I go about…
Nathan Dortman
  • 406
  • 1
  • 7
  • 20
13
votes
1 answer

How to modify Android emulator source code

I would like to modify qemu source code to get some lower level information from Android emulator. Where do I get Android emulator source code ? (I assume the source might include qemu source code as well).
codereviewanskquestions
  • 13,460
  • 29
  • 98
  • 167
13
votes
1 answer

Why can't QEMU get even close to Rosetta 2's performance when translating x86 to M1?

Apparently, QEMU is the only piece of open source code that can emulate an x86 operating system on the new Apple silicon (M1, M2, etc.). Apple built Rosetta 2, which, in theory, does the exact same thing that QEMU would be doing in these scenarios.…
Gabriel C
  • 1,012
  • 3
  • 12
  • 30
13
votes
7 answers

Installing a x86 image in new sdk tools v12

I've upgraded to android sdk tools 12. As a release note google says: The AVD manager and emulator can now use system images compiled for ARM v7 and x86 CPUs. Has anyone tried to run a x86 image? Are there any 3.0+ images? Thanks,
13
votes
2 answers

Podman in Podman, similar to Docker in Docker?

Is there a way to run Podman inside Podman, similar to the way you can run Docker inside Docker? Here is a snippet of my Dockerfile which is strongly based on another question: FROM debian:10.6 RUN apt update && apt upgrade -qqy && \ apt…
Richard Gomes
  • 5,675
  • 2
  • 44
  • 50
13
votes
2 answers

`vagrant up` times out at "Waiting for domain to get an IP address..."

This appears to only happen when I'm using the generic/arch box. I've tried several ubuntu boxes and everything works fine. Host OS is Manjaro. It's freezing with output: INFO interface: info: ==> default: Waiting for domain to get an IP address...…
Eric Ihli
  • 1,722
  • 18
  • 30
13
votes
2 answers

why is virtio-scsi much slower than virtio-blk in my experiment (over and ceph rbd image)?

Hi I recently did a experiment of virtio-scsi over rbd through qemu target (for its DISCARD/TRIM support), and compared the throughput and iops with that of a virtio-blk over rbd setup on the same machine, using fio in the guest. Turnout the…
Zhaohui Yang
  • 173
  • 1
  • 1
  • 7
12
votes
2 answers

qemu: could not load PC BIOS 'bios-256k.bin'

I was trying to use QEMU with a kernel ISO I am building but I am unable to run the test. I am using Windows 10 64 bit and I have added the pc-bios folder to PATH if that matters. I have tried the following commands till now: Windows terminal…
ThatAnonyG
  • 137
  • 1
  • 2
  • 9
12
votes
1 answer

binfmt_misc problems in ubuntu18.04 under docker

Trying to get a cross chroot running under ubuntu:18.04 in a docker container. While trying to install binfmt-support (dependency of qemu-user-static) this happens: ~ docker run -it ubuntu:18.04 /bin/bash root@df5a34a47fe2:/# cd root@df5a34a47fe2:~#…
Paulo Matos
  • 1,614
  • 17
  • 23
12
votes
1 answer

How to replace `qemu-system -redir` command argument?

I have a script starting qemu with these options: qemu-system-x86_64 [...] -net nic,model=rtl8139 -net user,hostfwd=tcp::5555-:1522 -net dump,file=/tmp/vm0.pcap -redir…
Giacomo Tesio
  • 7,144
  • 3
  • 31
  • 48