Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

KVM Virtualization (2) KVM and Libvirt Architecture

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

kvm is a kernel component, and does not have its own user space, QEMU is a general purpose open source hardware simulator, can simulate a variety of hardware

QEMU_KVM merges from the branch to the trunk, QEMU becomes KVM's management tool in user space, KVM runs in kernel space to load virtual machine requests for physical resources, and QEMU handles various commands issued by users to virtual machines in user space.

KVM belongs to the host model architecturally, because Linux was originally designed with support for virtualization, and KVM exists in the form of kernel modules. But as more and more virtualization capabilities are added to the Linux kernel, you can also think of the Linux kernel as a Hypervisor. KVM can also be considered a Hypervisor model.

Libvirt

Libvirt is an open source software tool developed by Redhat with the goal of providing a common and stable software library to efficiently and securely manage virtual machines on a node and support remote operations.

Libvirt Services

Start service systemctl start libvirtd

The configuration file is located in the/etc/libvirt directory

A library file that implements the management interface a daemon (libvirtd) a command-line tool (virsh)

In order to support VMM,Libvirt uses a Driver based architecture, each VMM needs to provide a Driver and Libvirt to communicate to control the specific VMM.

Libvirt defines various APIs

VM snapshot: A snapshot of the complete virtualization state, including information about memory, hard disks, etc. Virtualization management: This API is used to manage virtual machines and is also the most frequently used function in Libvirt, such as creating, destroying, restarting, migrating virtual machines, disk images of operating systems, etc. Events: Events are a set of mechanisms defined by Libvirt to detect the occurrence of specific situations. Users can tell Libvirt what events they want to monitor and what actions to take when the events occur through the responsive API. Host: Used to obtain various information about the host, including machine name, COU status, etc., and also used to establish a connection with a specific VMM. network interface: Implementing responsive operations on a network interface, such as defining a new network interface

Virsh is a Libvirt-based command-line tool for managing the entire lifecycle of virtual machines, including creation, destruction, migration, etc. virsh common parameter directive: virsh shutdown --mode-agent Safer than--mode=acpi Shutdown the operating systemvirsh snapshot-creat -quiesceFlushes cache contents to disk virsh domfsee before creating a snapshot Silent file system virsh domfsshaw restore silent ground file system virsh domfstrim Make virtual machine trim file system virsh domtime Get virtual machine events virsh setvcpus vCPUvirsh dominfaddr --source agent for configuring virtual machines Query the IP address of the virtual machine virsh domfsinfo Display a list of file systems for virtual machines virsh set-user-password Set password for VM user

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report