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

Source: Internet
Author: User
Tags svm

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:

Related Article

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.