see interfaces(5).# The loopback network interfaceauto loiface lo inet loopback# The primary network interface#auto eth1iface eth1 inet manual#allow-hotplug eth1auto br0iface br0 inet static #tap0: Zabbix #tap1: Yocto #tap2: Batman #tap3: Zabbix-TI #tap4: Disponivel pre-up ip tuntap add dev tap0 mode tap user ravel pre-up ip tuntap add dev tap1 mode tap user yocto pre-up ip tuntap add dev tap2 mode tap user batman pre-up ip tuntap add dev tap3 mode tap user ti pre-up ip tuntap add dev tap4 mode tap user ravel pre-up ip link set tap0 up pre-up ip link set tap1 up pre-up ip link set tap2 up pre-up ip link set tap3 up pre-up ip link set tap4 up bridge_ports all tap0 bridge_ports all tap1 bridge_ports all tap2 bridge_ports all tap3 bridge_ports all tap4 post-down ip link set tap0 down post-down ip link set tap1 down post-down ip link set tap2 down post-down ip link set tap3 down post-down ip link set tap4 down post-down ip tuntap del dev tap0 mode tap post-down ip tuntap del dev tap1 mode tap post-down ip tuntap del dev tap2 mode tap post-down ip tuntap del dev tap3 mode tap post-down ip tuntap del dev tap4 mode tap address 10.0.0.26 netmask 255.255.0.0 gateway 10.0.0.9 bridge_ports eth1 bridge_fd 0 bridge_hello 2 bridge_maxage 12 bridge_stp offReinicie a rede:/etc/init.d/networking restartMais informacoes:http://www.hardware.com.br/guias/debian-desktops/kvm-qemu.htmlhttp://www.linux-kvm.com/content/tip-how-run-headless-guest-machine-using-vnc-kvmhttp://blog.bigsmoke.us/2009/12/09/debian-network-bridge-setup-for-kvmqemuhttp://wiki.debian.org/QEMU#NetworkingMaquinas virtuaisAs maquinas virtuais sao inicializadas automaticamente atraves de "/etc/rc.local":#Inicializar VMs/home/ravel/vm/zabbix-vm.sh &/home/yocto/vm/yocto-vm.sh &/home/batman/vm/batman-vm.sh &/home/ti/vm/zabbix-vm.sh &a. Zabbix-PDUtilizacao: monitoramento de servidores de redes Usuario: ravel Diretorio: /home/ravel/vmDisco virtual: /home/ravel/vm/hd/zabbix_pd-hda.imgRede: tap0Script de inicializacao: /home/ravel/vm/zabbix-vm.sh:#!/bin/bashcdrom="/home/ravel/vm/isos/debian-7.0.0-amd64-DVD-1.iso"hda="file=/home/ravel/vm/hd/zabbix_pd-hda.img,if=virtio,cache=writethrough"mem="1G -mem-path /hugepages"#Videovideo="-display none" #desativar saida de video VNC#video="-vnc :2" #habilitar saida de video VNCkvm -cdrom $cdrom -drive $hda -m $mem $video -smp cores=2,threads=2,sockets=1 -enable-kvm -cpu host -net nic,macaddr=52:54:00:12:01:01 -net tap,ifname=tap0,script=no,downscript=nob. Zabbix-TIUtilizacao: monitoramento de servidores de redes, utilizado pela TI Usuario: ti Diretorio: /home/ti/vmDisco virtual: /home/ti/vm/hd/zabbix_ti-hda.imgRede: tap4Script de inicializacao: /home/ti/vm/zabbix-vm.sh:#!/bin/bashcdrom="/home/ti/vm/isos/debian-7.0.0-amd64-DVD-1.iso"hda="/home/ti/vm/hd/zabbix_ti-hda.img"mem="1G -mem-path /hugepages"#Video#video="-display none" #desativar saida de video VNCvideo="-vnc :1" #habilitar saida de video VNCkvm -cdrom $cdrom -hda $hda -m $mem $video -smp cores=2,threads=2,sockets=1 -enable-kvm -cpu host -net nic,macaddr=52:54:00:12:01:03 -net tap,ifname=tap4,script=no,downscript=no#-display nonec. YoctoUtilizacao: servidor de compilacao Usuario: yocto Diretorio: /home/yocto/vmDisco virtual: /home/yocto/vm/hd/yocto-hda.imgRede: tap1Script de inicializacao: /home/yocto/vm/yocto-vm.sh:#!/bin/bashcdrom="/home/yocto/vm/isos/kubuntu-13.04-desktop-amd64.iso"hda="/home/yocto/vm/hd/yocto-hda.img"mem="4G -mem-path /hugepages"#Videovideo="-display none" #desativar saida de video VNC#video="-vnc :4" #habilitar saida de video VNCkvm -cdrom $cdrom -hda $hda -m $mem $video -smp cores=2,threads=2,sockets=1 -enable-kvm -cpu host -net nic,macaddr=52:54:00:12:01:00 -net tap,ifname=tap1,script=no,downscript=nod. BatmanUtilizacao: servidor de compilacao Usuario: batman Diretorio: /home/batman/vmDisco virtual: /home/batman/vm/hd/batman.imgRede: tap2Script de inicializacao: /home/batman/vm/batman-vm.sh:#!/bin/bashcdrom="/home/batman/vm/isos/gentoo-install-amd64-minimal-20130516.iso"hda="/home/batman/vm/hd/batman.img"mem="2G -mem-path /hugepages"#Video#video="-display none" #desativar saida de video VNCvideo="-vnc :3" #habilitar saida de video VNCkvm -cdrom $cdrom -hda $hda -m $mem -boot d -smp cores=2,threads=2,sockets=1 -enable-kvm -cpu host $video -net nic,macaddr=52:54:00:12:01:02 -net tap,ifname=tap2,script=no,downscript=no** Cada VM deve utilizar um endereco MAC distinto. OtimizacaoParametros:"-smp cores=2,threads=2,sockets=1 -cpu host -enable-kvm":Acelerador KVM ("-enable-kvm") e configuracao do processador virtual ("-smp cores=2,threads=2,sockets=1 -cpu host") - inserido no script de inicializacao da VM."-cpu host": disponibiliza todas as instrucoes do processador fisico a VM;Mais informacoes:https://wiki.archlinux.org/index.php/QEMU#Virtual_machine_runs_too_slowly"KSM (Kernel Samepage Merging)":Permite que paginas identicas de memoria sejam empacotadas pelo kernel numa unica pagina compartilhada por um ou mais processos. Esta funcionalidade e potenciada pelo KVM para permitir que multiplas, similares, maquinas virtuais tenham uma utilizacao de memoria reduzida. Como a memoria e compartilhada, a utilizacao combinada desta pelas maquinas