- Mastering KVM Virtualization
- Humble Devassy Chirammal Prasad Mukhedkar Anil Vettathu
- 431字
- 2021-07-14 10:27:40
Hardware configuration examples
Let us take a look at some common hardware configurations; the domcapabilities
options of virsh commands will show you the host capabilities. You can parse the output to find the exact supported value of a particular hardware configuration which you can present to a virtual machine. The following is the maximum vcpu
that you can present to a VM:
[root@kvmHOST ~]# virsh domcapabilities | grep -i max <vcpu max='255'/> [root@kvmHOST ~]#
As per the output, on this host a maximum of 255 vcpus can be defined for a virtual machine:
[root@kvmHOST ~]# virsh domcapabilities | grep diskDevice -A 5 <enum name='diskDevice'> <value>disk</value> <value>cdrom</value> <value>floppy</value> <value>lun</value> </enum> [root@kvmHOST ~]#
As per the output, disk
, cdrom
, floppy
, and lun
type devices can be used with the virtual machine on this host.
A lot of the physical node's hypervisor capabilities are exposed by this command. Explaining all of these capabilities is beyond the scope of this book, so you may want to try running this command in your own environment to see what it reports. Alternatively, it might be good to link it to a definitive online resource. Hence, we suggest that you run the command on your system and learn its capabilities.
Along with libvirt
and the qemu-kvm
packages, we also installed the virt-manager package on the system. As stated earlier, the virt-manager is a GUI tool for managing either a local or a remote hypervisor. For now, before finishing this chapter we just want to show you how to start a virt-manager and connect it to a local KVM hypervisor:
- First, ensure that the libvirtd service is in a running state and the
virt-host-validate
command passes all its checks. - Then, navigate to the application from Menu | System tools | and click on Virtual Machine Manager.
- After clicking on the virt-manager, a Virtual Machine Manager graphical tool connected to the local hypervisor (qemu-kvm) should be opened as shown in the following screenshot:
- In case it could not search the local hypervisor and connect to it, click on the File menu and open the Add Connection dialogue box and fill in the connection details:
The preceding hypervisor item should be set to QEMU/KVM
from the dropdown list and then you can click on Connect. That's it; it will connect the virt-manager to the local qemu-kvm hypervisor through the libvirt. If you want to connect to the remote hypervisor, check Connect to remote host and fill in the details.
If your virt-manager has successfully connected to the local KVM hypervisor, you are ready to create virtual machines. If the connection fails, check the /user-home/.cache/virt-manager/virt-manager.log
log file.
- Linux設備驅動開發詳解(第2版)
- Linux操作系統基礎
- Mobile-first Bootstrap
- Haskell Financial Data Modeling and Predictive Analytics
- Linux操作系統應用編程
- 移動應用UI設計模式(第2版)
- 完美應用RHEL 8
- Linux內核設計的藝術:圖解Linux操作系統架構設計與實現原理
- Building Telephony Systems With Asterisk
- Windows 7實戰從入門到精通(超值版)
- Ubuntu Linux操作系統實用教程
- Linux集群之美
- Learn Quantum Computing with Python and IBM Quantum Experience
- OpenHarmony開發與實踐:基于紅莓RK2206開發板
- Less Web Development Essentials