Ubuntu 22.04 LTS 安装KVM

您所在的位置:网站首页 肉松是不是脂肪多的食物 Ubuntu 22.04 LTS 安装KVM

Ubuntu 22.04 LTS 安装KVM

2022-10-02 01:16| 来源: 网络整理| 查看: 265

LST 

Long-term Support

1. Before you begin with installing KVM, check if your CPU supports hardware virtualization:

egrep -c '(vmx|svm)' /proc/cpuinfo

If the command returns a value of 0, your processor is not capable of running KVM. On the other hand, any other number means you can proceed with the installation.

If the command returns a value of 0, your processor is not capable of running KVM. On the other hand, any other number means you can proceed with the installation.

我的这个返回的是0 额。可是我安装成功了。

2. Now, check if your system can use KVM acceleration by typing:

If kvm-ok returns an error stating KVM acceleration cannot be used, try solving the problem by installing cpu-checker.

3. To install cpu-checker, run the following command:

4. When the installation completes, restart the terminal.

要关掉重新打开终端吗?我之前好像没重新打开呃。

To enable KVM virtualization on Ubuntu 20.04:

Install related packages using apt

Authorize users to run VMs

Verify that the installation was successful

1. First, update the repositories:

首先更新仓库

daemon

US: [ˈdimən]

UK: [ˈdiːmən]

n.(古希腊神话中的)半神半人的精灵

Web守护进程;守护程序;虚拟光驱

第二步,安装KVM,

2. Then, install essential KVM packages with the following command:

sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils

libvirt-daemon-system libvirt-clients bridge-utils

这三个是什么东东?我是打错了多少字母。

Step 2: Authorize Users

sudo adduser ‘username’ libvirt

已经是libvirt的成员了。

2. Now do the same for the kvm group:

之前下载是 qemu-kvm ,怎么是加kvm的成员啊。

Step 3: Verify the Installation

1. Confirm the installation was successful by using the virsh command:

virsh list --all

这不是新建的虚拟机的名称吗?

2. Or use the systemctl command to check the status of libvirtd:

sudo systemctl status libvirtd

这个是查看进程状态吗?

3. Press Q to quit the status screen.

virtualization虚拟化 这个是激活进程吗?

4. If the virtualization daemon is not active, activate it with the following command:

sudo systemctl enable --now libvirtd

Creating a Virtual Machine on Ubuntu 20.04

1. Before you choose one of the two methods listed below, install virt-manager, a tool for creating and managing VMs:

sudo apt install virt-manager

virt-manager乱入啊,这个啥东东。GUI界面吗?

Method 1: Virt Manager GUI

Start virt-manager with:

Method 2: Using Command Line

GUI界面创建虚拟机很常见,这个option1 是虚拟机名字

ram内存 都有解释的。

Use the virt-install command to create a VM via Linux terminal. The syntax is:

virt-install --option1=value --option2=value ...

In the following example, virt-install is used to install Fedora 33 Workstation.

Tip: For tidier appearance of commands with many options, type a back-slash after each option. That way, when you press Enter, the command will not execute, and the cursor will go to the next line.

Options behind the command serve to define the parameters of the installation.

Here is what each of them means:

OptionDescription--nameThe name you give to the VM--descriptionA short description of the VM--ramThe amount of RAM you wish to allocate to the VM--vcpusThe number of virtual CPUs you wish to allocate to the VM--diskThe location of the VM on your disk (if you specify a qcow2 disk file that does not exist, it will be automatically created)--cdromThe location of the ISO file you downloaded--graphicsSpecifies the display type



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3