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
-1
votes
2 answers

Qemu+kvm high cpu usage

I was running a KVM host with Intel(R) Xeon(R) CPU E3-1230 v2 (8 cores total). When playing a 1080p video using VLC player, the perf stat result of the KVM process is as follows. Performance counter stats for process id '120879': 65235.881169…
useprxf
  • 269
  • 1
  • 3
  • 13
-1
votes
1 answer

libvirt DHCP fails from host

I am having trouble setting up a PXE VM. It is sending DHCP requests and the server is sending responses, but the VM does not appear to be processing the response. I am unsure as to the cause. I did confirm physical machines are working just fine…
Dan
  • 23
  • 1
  • 5
-1
votes
1 answer

Virtualization software prototype?

I have a poc on Virtualization In the prototype, i will make a central Java controller must be able to receive start / stop / status commands over an API and use KVM to start a VM, request its status and stop it. Functionality The controller…
Ahmed Gamal
  • 1,666
  • 1
  • 17
  • 25
-1
votes
1 answer

Which addresses to change in Cassandra.yaml for this situation?

I created a virtual machine on a Ubuntu 14.04 server (IP address - a.b.c.d) using KVM. I installed Cassandra on this virtual machine (with IP address 192.x.y.z). How can I send write requests or stress requests from another Ubuntu server machine (…
-1
votes
1 answer

How to improve KVM VPS's network performance

I am using QEMU to virtualize KVM VPS. I have already turned off all the things like gso,tso,tx,rx at the host's network interface and my VPS use VirtIO as the NIC. When I do speedtest at the host, usually a result of approximately 800 Mbps downlink…
Howard Liu
  • 93
  • 1
  • 11
-1
votes
1 answer

How to use KVM to boot a VM from image file in ubuntu?

I got a KVM VM image from a friend. I could not find how to use KVM to boot a VM from an existing image file (.img) in Internet. How can I use KVM to boot a VM from the existing image file? Thanks.
talihsu
  • 175
  • 3
  • 13
-1
votes
1 answer

Openvswitch / KVM Guest unable to ping external GW

I've got a host with RHEL6.4 OS. Under the host I have a KVM VM also running RHEL6.4. The host is connected to tagged switch interface that has vlan tag 1. I've configured the host network interfaces as…
-1
votes
1 answer

Creating a VM with multiple vNICs using QEMU

I am trying to create a VM on KVM using QEMU and wondering how to add multiple vNICs to it, qemu-system-x86_64 -enable-kvm -cpu host,-xsave,-avx,-avx2,-bmi2 -m 4096 -smp cores=2,sockets=1 -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=hd…
user2547836
  • 89
  • 1
  • 7
-1
votes
1 answer

Why does java support different types of JVMs such as CVM, KVM?

We know that JAVA has several types of vitual machine supported. Why it's needed where Java could run based on one single/standard JVM? Why does java support different types of JVMs such as CVM, KVM?
-1
votes
1 answer

Guest linux in Virtualbox cannot run KVM inside it, what is best alternative?

My setup HOST: Win 8.1 Guest: Lubuntu 14.04 I develop my apps in my guest I read here: https://askubuntu.com/questions/328748/how-to-enable-nested-virtualization-in-ubuntu that you cannot use the android sdk emulation in a virtualized linux, at…
Toskan
  • 13,911
  • 14
  • 95
  • 185
-1
votes
1 answer

QEMU-KVM performance optimization

I am trying to test the performance difference between QEMU-KVM and host machine and could not understand how optimize my QEMU-KVM to achieve near native performance. I installed QEMU-KVM with lubuntu 14.04 and running a stress microbenchmark that…
tandem
  • 2,040
  • 4
  • 25
  • 52
-1
votes
1 answer

how to add docker to a ubuntu 14 qcow2 image

I have a Ubuntu 14 .qcow2 cloud image, which I'm running with Fedora 20 KVM and OpenStack. I would like to add / install docker to that image and "re-save" is as a base image, so any VMs created from it would have docker pre-installed. How is this…
Eugene Goldberg
  • 14,286
  • 20
  • 94
  • 167
-1
votes
1 answer

Unable to increase qemu raw image file size

I am trying to increase the size of the raw image from 2G by an extra 4G using the command $ qemu-img resize usb.img +4G and it was successful. $ ls -l -rw-r--r-- 1 root root 6405750784 Dec 22 13:58 usb.img But inside the vm, the size still says…
rakesh
  • 135
  • 3
  • 15
-1
votes
1 answer

Linux: How to check if all cores in the guest VM are being utilized

I have a Linux Guest VM with multiple vCPUs spawned using libvirt/qemu-kvm Sometimes because of host kernel issues I suspect all the cores in the VM are not getting utilized correctly. I am looking for a programmatic way to check if the guest VM is…
Manohar
  • 3,865
  • 11
  • 41
  • 56
-1
votes
1 answer

How does VPS work?

Technically speaking, how does a virtual private server work? How can a VPS guarantee performance while sharing the physical resources with other VPS (I'm supposing that one server can handle several multiples VPS and not just a few).
Daniel
  • 366
  • 1
  • 12