In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the knowledge of "how to use the KVM virtual machine on the deepin operating system". Many people will encounter this dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
KVM concept
KVM
Kernel-based Virtual Machine kernel-based virtual machines, coupled with QEMU (processor virtual software), require CPU to support virtualization technology (and turn on the virtualization option in BIOS), and the efficiency can reach more than 80% of the physical machine.
Architecture diagram
KVM installation
Query whether the machine supports virtualization:
If the vmx or svm logo is not included in the output, it means that your cpu does not support hardware virtualization.
If the result is greater than 0, cpu supports virtualization. Because virtualization requires CPU to support the VMX or SVM instruction set, VMX is the Intel instruction. SVM is the AMD instruction.
Install qemu and virsh virtual machine management tools on a deepin system with amd64 architecture:
Install the following packages on the system of the aarch74 architecture:
Sudo apt-get install libvirt0 libvirt-daemon qemu virt-manager bridge-utils libvirt-clients python-libvirt qemu-efi uml-utilities virtinst qemu-system
The system makes it the hypervisor hyervisor by loading kernel modules such as kvm-intel.ko (Intel-based machine) and kvm-amd.ko (amd-based machine).
Check to see if the kvm module is loaded:
After installing the qemu and libvirtd packages, it automatically starts and enables the libvirtd service.
Create a virtual machine
Graphics tool (virt-manager)
The interface displays:
Create a virtual machine:
Create using a local image:
Set the number of virtual CPU cores and memory size:
Set up the virtual machine network, either using bridging or net forwarding:
Add a virtual display device:
Add USB controller devices:
Start the virtual machine, boot from the local debian image, and enter the installation interface
Command line tool (virsh)
Create a storage pool:
Configure the disk image:
Create a virtual machine:
Sudo virt-install-name=debian-disk path=/media/deepin/Home/deepin/Spoll1/debian10.img-graphics spice-vcpu=2-ram=2048-cdrom=/media/deepin/Home/deepin/debian-10.0.0-arm64-DVD-1.iso-network bridge=virbr0-os-variant=linux
The xml file creates a virtual machine:
Modify the fields and fields in the configuration debian10-1.xml file as follows:
Define the debian10-1 virtual machine and start it:
Problems encountered
Question 1: "unsupported configuration: CPU mode 'custom' for x86' 64 kvm domain on x86'64 host is not supported".
Solution: restart the host.
Question 2: how to open the serial port of the virtual machine.
Solution: add "console=tty0 console=ttyS0,115200" to the startup parameters of the virtual machine. You can enter the serial port of the virtual machine through the virsh console [vm id] command.
Question 3: non-root users log in remotely by ssh. Execute the command: virt-manager reports the following error:
Solution: execute the following command to add the current user to the group libvirt:
Question 4: X11 forwarding virt-manager graphical interface reported error: (virt-manager:12205): Gtk-WARNING * *: cannot open display:
Solution: connect using the following method: ssh-Y deepin@ServerIP virt-manager
Question 5:
Create virtual machine Times permission error: monitor: Could not access KVM kernel module: Permission denied failed to initialize KVM: Permission
Solution:
Problem 6: when the .aarch74 server creates a virtual machine that supports aarch74 architecture, it is reported that the libvirt version does not support UEFI.
Solution: restart the system and create it again.
This is the end of the content of "how to use the KVM virtual machine on the deepin operating system". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.