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
22
votes
5 answers

Remote 'g' packet reply is too long

I am trying to debug Linux kernel with kvm vm. I am getting an error message "Remote 'g' packet reply is too long". My host is 64-bit and so is my vm. My steps: Start the VM with custom -kernel, -initrd and -append options. Start gdb Execute "set…
22
votes
3 answers

What does "cpu_time" represent exactly in libvirt?

I can pull the following CPU values from libvirt: virsh domstats vm1 --cpu-total Domain: 'vm1' cpu.time=6173016809079111 cpu.user=26714880000000 cpu.system=248540680000000 virsh cpu-stats vm1 --total Total: cpu_time …
JoeM
  • 221
  • 2
  • 3
19
votes
5 answers

Android Studio 2.3 using emulator from console, "/dev/kvm device: permission denied" for root user

I'm trying to start a virtual android device which I created with the avdmanager of Android Studio 2.3 (via command line) all commands are performed as root user when i try to start the emulator via $ ~/Android/Sdk/tools/./emulator…
Stormtrooper CWR
  • 533
  • 1
  • 6
  • 19
18
votes
1 answer

What is the difference between QEMU, KVM, Libvirt, and how to use with Vagrant? Are all 3 needed to work together?

I've used Vagrant with Virtualbox before but VB is not working on this computer so I thought I would try a different approach, but I can't quite make sense of this cluster of software, what their uses are individually and interdependently... I know…
user163831
  • 1,031
  • 3
  • 13
  • 25
18
votes
5 answers

libvirt: fetch ipv4 address from guest

I am looking for a solution to fetch the ipv4 address or other metadata of a VM running on qemu/kvm with libvirt? I've also looked into ovirt guest agent and qemu guest agent, but I was wondering if there's a better/easier way to fetch this…
Jochen
  • 1,853
  • 3
  • 20
  • 28
17
votes
3 answers

qemu vs qemu-kvm: some performance measurements

I conducted the following benchmark in qemu and qemu-kvm, with the following configuration: CPU: AMD 4400 process dual core with svm enabled, 2G RAM Host OS: OpenSUSE 11.3 with latest Patch, running with kde4 Guest OS: FreeDos Emulated Memory:…
bio2com2
  • 171
  • 1
  • 4
17
votes
4 answers

Android Studio KVM Setting?

Put in KVM (Kernel-based Virtual Machine) into my 64 bit Ubuntu 14.04 LTS per: https://help.ubuntu.com/community/KVM/Installation In the terminal: kvm-ok INFO: /dev/kvm exists KVM acceleration can be used OK so the KVM is in. When I run the…
mark_97
  • 307
  • 1
  • 4
  • 13
16
votes
1 answer

virsh list command not showing any domain

I am running Ubuntu 12.04 on a VM on Fedora 18 host using QEMU/KVM and libvirtd. Now, when I fire up the virsh and give list command, it doesn't show any domain running, though my VM is running quite fine. Any idea what am I doing wrong?
Pensu
  • 3,263
  • 10
  • 46
  • 71
16
votes
2 answers

qemu KVM kernel module no such file or directory

I am currently taking an operating systems class and I need to use qemu to run a small operating system that my professor provided. I am trying to use qemu within an ubuntu 12.04 virtual machine on virtualbox on my macbook air 5.2. I know the…
user1820145
  • 227
  • 1
  • 2
  • 4
15
votes
3 answers

Check if VT-D / IOMMU has been enabled in the BIOS/UEFI

To check if Intel's VT-X or AMD's AMD-V is enabled in the BIOS/UEFI, I use: if systool -m kvm_amd -v &> /dev/null || systool -m kvm_intel -v &> /dev/null ; then echo "AMD-V / VT-X is enabled in the BIOS/UEFI." else echo "AMD-V / VT-X is not…
Forivin
  • 14,780
  • 27
  • 106
  • 199
15
votes
2 answers

Running android emulator during jenkins build

I have installed Jenkins and configured a build job with emulator running during build. But when I execute the job, I get error message that jenkins user doesn't have permission to run kvm. How can I fix it. $ android list target [android] Using…
Viktor K
  • 2,153
  • 3
  • 25
  • 40
15
votes
1 answer

Enable kvm on Ubuntu running on VirtualBox on Windows

I have a Windows machine with an Intel CPU (VMX Enabled on boot menu). I am running Ubuntu Guest on top of it using VirtualBox. I am running qemu on top of it to run another Guest OS, using kvm (the -enable-kvm option). I get the following error on…
Shehbaz Jaffer
  • 1,944
  • 8
  • 23
  • 30
15
votes
2 answers

Does qemu/kvm support ovf?

Does qemu/kvm support ovf? Is it able to boot existing ovf packages? I can not find any related info both in ovf standard and qemu/kvm website. Any helpful link on this? Thanks.
FaceBro
  • 787
  • 2
  • 13
  • 29
14
votes
10 answers

Using laptop as a second programming monitor

The joys of multimonitor programming are countless, I think there are about 5 blog posts on Coding Horror on the topic alone! I often code in Windows on my main machine, and have my Mac laptop set up to the side. I use the Mac both to compile Mac…
SPWorley
  • 11,550
  • 9
  • 43
  • 63
14
votes
6 answers

Android Studio running on VMware virtual machine: KVM is not installed

I'm running Android Studio on a Ubuntu VMWare virtual machine. The problem is that when I try to run an app with the AVD emulator I get the following errors in the console: /home/verite/Android/Sdk/tools/emulator -avd Nexus_5_API_22_x86 -netspeed…
Vicent
  • 5,322
  • 2
  • 28
  • 36
1
2
3
75 76