Set up a kvm vm in CentOS 6.3

Source: Internet
Author: User
Tags dell r710

Set up a kvm vm in CentOS 6.3

Suddenly receiving requirements from the boss, we need to deploy KVM on the servers of the existing data center so that the internal network testing machine can reach the Internet for testing. To be honest, it is a headache because our hardware resources are too short (small companies ...), there is only GB of space left, so I have to run two virtual machines on top, and I have to deal with the increasing data at the moment. This makes me speechless... hadoop is on this server... so, what do you know? The amount of data is dropping every day... start to build ~

I. server hardware environment

Server Model

DELL R710

CPU Model

Intel (R) Xeon (R) CPU X5650@2.67GHz * 2

Number of physical CPU threads

24

Memory size

64 GB

Disk Model

WDC WD10EZEX-00ZF5A0

System

CentOS release 6.3 _ x64

Remaining disk space 100 GB

Ii. Requirement Description


Build KVM and deploy CentOS 6. x on existing resources without affecting other services. Here I chose Centos 6.2, As for why. Because it is lower than the host version, it has better compatibility.

Note that the documents of other online students are in the bridge mode and communicate with each other like a vswitch. Due to limited requirements, my kvm vm accesses the Internet through nat. Therefore, you do not need to configure the bridges in a complex way. You can use the random virbr0.

Iii. installation and deployment
1.
Check whether the CPU supports Virtualization

[Root @ localhost ~] # Egrep-o 'vmx | svm '/proc/cpuinfo

Vmx

Vmx

......

Vmx


2. Install kvm

[Root @ localhost ~] # Yum-y install qemu-kvm libvirt python-vritinst bridge-utils avahi dmidecode

3. View Bridges

[Root @ localhost ~] # Brctl show

Bridge name bridge id STP enabled interfaces

Virbr0 8000.5254004272bb yes virbr0-nic


4. Create a VM storage and image directory

[Root @ localhost ~] # Mkdir/data/kvm/{iso, vm}-p

5. Create a virtual machine

[Root @ jxq-st-ms-02 ~] # Virt-install-v-n hd-nn \

> -- Ram 1024 \

> ## Memory

-- Vcpus = 1 \

# Number of cpu Cores

-- Disk path =/data/kvm-img/hd-nn.img, size = 10, bus = virtio \

# Specify the storage location and capacity of a Virtual Disk

-- Accelerate \

-- Cdrom/data/iso/CentOS-6.2-x86_64-minimal.iso \

# Boot Image

-- Vnc -- vncport = 5901 \

# Vnc remote connection port. The default port is 5900.

-- Vnclisten = 0.0.0.0 \

# Specify the listening address

-- Network bridge = virbr0 \

# Specify the network connection mode

-- Force


6. Use vnc for remote control installation. After that, you will be familiar with it !~

So far, kvm has been built so happily.

RHEL6 KVM virtualization creates a bridge NIC-Bridge

RedHat Linux KVM Virtual Machine bridging

Installation/bridging settings of KVM in CentOS 5.6/virtual machine creation and operation

The/bin/qemu-KVM problem cannot be found when the kvm virtual machine is installed with libvirt In Ubuntu.

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.