- KVM Virtualization Cookbook
- Konstantin Ivanov
- 258字
- 2021-07-02 22:07:08
Getting ready
In order to start a KVM instance, you will need the following:
- The QEMU binaries, provided after following the Installing and configuring QEMU recipe
- The custom raw Debian image we built in the Installing a custom OS on the image with debootstrap recipe
- Processor that supports virtualization
- The KVM kernel modules
To check whether your CPU supports virtualization, run the following code:
root@kvm:~# cat /proc/cpuinfo | egrep "vmx|svm" | uniq
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm xsaveopt cqm_llc cqm_occup_llc dtherm arat pln pts
root@kvm:~#
The presence of the vmx (for Intel) or svm (for AMD) flags indicate that your CPU supports the virtualization extensions.
The flags from the cpuinfo command output simply mean that your processor supports virtualization; however, make sure that this feature is enabled in the BIOS of your system; otherwise, the KVM instance will fail to start.
To manually load the KVM kernel module and ensure that it's been loaded, run the following code:
root@kvm:~# modprobe kvm
root@kvm:~# lsmod | grep kvm
kvm 455843 0
root@kvm:~#
推薦閱讀
- HTML5+CSS3王者歸來
- Learn ECMAScript(Second Edition)
- Learning Java Functional Programming
- Learning ROS for Robotics Programming(Second Edition)
- Mastering Ember.js
- 網(wǎng)絡(luò)爬蟲原理與實(shí)踐:基于C#語言
- Building Minecraft Server Modifications
- Python+Tableau數(shù)據(jù)可視化之美
- JSP程序設(shè)計(jì)實(shí)例教程(第2版)
- 區(qū)塊鏈架構(gòu)之美:從比特幣、以太坊、超級(jí)賬本看區(qū)塊鏈架構(gòu)設(shè)計(jì)
- 算法設(shè)計(jì)與分析:基于C++編程語言的描述
- NGUI for Unity
- C#面向?qū)ο蟪绦蛟O(shè)計(jì)(第2版)
- Getting Started with the Lazarus IDE
- C/C++程序設(shè)計(jì)教程