kvm, xen, virtualbox and vmware virtual machines for centos7

A website that introduces the establishment of centos7 server
http://www.server-world.info/en/note?os=CentOS_7&p=kvm

First, kvm virtual machine
    kvm is the trend of future virtualization, because it has been integrated since kernel 2.6.20 into the kernel, also known as a kernel-based virtual machine.
It and xen are both virtualization solutions, but at present China is still using the xen solution more, and there are more experts in xen.
    1. Installation
Check the virtualization support: grep -E 'svm|vmx' /proc/cpuinfo
It should be noted that the virtualization support of AMD or INTEL CPU in the motherboard BIOS is enabled.
If it is installed on the server, the GUI is generally not installed, and the minimal installation is used, then execute the following command:
yum -y install qemu-kvm libvirt virt-install bridge-utils
and the bridge network card must be set. It is no longer introduced here.
If there is a GUI interface, such as my own laptop, then it is much simpler.
yum install qemu-kvm qemu-imgyum install virt-manager libvirt libvirt-python python-virtinst libvirt-client

These packages are already installed by default qemu-kvm libvirt libvirt-python libvirt-client
only needs to install the virt-manager package

and restart Get off the computer.
lsmod | grep kvm

to confirm that the module has been installed, if the following two lines appear, it means that the module has been installed
kvm_intel 138567 0
kvm 441119 1 kvm_intel

open libvirtd service
systemctl start libvirtd
systemctl enable libvirtd

    2. Configure bridge network interface
to be installed kvm The virtual machine configures a bridged network interface
vi /etc/sysconfig/network-scripts/ifcfg-br0
My configuration is a bit like this
    DEVICE=br0
    TYPE=Bridge BOOTPROTO
    =dhcp
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=yes
    IPV6INIT=no
    NAME=br0
    ONBOOT=yes
    PEERDNS=yes
    PEERROUTES=yes
Edit the configuration of the actual network card
vi /etc/sysconfig/network-scripts/ifcfg-enp8s0
My config is a bit like this
    DEVICE=enp8s0
    TYPE=Ethernet
    BOOTPROTO=dhcp
    BRIDGE=br0
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=yes
    IPV6INIT=no
    NAME=enp8s0
    UUID=bd4e4309-1113-4223-b94a-509fe0d15c8b
    ONBOOT=yes
    PEERDNS=yes
    PEERROUTES
Then restart the computer and
reboot

    3. Install the kvm virtual machine
Open the virtual system manager (virt-manager), the installation system is quite foolish, the only thing you need to pay attention to is that the network card selects the br0 bridge network card configured above.
After the installation is complete, you can use the local The ip address assigned by the router is connected to the Internet, and the ip address can also be used for remote login management to form a vpn (virtual private network).
It is worth mentioning that when installing a kvm virtual machine, there are three ways to allow the virtual machine to access the external network, namely bridging, NAT and Host-only (using the host network),
but only the bridging method used above can allow the external network to access the installed kvm virtual

machine 2.xen virtual machine
    //TODO Let’s talk about it
   
3. The VirtualBox virtual
    machine is also open source, it is not easy to use without vmware, just installed a winxp
    //TODO has not been used to test the bridged network interface, let’s talk about it

4. VMware virtual machine
    VMware should be considered the best at present I used virtual machine software, but why put it at the end, because the above three are free, it is closed-source fee,
easy to use and easy to use, but generally when you can't use vmware, you have to use the above three
    Install Vmware 10.0.3 on CentOS 7. Usually, this version does not work on CentOS 7, as it only runs on the lower kernel version 3.10.

First, download and install in the normal way (no problem). The only problem is when running the vmware program later.

    How to fix?
    1 - Go to /usr/lib/vmware/modules/source.

    cd /usr/lib/vmware/modules/source
    2 - Extract vmnet.tar.

    tar -xvf vmnet.tar
    3 - Go to the vmnet-only directory.

    cd vmnet-only
    4 - Edit the filter.c file.

    vi filter.c
    on lines 206 and 259, replace the following strings:

    #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
    is:

    #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0)
    Save and exit.

    5 - Go back to the previous folder.

    cd ../
    6 - zip the folder again.

    tar -uvf vmnet.tar vmnet-only
    7 - remove the old directory.

    rm -fr vmnet-only
    8 - Start vmware and experience.

    9 Uninstall Vmware
vmware-uninstall
vmware-installer -l
vmware-installer -u vmware-workstation
These three commands are enough to uninstall
   
    10 vmware is powerful, easy to use, cross-platform and has a lot of information, there is nothing to say

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326804054&siteId=291194637