Use of virtual machines in Linux

Source: Internet
Author: User
Use of virtual machines in Linux-general Linux technology-Linux technology and application information. The following is a detailed description. Scope of discussion: virtualbox qemu kvm

Other virtual software: vmware Xen

Let me first talk about vmware. I used it once in win. It looks pretty good, but I need to authorize it. Xen, I remember this stuff when I installed Fedora 7. I never used it. It's very complicated to say, nvidia drivers do not seem to be available.

Virtualbox, I would like to like it. After all, it was used by virtual winxp before yesterday. The configuration is simple. By the way, I also used it to access the Internet to watch the Olympics, one is that the resources are too occupied, and the other is that the master and slave servers have crashed at the same time. Finally, hey, the whole world only depends on qt3.

Qemu and kqemu are rare in simulating functions rather than virtual functions. To be honest, even kqemu seems to be less than half the host speed. Of course, kqemu is much faster than qemu alone.

Kvm, the main character of today:

First, your cpu must support vm technology: $ egrep '(vmx | svm)'/proc/cpuinfo

If it is supported, the results will be displayed. Otherwise, you do not need to continue reading the results.

Then, enable kvm when compiling the kernel.

Then: emerge kvm

In addition to adding more havekernel by default, the required USE flag seems to be ~ X86

Add users to the group kvm disk, chgrp kvm/dev/kvm, re-login...

Common commands:

Kvm-img create-f qcow2 win. cow 5G
Kvm-hda win. cow-boot d-m 192-localtime-net nic-net user-soundhw es1370-cdrom XPSP2VOLIBM_EN.iso
Kvm-hda win. cow-boot c-m 192-localtime-net nic-net user-soundhw es1370

In fact, the above has already installed an xp, and the sound can access the host through the network. You can change the Voice device as needed, man kvm.

Gentoo-wiki has an article about kvm, which I also made for reference. There is a link to the kvm homepage, and there are some fixes on the homepage, which is worth reading.

Now, we have an intuitive feeling for kvm: memory usage is low, disk I/O is fast, cpu usage is low, basically close to host speed, and the bottleneck lies in memory. These are also its many advantages over vbox. The only drawback is that the video memory is only 4 MB, which means you cannot watch av for av, however, when xp is used for development, testing, or temporary use, you do not need to view the av video storage requirements. Finally, I would like to mention qemu and decide to try its simulation function. I remember today I saw someone using it to directly test the host kernel and enable debug. qemu can directly start it.

As a digress, the virtual winxp was originally implemented by the Assembly environment. This requirement can be easily implemented using dosemu, pure dos, and very simple. At first glance, it will not be written.

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.