La virtualizacion con KVM (Maquina Virtual basado-Kernel) + QEMU. Esto requiere que el CPU en tu computadora tenga la función INTEL VT o AMD-V
1.- Instalar KVM
root@maquina ~# yum -y install qemu-kvm libvirt python-virtinst bridge-utils root@maquina ~# modprobe kvm root@maquina ~# modprobe kvm_intel # if AMD, "kvm_amd" root@maquina ~# lsmod | grep kvm kvm_intel 46589 0 kvm 292815 1 kvm_intel root@maquina ~# /etc/rc.d/init.d/libvirtd start Starting libvirtd daemon: [ OK ] root@maquina ~# chkconfig libvirtd on
2.- Configurar red en modo Bridge para la maquina virtual de KVM
root@maquina ~# cd /etc/sysconfig/network-scripts root@maquina network-scripts# cp ifcfg-eth0 ifcfg-br0 root@maquina network-scripts# vi ifcfg-br0 DEVICE=br0 # change HWADDR=00:11:22:33:44:55 ONBOOT=yes BOOTPROTO=none IPADDR=10.0.0.30 NETMASK=255.255.255.0 TYPE=Bridge # change GATEWAY=10.0.0.1 DNS1=10.0.0.30 IPV6INIT=no USERCTL=no root@maquina network-scripts# vi ifcfg-eth0 DEVICE=eth0 HWADDR=00:11:22:33:44:55 ONBOOT=yes BOOTPROTO=none IPADDR=10.0.0.30 NETMASK=255.255.255.0 TYPE=Ethernet GATEWAY=10.0.0.1 DNS1=10.0.0.30 IPV6INIT=no USERCTL=no BRIDGE=br0 # add root@maquina network-scripts# cd root@maquina ~# /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@maquina ~# ifconfig
esito seria a groso modo
ahh y una herramienta muy buena también es virt-top
Virt-top que sirve para ver el estado de las maquinas virtuales en la consola
root@maquina ~# yum -y install virt-top root@maquina ~# virt-top --help virt-top: unknown option `--help]'. virt-top : a 'top'-like utility for virtualization SUMMARY virt-top [-options] OPTIONS -1 Start by displaying pCPUs (default: tasks) -2 Start by displaying network interfaces -3 Start by displaying block devices -b Batch mode -c uri Connect to URI (default: Xen) --connect uri Connect to URI (default: Xen) --csv file Log statistics to CSV file --no-csv-cpu Disable CPU stats in CSV --no-csv-block Disable block device stats in CSV --no-csv-net Disable net stats in CSV -d delay Delay time interval (seconds) --debug file Send debug messages to file --end-time time Exit at given time --hist-cpu secs Historical CPU delay --init-file file Set name of init file --no-init-file Do not read init file -n iterations Number of iterations to run -o sort Set sort order (cpu|mem|time|id|name) -s Secure ("kiosk") mode --script Run from a script (no user interface) -help Display this list of options --help Display this list of options