Questions tagged [kvm]

KVM (for Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V).

KVM was envisioned and created by Qumranet, which was later acquired by Red Hat.

KVM is a very neat implementation of virtualization for x86 as the original code was less than 10,000 lines of code. It is implemented as a kernel module, and uses a number of features of the Linux kernel, instead of implementing them (e.g., scheduling of virtual machines is taken care by the kernel), unlike where all these features had to be taken care of by the hypervisor. Thus code reuse is something that KVM relies upon.

Following are the ways how KVM virtualizes various components of the real PC.

CPU Virtualization: CPU virtualization is taken care of by Intel VT or AMD-V technology, and KVM adds glue code to effectively use these technologies. KVM loads and saves a number of registers when a VM is scheduled or when it exits respectively.

I/O Virtualization: KVM does I/O virtualization with the help of , which emulates devices. KVM also supports passthrough devices where the VM can directly access I/O devices using IOMMU.

Memory Virtualization: Earlier design of KVM virtualized memory using shadow page tables, which is a software only approach to virtualizing memory. There is a high cost of synchronizing the shadow page tables with the page tables belonging to OS. Later, Intel and AMD came up with their own versions of nested page tables which is mostly a hardware approach to virtualizing memory.

1138 questions
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
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

KVM not working with EC2 C5.large

I used a Centos AMI on AWS, with Type C5.large and HVM. I installed the KVM packages but when I run kvm-ok the output is: Your CPU does not support KVM extensions KVM acceleration can NOT be used How is possible my CPU does not support…
Robert
  • 10,403
  • 14
  • 67
  • 117
13
votes
4 answers

KVM is required to run this AVD. Unknown Error! Please file a bug against Android Studio

Operating System : CentOS Linux 7 Android Studios version : 2.3.3 Result of the command: lsmod | grep kvm My computer supports virtualization but when i try to start the emulator I get this error: 2017-06-19 19:11:58,120 [ 98282] INFO -…
Minathe
  • 630
  • 1
  • 5
  • 21
12
votes
4 answers

Docker container with DHCP assigned address

I have a server with several virtual machines running. I am starting a container with Jira installation and i need the container to be assigned with different address from the DHCP and not use the host IP address. I am a noobie so please explain
FixXxeR
  • 169
  • 2
  • 2
  • 11
12
votes
2 answers

nested virtualization with KVM: -enable-kvm in qemu in nested virtualization

In my already virtualized host, trying to pass the option the option -enable-kvm -m 1024, will fail: qemu-system-x86_64 -vga std -enable-kvm -m 1024 -monitor telnet:localhost:9313,server,nowait -drive file=my_img.img,cache=none # Could not access…
ribamar
  • 1,435
  • 1
  • 16
  • 26
12
votes
1 answer

qemu + pulseaudio and bad quality of sound

I am using my gentoo as host os for kvm with vga passthrough for playing on windows, but I have problem with sound, it is not good quality, I hear something like crackles in sound. I am using pulseaudio (with --system mode) on host os, and tried…
januszmk
  • 131
  • 1
  • 1
  • 4
12
votes
4 answers

Can one install KVM on Windows?

Can one install KVM on a Windows system where Windows will be the host operating system? I have searched a lot but every answer is about how one can install Windows as guest on KVM.
Snziv Gupta
  • 1,016
  • 1
  • 10
  • 21
12
votes
1 answer

Qemu user-emulation with Java

I am using QEMU emulator for tracing the execution of an user program. We have added a helper function which prints the IP of all the executed instructions. We have tested the working of this tool for two variants of prime-number program - one in C…
prathmesh.kallurkar
  • 5,468
  • 8
  • 39
  • 50
12
votes
0 answers

Mounting shared folder in KVM VM error: mount: unknown filesystem type '9p'

I'm using Centos 6.4 in a KVM virtual machine, with CentOS 6.4 as host also. I configured shared folders following these instructions: http://www.linux-kvm.org/page/9p_virtio. When I try to mount the shared folder in the guest machine I get mount:…
Ion Dulgheru
  • 129
  • 1
  • 7
12
votes
2 answers

Porting KVM (Written for Linux) to Mac OS X

I am trying to port KVM (Written for Linux) to Mac OS X. Background work : I started going through Apple Developer Documents which lists out a procedure to do just that. I was not able to understand some parts of it, and the ones I understood and…
Krishna
  • 425
  • 3
  • 6
  • 14
11
votes
5 answers

kvm permission denied on Android Studio emulator

When I try to run an AVD, I get this erros: /dev/kvm device permission denied Yeah, I know, I don't have the permission to access /dev/kvm, I know that I can "solve" it by changing the /dev/kvm permission to my user, and set my user to kvm group,…
felipe.rce
  • 237
  • 2
  • 8
  • 35
11
votes
3 answers

Qemu, div by zero, mxcsr register

I got an interesting situation with the following code: static void DivideByZero() { // volatile to prevent compiler optimizations. volatile float zero = 0.0f; volatile float result __attribute__((unused)) = 123.0f / zero; …
Laser
  • 6,652
  • 8
  • 54
  • 85
11
votes
3 answers

Does libvirt support clone qcow2 with copy on write

The format qcow2 support copy-on-write.detail about qcow2 is here. Does libvirt suport clone qcow2 VM Image with copy-on-write. I find none options about: virt-clone
hellolwq
  • 531
  • 3
  • 7
  • 18
10
votes
1 answer

KVM shadow page table handling in x86 platform

From what I understand, on processors that doesn't have hardware support for guest virtual to host physical address translation KVM uses the shadow page table. Shadow page table is built and updated when the guest OS modifies its page tables. Are…
Manohar
  • 3,865
  • 11
  • 41
  • 56
1 2
3
75 76