1. Installing the KVM kernel and LIBVIRTD related components
Yum-y Install KVM python-virtinst libvirt tunctl bridge-utils virt-manager qemu-kvm-tools virt-viewer
2. Load the KVM Runtime module
[Email protected] ~]# modprobe kvm[[email protected] ~]# modprobe-ls |grep kvmkernel/arch/x86/kvm/kvm.kokernel/arch/ X86/kvm/kvm-intel.kokernel/arch/x86/kvm/kvm-amd.ko
3. Create a physical bridge
VIRSH IFACE-BRIDGE ETH0 BR0 View Network [[email protected] ~]# ifconfigbr0 Link encap:Ethernet HWaddr 00:0C:29:C1:62:56 inet addr:192.168.150.136 bcast :192.168.150.255 mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fec1:6256/64 scope:link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:4925 errors:0 dropped:0 overruns:0 frame:0 tx packets:3937 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 rx bytes:532933 (520.4 KiB) TX bytes:13484199 (12.8 MIB) eth0 link encap:ethernet hwaddr 00:0c:29:c1:62:56 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 rx packets:377686 errors:0 dropped:0 overruns:0 frame:0 tx packets :110643 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:507725096 (484.2 MIB) TX bytes:66233641 (63.1 MiB)
4. Create a Virtual disk:
Qemu-img create-f qcow2/kvm/test003.img 5G
5. Create a virtual machine:
QCOW2 format [[email protected] ~]# virt-install--name test003--ram--vcpus=1--disk Path=/kvm/test003.img,size=5,format =qcow2,bus=virtio--accelerate--cdrom/tmp/centos-6.6-x86_64-minimal.iso--vnc--vncport=5910--vnclisten=0.0.0.0-- Network Bridge=br0,model=virtio--noautoconsole RAW format: [[email protected] ~]# virt-install--name test003--ram S=1--disk path=/kvm/test003.img,size=5,bus=virtio--accelerate--cdrom/tmp/centos-6.6-x86_64-minimal.iso--vnc-- vncport=5910--vnclisten=0.0.0.0--network bridge=br0,model=virtio--noautoconsole
6.VNC Connection
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5B/3D/wKioL1UDM9bjgRf1AAGocYo8c5Y161.jpg "style=" float: none; "title=" Vnc-0.png "alt=" Wkiol1udm9bjgrf1aagocyo8c5y161.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5B/43/wKiom1UDMrTRPdg-AAMSEmE5OLI623.jpg "style=" float: none; "title=" Vnc-1.png "alt=" Wkiom1udmrtrpdg-aamseme5oli623.jpg "/>
Reference article: (http://koumm.blog.51cto.com/703525/1289627)
This article is from the "Long Binxiong" blog, make sure to keep this source http://dragon123.blog.51cto.com/9152073/1620263
Quickly build KVM and install Linux systems