redhat 6.4配置kvm
[1]Installsomepackagesfirst.
[root@dlp~]#yum-yinstallqemu-kvmlibvirtpython-virtinstbridge-utils
[root@dlp~]#lsmod|grepkvm#makesuremodulesareloaded
kvm_intel465890
kvm2928151kvm_intel
[root@dlp~]#/etc/rc.d/init.d/libvirtdstart
Startinglibvirtddaemon:[OK]
[root@dlp~]#/etc/rc.d/init.d/messagebusstart
Startingsystemmessagebus:[OK]
[root@dlp~]#chkconfiglibvirtdon
[root@dlp~]#chkconfigmessagebuson
[2]ConfigureBridgenetworkingforKVMvirtualmachine.
[root@dlp~]#mv/etc/sysconfig/network-scripts/ifcfg-eth0/etc/sysconfig/network-scripts/ifcfg-br0
[root@dlp~]#vi/etc/sysconfig/network-scripts/ifcfg-br0
#change
DEVICE=br0
HWADDR=00:0C:29:5F:03:42
#change
TYPE=Bridge
UUID=c1539085-73d7-4455-ac82-88f26464458a
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=10.0.0.30
NETMASK=255.255.255.0
GATEWAY=10.0.0.1
DNS1=10.0.0.1
IPV6INIT=no
USERCTL=no
[root@dlp~]#vi/etc/sysconfig/network-scripts/ifcfg-eth0
#createnew
DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
BRIDGE=br0
[3]serviceNetworkManagerstop
[root@dlp~]#/etc/rc.d/init.d/networkrestart
Shuttingdowninterfacebr0:[OK]
Shuttingdowninterfaceeth0:[OK]
Shuttingdownloopbackinterface:[OK]
Bringinguploopbackinterface:[OK]
Bringingupinterfaceeth0:[OK]
Bringingupinterfacebr0:Determiningifipaddress10.0.0.30isalreadyinusefordevicebr0...
[OK]
[root@dlp~]#ifconfig
br0Linkencap:EthernetHWaddr00:0C:29:5F:03:38
inetaddr:10.0.0.30Bcast:10.0.0.255Mask:255.255.255.0
inet6addr:fe80::20c:29ff:fe5f:338/64Scope:Link
UPBROADCASTRUNNINGMULTICASTMTU:1500Metric:1
RXpackets:65errors:0dropped:0overruns:0frame:0
TXpackets:71errors:0dropped:0overruns:0carrier:0
collisions:0txqueuelen:0
RXbytes:4370(4.2KiB)TXbytes:13742(13.4KiB)
eth0Linkencap:EthernetHWaddr00:0C:29:5F:03:38
inet6addr:fe80::20c:29ff:fe5f:338/64Scope:Link
UPBROADCASTRUNNINGMULTICASTMTU:1500Metric:1
RXpackets:38727errors:0dropped:0overruns:0frame:0
TXpackets:20836errors:0dropped:0overruns:0carrier:0
collisions:0txqueuelen:1000
RXbytes:52608947(50.1MiB)TXbytes:1867883(1.7MiB)
loLinkencap:LocalLoopback
inetaddr:127.0.0.1Mask:255.0.0.0
inet6addr:::1/128Scope:Host
UPLOOPBACKRUNNINGMTU:16436Metric:1
RXpackets:2errors:0dropped:0overruns:0frame:0
TXpackets:2errors:0dropped:0overruns:0carrier:0
collisions:0txqueuelen:0
RXbytes:1152(1.1KiB)TXbytes:1152(1.1KiB)
virbr0Linkencap:EthernetHWaddr52:54:00:73:7E:F3
inetaddr:192.168.122.1Bcast:192.168.122.255Mask:255.255.255.0
UPBROADCASTRUNNINGMULTICASTMTU:1500Metric:1
RXpackets:0errors:0dropped:0overruns:0frame:0
TXpackets:0errors:0dropped:0overruns:0carrier:0
collisions:0txqueuelen:0
RXbytes:0(0.0b)TXbytes:0(0.0b)