Questions tagged [qemu]

QEMU stands for "Quick EMUlator" and is a processor emulator that relies on dynamic binary translation to achieve a reasonable speed while being easy to port to new host CPU architectures.

QEMU has two operating modes:

  • User mode emulation

In this mode QEMU runs single Linux or Darwin/Mac OS X programs that were compiled for a different CPU. System calls are thunked for endianness and for 32/64 bit mismatches. Fast cross-compilation and cross-debugging are the main targets for user-mode emulation.

  • Computer emulation

In this mode QEMU emulates a full computer system, including peripherals. It can be used to provide virtual hosting of several virtual computers on a single computer. QEMU can boot many guest operating systems, including Linux, Solaris, Microsoft Windows, DOS, and BSD 1; it supports emulating several hardware platforms, including x86, x86-64, ARM, Alpha, ETRAX CRIS, MIPS, MicroBlaze, PowerPC and SPARC.

Source: wikipedia

637 questions
5
votes
1 answer

KVM: Run a script when a guest is shutdown from within?

I am running KVM as virtualization engine. Is there a way to make QEMU/libvirt run a script on the host when a guest is shutdown from within (shutdown -h now)? I want to be able to run some custom clean-up tasks when a guest is stopped.
Daniele Testa
  • 661
  • 4
  • 10
  • 18
5
votes
1 answer

qemu with tun virtual networking issues

I'm trying to setup a virtual networking environment using open-wrt qemu and vde2 The script to boot two qemu instances and conenct them together is the…
ndp
  • 205
  • 1
  • 8
5
votes
2 answers

Internet Forwarding With Qemu?

I'm using kvm and qemu to run a windows virtual machine, but I'm trying to get internet on that machine. I've been reading about all this bridging and stuff that is done to do that, but I was wondering if there was a simpler way, to just forward my…
ConfusedGuy
5
votes
1 answer

QEMU Ubuntu Server 20.04 Initramfs write error

I created a QEMU virtual machine intending to install Ubuntu Server 20.04. The host is a Proxmox 6.x Debian system. The virtual machine parameters are: 2 CPU cores, 1 socket 512 MB ram, ballooning device 32GB SCSI Hard Drive, VirtIO SCSI…
mrtumnus
  • 318
  • 1
  • 3
  • 12
5
votes
2 answers

avoid redundant writing of virus scan signatures in VMs on same disk

I have two VMs on the same disk that each have clamav installed. Both regularly run updates for the same virus scan signatures simultaneously which results in an unnecessary strain on the performance of the disk every time. Since those are the same…
schf1919
  • 59
  • 2
5
votes
2 answers

Hot swapping physical disks passed through to a qemu VM

I have a virtual server running in qemu on proxmox. It has two physical disks attached to the host using a virtio: directive in 101.cfg as folllows virtio2: /dev/disk/by-id/ata-vol1,backup=0 virtio3: /dev/disk/by-id/ata-vol2,backup=0 These…
Christi
  • 200
  • 1
  • 10
4
votes
0 answers

Route QEMU VM traffic through hosts VPN

tl;dr Host connects via VPN to the internet and a VM on this host doesn't go through this VPN (but it should). I think the network config isn't quite correct. The host The host (arch Linux) connects to a VPN network using openvpn and a config file,…
theo_retiker
  • 41
  • 1
  • 2
4
votes
0 answers

How to create my own virtual machine base images?

I would like to create my own base VM image to allow for faster provisioning of new VMs. Right now, I'm creating a new and empty VM, inserting the distribution's ISO into it, and going through the whole installer. It takes me 20-30 minutes just to…
user306802
  • 169
  • 1
  • 7
4
votes
1 answer

QEMU versatilepb default network adapter

I'm using qemu to emulate a raspberry pi. I'm starting qemu like this: qemu-system-arm -kernel ./qemu-rpi-kernel/kernel-qemu-4.1.13-jessie \ -cpu arm1176 -m 256 -M versatilepb \ -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw…
Tom
  • 327
  • 2
  • 11
4
votes
0 answers

Libvirt & USB Hub Passthrough

I have a virtual machine which I wish to have a USB Hub and all of its devices allocated to a virtual machine. The Hub in question is a USB hub which itself is plugged into one of the ports on the motherboard / main linux hub. I've tried a few…
4
votes
1 answer

How to make sure qemu-img resize does not lose data?

I'm trying to understand how qemu-img resize shrinks the virtual disk. Let's say qemu-img info shows that the virtual size is 20G, and the disk size is only 1G. Now I want to shrink the disk from 20G to a 5G. From the qemu-img documentation here:…
Qian Chen
  • 292
  • 3
  • 19
4
votes
2 answers

Extremely slow qemu storage performance with qcow2 images

I'm running some images using libvirt on a small Openstack cluster. Storage performance on these machines is extremely poor: my monitoring tool shows 100% utilisation (usually on writes but sometimes on reads) with throughputs as low as ~50KB/s - up…
Cera
  • 553
  • 4
  • 6
  • 13
4
votes
2 answers

gluster libgfapi HA

I was exploring KVM_qemu with gluster distributed storage. My goal was to build a test cluster with complete HA . i.e HA for VMs as well as gluster storage . I'm planning to setup a 3 node gluster cluster and use qemu gluster driver with libgfapi…
Alex
  • 51
  • 2
4
votes
1 answer

Linux Red Hat Resize VM resize2fs - Couldn't find valid filesystem superblock

I'm trying to increase the size of a Linux Red Hat Virtual Machine by 10Gig. This is just on a Test Server I created that I'm trying to figure out. I increased the VM by 10 gig with this command [root@rh01 images]# qemu-img resize TestServer.img…
zhouse28
  • 63
  • 1
  • 1
  • 4
4
votes
2 answers

How to list all devices emulated in a QEMU virtual machine?

I have created a VM with the below command in qemu with KVM enabled. qemu-kvm -m 1024 -enable-kvm -hda /var/lib/libvirt/images/fedora.img I would like to know the exact devices that are emulated for this VM, including storage and network (I can see…
kumar
  • 433
  • 3
  • 10
  • 23