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
9
votes
1 answer

Understanding arm64's kvm_vcpu_run_vhe function

In arch/arm64/kvm/hyp/vhe/switch.c, we have this code that runs the CPU in EL2 (the virtualization layer) on arm64: /* Switch to the guest for VHE systems running in EL2 */ static int __kvm_vcpu_run_vhe(struct kvm_vcpu *vcpu) { struct…
Rafaelo
  • 33
  • 1
  • 15
9
votes
2 answers

Android Emulator and OpenGL ES3: EGL_BAD_CONFIG

I am running an Android Virtual Device on my Ubuntu host. It is using the CPU/ABI Intel Atom (x86) and I am using the host GPU. The emulator is using a Kernel-based Virtual Machine. This works splendidly as long as I use an OpenGL ES2 context. If…
Bram
  • 7,440
  • 3
  • 52
  • 94
9
votes
1 answer

ASP.NET vNext - KVM Could not load file

Software Versions OS: MacX Version: 10.10.2 Sh: 3.2.57 K Version Manager - Build 10319 Installed KVM via Brew. Using the GitHub Documents. Here Cloned the Sample. Using Sample HelloMVC 'kvm restore' ran no errors 'k web' I…
Derek S
  • 178
  • 6
9
votes
1 answer

Issue with kpm restore when trying to run vNext sample app

So i am following the instructions here for getting started with vNext. All goes well until i get to the step where i have to run kpm restore and i get the following output in my console window: C:\GitRepo\vNext\samples\ConsoleApp>CALL…
jaywayco
  • 5,846
  • 6
  • 25
  • 40
9
votes
3 answers

How to use single step mode in QEMU?

I am new to qemu and I read that it allows for a singlestep mode emulation. This is helpful because I am trying to dump some addresses of the physical ram every cycle. Unfortunately, the qemu documentation is very bad. I know how to enable the…
Keeto
  • 4,074
  • 9
  • 35
  • 58
8
votes
1 answer

go install github.com/dmacvicar/terraform-provider-libvirt@latest - shows error

I am trying to Provision VMs on KVM with Terraform. one of the steps in installations is to download and install the provider buy the command: go install github.com/dmacvicar/terraform-provider-libvirt@latest but it errors: The go.mod file for the…
Orly Orly
  • 367
  • 5
  • 16
8
votes
6 answers

virt-install error

I have setup kvm, libvirt on one of Dell poweredge1000m blades. I am using the following syntax for installing a virtual machine from an existing image (executing as root). virt-install --name=vm_test --ram=1024 --arch=i686 --vcpus=1 --os-type=linux…
Jatin Kumar
  • 2,635
  • 9
  • 36
  • 46
8
votes
1 answer

What is an “irqchip”?

In reference to the QEMU x86_64 machine option kernel_irqchip=on|off, the description reads: Controls in-kernel irqchip support for the chosen accelerator when available What is an "irqchip"?
62626368616e
  • 321
  • 3
  • 9
8
votes
1 answer

How do I get Qemu USB Passthrough to work for iPad / iPhone?

I'm trying to setup a Mac OS virtual machine to do iPad development. The host system is Ubuntu 18.04, and I'm using the stock qemu packages from the Ubuntu repo. I've got a Mojave VM up and running using these instructions, and in the script to boot…
j4m3z0r
  • 397
  • 1
  • 3
  • 8
8
votes
4 answers

Android Emulator crashes with SIGSEGV on Ubuntu 18.04

Android Studio version: Android Studio 3.1.2 Build #AI-173.4720617, built on April 14, 2018 It's installed from Ubuntu's snap store. I installed the kvm using 1. Setting Up Android Studio on Ubuntu · uw-it-aca/spacescout-android Wiki. I tried what…
david-hoze
  • 1,045
  • 15
  • 31
8
votes
2 answers

How to map one single file into kubernetes pod using hostPath?

I have one own nginx configuration /home/ubuntu/workspace/web.conf generated by script. I prefer to have it under /etc/nginx/conf.d besides default.conf Below is the nginx.yaml apiVersion: v1 kind: Pod metadata: name: nginx spec: volumes: …
Larry Cai
  • 55,923
  • 34
  • 110
  • 156
8
votes
2 answers

Qemu-KVM: Translation of guest physical address to host virtual/host physical address

I am working on a project where I need to translate qemu-guest physical addresses to host virtual/physical addresses. I am using VMI (virtual machine introspection) to introspect into the qemu process (the KVM VM) and to read guest physical…
Aleks
  • 81
  • 3
8
votes
1 answer

Why qemu failled to create private network with private virtual bridge? I got "network script /etc/qemu-ifup failed with status 256""

I want to create one vm on a private network. I am following this website http://www.linux-kvm.org/page/Networking to help in configuring my qemu. I used the following command to create a vm: sudo qemu-system-x86_64 -hda image.qcow2 -enable-kvm…
Frilox
  • 815
  • 2
  • 13
  • 24
8
votes
2 answers

How to fully automate unattended virt-install?

Let me start by saying what I want to do. I'd like to fully automate, in an unattended way, the building of QEMU/KVM VM images using virt-install. I know that some folks use the GUI tool to do this, or they edit a pre-existing image's XML…
Los Alamos Al
  • 157
  • 1
  • 13
8
votes
1 answer

How can I create a transient domain in libvirt?

How can I create a transient domain using libvirt? (Using QEMU/KVM as back-end) The documentation discusses the difference between transient and persistent domains at this link:…
reyammer
  • 194
  • 2
  • 7