|
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@dlp ~]# yum -y install kvm kmod-kvm kvm-qemu-img libvirt python-virtinst bridge-utils [root@dlp ~]# modprobe kvm [root@dlp ~]# modprobe kvm_intel # if AMD, "kvm_amd" [root@dlp ~]# kvm_intel 41272 0 kvm 114752 1 kvm_intel [root@dlp ~]# /etc/rc.d/init.d/libvirtd start [root@dlp ~]# chkconfig libvirtd on
|
| [2] | Create Bridge networking. |
|
[root@dlp ~]# cd /etc/sysconfig/network-scripts [root@dlp network-scripts]# cp ifcfg-eth0 ifcfg-br0 [root@dlp network-scripts]# vi ifcfg-br0 DEVICE= br0 # change BOOTPROTO=static BROADCAST=192.168.0.255 HWADDR=xx:xx:xx:xx:xx:xx IPADDR=192.168.0.17 NETMASK=255.255.255.0 NETWORK=192.168.0.0 ONBOOT=yes TYPE=Bridge # add [root@dlp network-scripts]# vi ifcfg-eth0 DEVICE=eth0 BOOTPROTO=static BROADCAST=192.168.0.255 HWADDR=xx:xx:xx:xx:xx:xx IPADDR=192.168.0.17 NETMASK=255.255.255.0 NETWORK=192.168.0.0 ONBOOT=yes BRIDGE=br0 # add [root@dlp network-scripts]# [root@dlp ~]# /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@dlp ~]# br0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx inet addr:192.168.0.17 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::250:43ff:fe00:3bae/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2217 errors:0 dropped:0 overruns:0 frame:0 TX packets:2242 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:270242 (263.9 KiB) TX bytes:378561 (369.6 KiB) eth0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx inet6 addr: fe80::21a:4dff:fe45:9f57/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:202238 errors:0 dropped:0 overruns:0 frame:0 TX packets:101540 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:283089551 (269.9 MiB) TX bytes:5809514 (5.5 MiB) Interrupt:30 Base address:0x8000 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:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1035 (1.0 KiB) TX bytes:1035 (1.0 KiB) |