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
685
votes
29 answers

Android Studio: /dev/kvm device permission denied

When I try to run my Android app on an emulator I get this error: /dev/kvm permission denied. I checked the permissions and added the user I am currently logged in with to the kvm group. What is wrong?
florian.R
  • 6,851
  • 3
  • 10
  • 4
192
votes
9 answers

Error response from daemon: No build stage in current context

I was trying to run a container with kvm, using the code I found here: https://github.com/jessfraz/dockerfiles/tree/master/kvm I created a new directory, cd'd into it and created the dockerfile and start.sh files. When I gave order to build, it…
user3710626
  • 2,167
  • 2
  • 11
  • 8
120
votes
14 answers

Android emulator and virtualbox cannot run at same time

Whenever I have Virtualbox running, I cannot start an Android emulator image (and vice versa). The error message in the AVD manager is ioctl(KVM_CREATE_VM) failed: Device or resource busy ko:failed to initialize KVM How can I make both run at the…
Bananeweizen
  • 21,797
  • 8
  • 68
  • 88
81
votes
3 answers

What's the differences between Xen, QEMU and KVM?

I know QEMU is used by Xen, and KVM is a fork of QEMU. So, KVM includes that Xen adds to QEMU ? What is the name ? Thanks
Xorax
  • 1,644
  • 2
  • 18
  • 18
74
votes
5 answers

Should I choose KVM or OpenVZ for my VPS?

My VPS provider gives me the choice between KVM and OpenVZ. What is the best choice for a VPS with 128MB or 256MB RAM?
Array Fanatic
69
votes
1 answer

Do x86 instructions require their own encoding as well as all of their arguments to be present in memory at the same time?

I am trying to figure out whether it is possible to run a Linux VM whose RAM is only backed by a single physical page. To simulate this, I modified the nested page fault handler in KVM to remove the present bit from all nested page table (NPT)…
savvybug
  • 792
  • 4
  • 7
52
votes
3 answers

Difference between KVM and LXC

What is the difference between KVM and Linux Containers (LXCs)? To me it seems, that LXC is also a way of creating multiple VMs within the same kernel if we use both "namespaces" and "control groups" features of kernel.
JuliandotNut
  • 1,169
  • 1
  • 12
  • 22
45
votes
11 answers

Error message "The server selected protocol version TLS10 is not accepted by client preferences"

I am trying to run this JNLP file on Windows 10 to connect to a server (actually, I am connecting to a dedicated server via KVM over IPMI (IPKVM) or whatever it is called, so I can install a new operating system). I am getting error The server…
Frank Martin
  • 3,147
  • 16
  • 52
  • 73
39
votes
12 answers

virt-manager guest resize not working

Installed virt-manager, target virtual machine is debian jessie with spice-vdagent installed shared clipboard, and latency-free mouse input works Display: Spice Video: QXL Channel spice: spicevmc, virtio, com.redhat.spice.0 (confirmed /dev devices…
ThorSummoner
  • 16,657
  • 15
  • 135
  • 147
34
votes
4 answers

kvm: module verification failed: signature and/or required key missing - tainting kernel

I'm using Ubuntu 14.04 LTS and kernel version 3.13.11.4. I'm trying to load patched KVM modules kvm and kvm-intel and I'm getting the following errors kvm: module verification failed: signature and/or required key missing - tainting kernel …
user2743
  • 1,423
  • 3
  • 22
  • 34
32
votes
3 answers

Using Vagrant to set up a VM with KVM/qemu without VirtualBox

I'm getting started Vagrant and want to use it with KVM/qemu (and the Virtual Machine Manager GUI), instead of installing VirtualBox. So I first installed Vagrant: $ vagrant --version Vagrant 1.9.1 $ vagrant box list There are no installed boxes!…
rahuL
  • 3,330
  • 11
  • 54
  • 79
28
votes
5 answers

How to launch qemu-kvm from inside a Docker container?

Assuming the host system already supports KVM, is it possible to create a docker image which contains some scripts to launch a VM (inside the container) with virsh and QEMU-KVM? We are looking into dockerize a script which launches a VM through…
int 2Eh
  • 525
  • 1
  • 5
  • 12
28
votes
2 answers

How to enable VT-x in BIOS and KVM modules on Linux?

I have Dell Inspiron 15 5000 Series laptop containing intel core i5 6200U processor. I am using Windows 10 Home edition. It has the virtualization device and I already checked in BIOS for the virtualization, which is enabled. But in android studio I…
Hussam Cheema
  • 536
  • 1
  • 7
  • 13
28
votes
3 answers

KVM installation: Unable to locate package ia32-libs-multiarch

I'm trying to install KVM for avd of android studio and I ran this command: sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils ia32-libs-multiarch But on running it gives me this error: Unable to locate package…
Aditya Krishn
  • 1,997
  • 3
  • 12
  • 8
24
votes
2 answers

How to enable KVM on a Mac for Qemu?

I'm virtualizing a machine for the first time on my Mac with Qemu (for an university assignment, so it's not possible to change the tool). We have to compare some measurements between a VM running on KVM and one without KVM. I tried to start the KVM…
patreu22
  • 2,988
  • 4
  • 22
  • 31
1
2 3
75 76