[Virtual Machine] Small experiment: Use a KVM Virtual Machine to install a Windows system

Source: Internet
Author: User
Tags svm

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 CPUInstall. I installed it on turion 64 X2. No problem.
Whether AMD and Intel CPU support VT or SVM. For details, referKernelHas_svm () and cpu_has_kvm_support () of KVM ()
Function.

1. Ensure that the kernel version is 2.6.20 or later, go to www.Kernel. Org to view the release time of your kernel, and then:

Http://sourceforge.net/project/showfiles.PHP? Group_id = 180599

 

DownloadA release time later than your kernel's KVM-<release> .tar.gz

Note: Linux kernel include/Linux/KVM. h defines a kvm_api_version macro. For example, in 2.6.22, It is 12. in
download KVM- .tar.gz, user/kvmctl. c defines an expected_kvm_api_version. The macro value
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.CompileNote. (You can skip this step. Specify the -- kerneldir parameter in step 3)

/Lib/ModuleS/'uname-R'/build considers it to beSource codeLocation
Directory(In fact,/lib/modules/'uname-R'/source is the source.CodeDirectory, 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. LoadModule

# Modprobe KVM-AMD // or modprobe KVM-intel, depending on your CPU


5. CreateVirtualDisk

#/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 thatMemory. 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. After installation, startVirtual Machine.

#/Usr/local/KVM/bin/qemu-system-x86_64 vdisk. IMG-M 384

 

Http://linux.chinaunix.net/bbs/thread-907956-1-1.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.