티스토리 뷰

EN/CentOS 5

CentOS 5 KVM Install KVM

식빵TV 2016.05.28 18:51

CentOS 5 KVM Install KVM


Install KVM

 

It's Virtualization with KVM ( Kernel-based Virtual Machine ) + QEMU. This requires that the CPU on your computer has a function Intel VT or AMD-V.



1. Install KVM.


[root@centos5 ~]# yum -y install kvm kmod-kvm kvm-qemu-img libvirt python-virtinst bridge-utils


[root@centos5 ~]# modprobe kvm 

[root@centos5 ~]# modprobe kvm_intel   # if AMD, "kvm_amd"

[root@centos5 ~]# lsmod | grep kvm 

kvm_intel46589 0

kvm 292815 1 kvm_intel


[root@centos5 ~]# /etc/rc.d/init.d/libvirtd start 

Starting libvirtd daemon: [ OK ]


[root@centos5 ~]# chkconfig libvirtd on




2. Configure Bridge networking.


[root@centos5 ~]# cd /etc/sysconfig/network-scripts 


[root@centos5 network-scripts]# cp ifcfg-eth0 ifcfg-br0 


[root@centos5 network-scripts]# vi ifcfg-br0


DEVICE=br0# change

BOOTPROTO=none

HWADDR=00:22:68:5e:34:06

ONBOOT=yes

DHCP_HOSTNAME=centos5.srv.world

IPADDR=10.0.0.30

NETMASK=255.255.255.0

GATEWAY=10.0.0.1

TYPE=Bridge# change


[root@centos5 network-scripts]# vi ifcfg-eth0


DEVICE=eth0

BOOTPROTO=none

HWADDR=00:22:68:5e:34:06

ONBOOT=yes

DHCP_HOSTNAME=centos5.srv.world

IPADDR=10.0.0.30

NETMASK=255.255.255.0

GATEWAY=10.0.0.1

TYPE=Ethernet

BRIDGE=br0# add


[root@centos5 network-scripts]# cd 


[root@centos5 ~]# /etc/rc.d/init.d/network restart 

Shutting down interface eth0:[  OK  ]

Shutting down loopback interface:[  OK  ]

Bringing up loopback interface:[  OK  ]

Bringing up interface eth0:[  OK  ]

Bringing up interface br0:[  OK  ]



[root@centos5 ~]# ifconfig 

br0       Link encap:Ethernet  HWaddr 00:0C:29:B3:4F:24

          inet addr:10.0.0.30  Bcast:10.0.0.255  Mask:255.255.255.0

          inet6 addr: fe80::20c:29ff:feb3:4f24/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:44 errors:0 dropped:0 overruns:0 frame:0

          TX packets:55 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:3060 (2.9 KiB)  TX bytes:6950 (6.7 KiB)


eth0      Link encap:Ethernet  HWaddr 00:0C:29:B3:4F:24

          inet6 addr: fe80::20c:29ff:feb3:4f24/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:23278 errors:0 dropped:0 overruns:0 frame:0

          TX packets:15886 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:28955503 (27.6 MiB)  TX bytes:1971919 (1.8 MiB)


lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:5 errors:0 dropped:0 overruns:0 frame:0

          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:2880 (2.8 KiB)  TX bytes:2880 (2.8 KiB)


virbr0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00

          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)


※ Next manual


저작자 표시 비영리 변경 금지
신고

'EN > CentOS 5' 카테고리의 다른 글

CentOS 5 KVM Create a Virtual Machine#2  (0) 2016.05.28
CentOS 5 KVM Create a Virtual Machine#1  (0) 2016.05.28
CentOS 5 KVM Install KVM  (0) 2016.05.28
CentOS 5 Configure iSCSI Initiator  (0) 2016.05.28
CentOS 5 iSCSI Configure iSCSI Target  (0) 2016.05.28
CentOS 5 DHCP Server  (0) 2016.05.28
댓글