First, how to install KVM
Here I am using VMware workstaion to install a Linux virtual machine on a Windows system for KVM installation operations.
First, we need to know if the CPU on our installed Linux system supports KVM virtualization technology, so we need the following command:
Egrep ' VMX|SVM '/proc/cpuinfo
If the input command does not have a flags hint, it means that there is no support for virtualization technology. The actual operating system needs to go into the BIOS to turn on Intel vt-x/ept or Amd-v/rvi (V), and the virtual machine will only need to be selected on the virtual machine settings-virtualization engine.
After checking that the CPU is supported by KVM virtualization technology, we need to download the KVM feature and the required packages using the Yum command:
Yum Install KVM KMOD-KVM qemu kvm-qemu-img virt-viewer virt-manager libvirt Libvirt-python python-virtinst
or the command:
Yum Groupinstall KVM
Once we have the KVM download installed, we can use the KVM virtualization technology to create our different virtual systems. Of course, for the rookie, we may not know much about the commands on the Linux command line, and many command functions need to surf the internet to know how to do it, and command line mode is not very good if we want to install Windows on a KVM. So here we recommend to install the Linux system on the graphical interface, the specific commands are:
Yum groupinstall ' X Window System '
Yum Gorupinstall Gnome
After the graphical interface is installed, we need to switch to the graphical interface to operate, the command is:
Init 5
Or:
Start5
Of course, if you want the Linux system to automatically enter the graphical interface after each boot, we need to modify:
Vi/etc/inittab
Modify "Id:3:initdefault:" to "Id:5:initdefault:"
After entering the Linux graphical interface, and want to use the KVM virtualization technology to build the virtual operating system, then we have to have to install the operating system image files, we need to copy the ISO file to the Linux operating system. And the VMware workstations we use, you can choose to install VMware Tools
Installing VMware tools may still be impossible to copy files to the virtual machine Linux operating system, so here we recommend one of the most convenient tools to connect the Linux virtual machine –securecrt, he is the SFTP function, After connecting to the virtual machine Linux operating system, you can upload the ISO file directly.
Second, how to configure the KVM
After uploading the ISO file, you can safely use our KVM virtual operating system technology. Open application-System Tools-Virtual System Manager
Create a new virtual machine, complete the configuration of the installation system in the virtual machine, using the method similar to VMware Workstation, here is not to repeat.
It is worth mentioning that I'm using a virtual machine and then using KVM Virtualization in a virtual machine to create a virtual machine in a virtual machine, so if you want external local access to the internal virtual machine remotely, VMware workstation will use two different network adapters to use bridging for external local connections , the internal virtual machine uses NAT to simulate the situation of the server and the local client on the line, and the different IP address segment finally realizes the external local address can connect the internal virtual machine remotely. KVM Virtual Technology is a complete virtualization technology, is really more powerful. And then we'll continue to explore the functionality it offers.