[root@localhost
~]# yum groupinstall "Virtualisation Tools"
"Virtualization Platform"
[root@localhost
~]#yum install python-virtinst
[root@localhost
~]#yum install kvm qemu-kvm python-virtinst libvirt
libvirt-python virt-manager libguestfs-tools
This system is receiving updates from RHN Classic or RHN Satellite. 0 packages excluded due to repository protections Setting up Install Process Package libvirt-0.10.2-18.el6_4.15.x86_64 already installed and latest version Resolving Dependencies --> Running transaction check ---> Package libguestfs-tools.x86_64 1:1.16.34-2.el6 will be installed --> Processing Dependency: libguestfs-tools-c = 1:1.16.34-2.el6 for package: 1:libguestfs-tools-1.16.34-2.el6.x86_64 .... .. .. spice-glib.x86_64 0:0.14-7.el6_4.3 spice-gtk.x86_64 0:0.14-7.el6_4.3 spice-gtk-python.x86_64 0:0.14-7.el6_4.3 spice-server.x86_64 0:0.12.0-12.el6_4.5 vgabios.noarch 0:0.6b-3.7.el6 vte.x86_64 0:0.25.1-8.el6_4 Complete!
Turn on libvirtd service
.
The
libvirtd program is the server side daemon component of the libvirt
virtualization management system. Type the following chkconfig
command to turn it on:
[root@localhost
~]#chkconfig libvirtd on
Start the
libvirtd service by typing the following service command:
[root@localhost
~]#service libvirtd start
[root@localhost
~]#service libvirtd restart
Start the
libvirtd service by typing the following service command:
[root@localhost
~]#service libvirtd status
libvirtd.service
- Virtualization daemon
Loaded:
loaded (/usr/lib/systemd/system/libvirtd.service; enabled)
Active:
active (running) since Wed 2015-02-18 11:40:12 IST; 51s ago
Main
PID: 28988 (libvirtd)
CGroup:
/system.slice/libvirtd.service
├─
28985
/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf
└─
28988
/usr/sbin/libvirtd
Feb
18 11:40:12 localhost.localdomain systemd[1]: Starting Virtualization
daemon...
Feb
18 11:40:12 localhost.localdomain systemd[1]: Started Virtualization
daemon.
Feb
18 11:40:12 localhost.localdomain dnsmasq[28985]: read /etc/hosts - 2
addresses
Feb
18 11:40:12 localhost.localdomain dnsmasq[28985]: read
/var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
Feb
18 11:40:12 localhost.localdomain dnsmasq-dhcp[28985]: read
/var/lib/libvirt/dnsmasq/default.hostsfile
[root@localhost
network-scripts]# cd /etc/sysconfig/network-scripts/
[root@localhost
network-scripts]#
vim ifcfg-etho
DEVICE=eth0
TYPE=Ethernet
UUID=df9f8392-e6af-49d7-b28f-77c690457ea1
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
HWADDR=E0:69:95:3C:24:10
IPADDR=192.168.91.11
PREFIX=16
GATEWAY=192.168.1.200
DNS1=192.168.1.1
DNS2=1.186.47.2
DNS3=1.186.47.253
DOMAIN=8.8.8.8
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System
eth0"
Above
file edit like this .
DEVICE=eth0
TYPE=Ethernet
UUID=df9f8392-e6af-49d7-b28f-77c690457ea1
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
HWADDR=E0:69:95:3C:24:10
#IPADDR=192.168.91.11
#PREFIX=16
#GATEWAY=192.168.1.200
#DNS1=192.168.1.1
#DNS2=1.186.47.2
#DNS3=1.186.47.253
#DOMAIN=8.8.8.8
#DEFROUTE=yes
#IPV4_FAILURE_FATAL=yes
#IPV6INIT=no
BRIDGE=br0
and
create bridge file . And configure network in bridge file.
[root@localhost
network-scripts]# cp -R ifcfg-eth0 ifcfg-br0
[root@localhost
network-scripts]# vim ifcfg-br0
DEVICE=br0
TYPE=Bridge
UUID=df9f8392-e6af-49d7-b28f-77c690457ea1
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
HWADDR=E0:69:95:3C:24:10
IPADDR=192.168.91.11
PREFIX=16
GATEWAY=192.168.1.200
DNS1=192.168.1.1
DNS2=1.186.47.2
DNS3=1.186.47.253
DOMAIN=8.8.8.8
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
DELAY=0
[root@localhost
network-scripts]# service network restart
Shutting
down interface br0: [ OK ]
Shutting
down interface eth0: [ OK ]
Shutting
down loopback interface: [ OK ]
Bringing
up loopback interface: [ OK ]
Bringing
up interface eth0: [ OK ]
Bringing
up interface br0: Determining if ip address 192.168.91.11 is already
in use for device br0...
[
OK ]
in
bridge file . Network configuration is successfully done.
No comments:
Post a Comment