Overview of Linux Virtualization

Source: Internet
Author: User
Tags oracle vm virtualbox vm virtualbox

Virtualization of
Hardware virtualization:
One physical machine virtual out of multiple logical computers
CPU, memory can be allocated to multiple virtual machines
Software Virtualization:
A lamp platform supports multiple websites
Desktop Virtualization
......

Virtual machine: A computer simulated by a software platform
No difference to the physical computer for the end user
Depending on the degree of virtualization, the required modifications are different

Degree of virtualization implementation:
Fully virtualized, full virtualization
Implemented by the platform software, the client's operating system code is hardly modified
Version of virtualization, Para virtualization
The Platform software only provides the most core virtual machine function, needs to modify the client's system kernel, the compatibility is poor
KVM, fully virtualized------support various OS
XEN, Partial virtualization------does not support windows

Hardware-assisted virtualization:
Some of the functions of virtualization technology will be implemented hardware, mainly refers to CPU support such as INTEL/AMD

Common virtualization Software
Major Manufacturers and products
—————————————————————————————
Series pc/Service Representative |
VMware vsphere Platform VMware workstartion |
Microsoft VIRTUALPC Hyper-V |
Redhat KVM, Rhev platform |
Citrix Xen |
Oracle Oracle VM VirtualBox |
—————————————————————————————

KVM Virtualization
Fully virtualized core-based solution
Red Hat version 5.4 has been launched to replace previous Xen products
Requires Intel VT or AMD V Processor technical support
Support for Linux/unix/windows clients

Host OS and guest OS
Host OS ——— physical Machine/Host
The operating system of the physical machine running the KVM virtualization platform
Guest os--"virtual machine. Client
Operating system running on the virtual machine

Virtual network type
Bridging mode: Virtual machines can communicate with real machines (same network segment)
Isolation mode: Virtual machines are not able to communicate with real machines (different network segments)

Network access mode (isolated virtual machine communicates with real network)
Nat mode: The KVM server acts as a gateway, and the connected virtual machines form an intranet,
These VMS share the network address of the KVM server to access the external real machine
Routing mode: The KVM server acts as a router and manually sets routing records

————————————————————————————————————————-
Build the KVM platform
Install virtualization-related package group
Virtualization,virtualization Client,
Virtualization Tools,virtualization Platform
Start the LIBVIRTD service and set it to boot
[[email protected] ~]# yum-y Groupinstall virtualization,virtualization client,virtualization tools,virtualization Platform
(supports Chinese installation [email  protected] ~]# yum-y groupinstall Virtualization Virtualization Tools Virtualization Platform)
[[email protected] ~]# service LIBVIRTD restart[[email protected] ~]# chkconfig libvirtd on
[[email protected] ~]# ifconfig virbr0 (one more network card)
( Common error: The LIBVIRTD service failed to start. Cause: You need to invoke the DNSMASQ service may conflict with Dhcp,dbs, deactivate the conflicting service dhcpd,named)

Virtual networks provided by the KVM server
Isolation +nat:virbr0
Bridging: Br0
(Note deactivate NetworkManager)
Establishing the configuration of the virtual interface br0
Add the real interface eth0 to the bridge
[Email protected] ~]# cd/etc/sysconfig/network-scripts
[[email protected] network-scripts]# CP ifcfg-eth0 IFCFG-BR0 (replication NIC configuration to Virtual interface)
[Email protected] network-scripts]# vim ifcfg-br0
Device=br0 (NIC name)
Type=bridge (bridge Connection)
[[email protected] network-scripts]# vim Ifcfg-eth0 (add the real interface eth0 to the bridge)
Bridge=br0 (ADD)
[[Email protected] network-scripts]# Service network Restart (restart service, test bridging results)
Shutting down interface Eth0:bridge BR0 does not exist!
Determine
Shutting down interface eth1: [OK]
Shutting down interface eth2: [OK]
Shutting down interface eth3: [OK]
Close Loopback interface: [OK]
Eject loopback interface: [OK]
Popup interface eth0: [OK]
Popup interface eth1: [OK]
Popup interface eth2: [OK]
Popup interface eth3: [OK]
Pop-up interface br0:determining if IP address 192.168.4.205 is already on use for device br0 ...

——————————————————————————————————————————————————————

Hardware devices for KVM virtual machines
Configuration file (CPU, memory, video card ...) )
Virtual Disk files
[[email protected]/]# mkdir/opt/images (Create virtual machine disk)
[[email protected] ~]# dd If=/dev/zero of=/opt/images/hydra1.img bs=10m count=1000 (Create a disk for 10G virtual machines)
Recorded 1000+0 read-in
Recorded the writing of 1000+0.
10485760000 gigabytes (GB) replicated, 303.181 sec, 34.6 MB/s

Implementation of SSH password-free authentication
[[Email protected] Desktop]# Ssh-keygen (create a pair of keys)
[email protected]. ssh]# ls
Authorized_keys Id_rsa id_rsa.pub known_hosts
[email protected]. ssh]# Ssh-copy-id [email protected] (deploy the public key to the remote user's home directory)

A private key-"Multiple public keys" (The public key is sent to different hosts separately)
Multi-split private key--"a public key (uncommon)

————————————————————————————————————————————————

Overview of Linux Virtualization

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.