Ubuntu 15.04
Sponsored Link

Install KVM
2015/05/11
 
It's Virtualization with KVM ( Kernel-based Virtual Machine ) + QEMU. This requires that the CPU on your computer has a function Intel VT or AMD-V.
[1] Install required packages.
root@dlp:~#
apt-get -y install qemu-kvm libvirt-bin virtinst bridge-utils
[2] Enable vhost-net.
root@dlp:~#
modprobe vhost_net

root@dlp:~#
lsmod | grep vhost

vhost_net              17307  0
tun                    26385  1 vhost_net
vhost                  22500  1 vhost_net
macvtap                17526  1 vhost_net
root@dlp:~#
echo vhost_net >> /etc/modules

[3] Configure Bridge networking.
root@dlp:~#
vi /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
# change like follows

iface eth0 inet manual

#
iface eth0 inet static
#
address 10.0.0.30
#
network 10.0.0.0
#
netmask 255.255.255.0
#
broadcast 10.0.0.255
#
gateway 10.0.0.1
#
dns-nameservers 10.0.0.30
# add bridge interface

iface br0 inet static
address 10.0.0.30
network 10.0.0.0
netmask 255.255.255.0
broadcast 10.0.0.255
gateway 10.0.0.1
dns-nameservers 10.0.0.30
bridge_ports eth0
bridge_stp off
auto br0
root@dlp:~#
root@dlp:~#
br0       Link encap:Ethernet  HWaddr 00:0c:29:fc:20:16
          inet addr:10.0.0.30  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fefc:2016/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:50 errors:0 dropped:0 overruns:0 frame:0
          TX packets:49 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4914 (4.9 KB)  TX bytes:7265 (7.2 KB)

eth0      Link encap:Ethernet  HWaddr 00:0c:29:fc:20:16
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:331 errors:0 dropped:0 overruns:0 frame:0
          TX packets:49 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:162890 (162.8 KB)  TX bytes:7385 (7.3 KB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:212 errors:0 dropped:0 overruns:0 frame:0
          TX packets:212 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:16836 (16.8 KB)  TX bytes:16836 (16.8 KB)

virbr0    Link encap:Ethernet  HWaddr 52:54:00:f1:ea:7c
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
Matched Content
 
Tweet