Another great link: http://leewings.cn/powerful-kvm.html
XXX: the document states that either an Intel CPU with VT (vmx) or an SVM (secure virtual machine, also known as a AMD-V) must be available
Amd cpu installation. I installed it on turion 64 X2. No problem.
Detects whether AMD and Intel CPUs support VT or SVM. For details, refer to has_svm () and cpu_has_kvm_support () of KVM in the kernel ()
Function.
1. Ensure that the kernel version is 2.6.20 or updated. Go to www.kernel.org to view the release time of your kernel, and then:
Http://sourceforge.net/project/showfiles.php? Group_id = 180599
Download a KVM release later than your kernel-<release> .tar.gz
Note: the Linux kernel include/Linux/KVM. h defines a kvm_api_version macro. For example, in 2.6.22, It is 12.
In the downloaded KVM-<release> .tar.gz, user/kvmctl. c defines an expected_kvm_api_version macro value.
It must match your kernel. However, this step will be checked during configure, so don't worry.
# Tar zvxf KVM-<release> .tar.gz-C/usr/local/
# Cd/usr/local/KVM-<release>/
2. Note before compiling.
In KVM configure,/lib/modules/'uname-R'/build is regarded as the source code.
Directory (in fact,/lib/modules/'uname-R'/source is the source code directory, only when the kernel is compiled
Use o = <dir> to specify the output directory, which is the same ). Therefore, you need to change it to make the build
This symbolic link points to the same link as source.
# Cd/lib/modules/2.6.22/
# Unlink build
# Ln-SF 'readlink source' build
Note that after <3> is completed, you need to change the build link back.
Or do not change it. Pay attention to the parameter in <3> Configure.
3. Configure, make, make install
# Cd/usr/local/KVM-<release>/
#./Configure -- prefix =/usr/local/KVM -- With-patched-Kernel
// If not done, add -- kerneldir =/lib/modules/'uname-R'/source
# Make
# Make install
4. Load modules
# Modprobe KVM-AMD // or modprobe KVM-intel, depending on your CPU
5. Create a Virtual Disk
#/Usr/local/KVM/bin/qemu-IMG create-F qcow vdisk. IMG 5g
6. boot from ISO
#/Usr/local/KVM/bin/qemu-system-x86_64-hda vdisk. IMG-CDROM/root/windows2000.iso-boot D-M 384
-M 384 indicates the memory size of MB. If the machine memory is less than 1 GB, 192 or 128 is recommended.
For Intel CPU, change "qemu-system-x86_64" to "qemu ".
7. Start the virtual machine after installation.
#/Usr/local/KVM/bin/qemu-system-x86_64 vdisk. IMG-M 384
Screen capture: