User:Egberts/Drafts/Libvirt/QEMU guest

From Gentoo Wiki
Jump to:navigation Jump to:search
This article is a stub. Please help out by expanding it - how to get started.

This article covers libvirt and its creation of a virtual machine (VM) for use under the soft-emulation mode QEMU hypervisor Type-2, notably using only CLI tools such as virt-install and virt-xml-edit command.

The virt-install command and its configuration toward the creation of an emulation-mode virtual machine that an QEMU-capable operating system to be installed on.

For creation of the virtual machine using a GUI, see Virt-Manager/QEMU guest.

The virtual machine that is nested inside a host/another-VM is called the QEMU guest (hereafter called Guest VM).

VM Creation

VM creation entails the following creation stages:

  • Boot ROM
  • Bootloader
  • Boot Manager
  • OS
  • Network
  • Passthru devices (optional)

Boot ROM

Boot ROM is the very first piece of software to run after virtual machine (VM) CPU has been powered on or resetted.

For x86/x86_64/amd64, the starting program counter address is 0xFFFFFFF0 and its memory is usually read-only or in ROM/PROM/EPROM/EEPROM.

The only way to change the Boot ROM menu/type is during the creation of its virtual image. This Boot ROM setting cannot be changed once set. Not even `virt-xml` CLI command will let you change this.

This <os firmware=> XML setting can be set to:

  • `efi` (current)
  • `bios` (legacy)

QEMU provides several types of ROM image covering your OS/Boot ROM needs before starting its CPU program counter (PC) in this virtual machine's emulator.

EFI (current) Boot Menu


UEFI is also a boot manager (as well as a boot loader).

BIOS (legacy) Boot Menu

BIOS is a legacy bootloader.

Boot Manager

Boot manager may be:



List virtual machines (domains)

root #virsh list
 Id   Name                  State
 1    gentoo                running

See also

  • Virtualization — the concept and technique that permits running software in an environment separate from a computer operating system.
  • QEMU — a generic, open source hardware emulator and virtualization suite.
  • QEMU/QEMU front-ends — user interface application to the QEMU/libvirt API/library.
  • Virt-manager — desktop user interface for management of virtual machines and containers through the libvirt library
  • Virt-manager/QEMU_guest — QEMU creation of a guest (VM or container)
  • QEMU/Linux guest — describes the setup of a Gentoo Linux guest in QEMU using Gentoo bootable media.