Install KVM2016/05/15 |
It's Virtualization with KVM ( Kernel-based Virtual Machine ) + QEMU.
This requires that the CPU on your computer which 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 20480 0 vhost 32768 1 vhost_net macvtap 20480 1 vhost_netroot@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 ens33 # change like follows iface ens33 inet manual # iface ens33 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 ens33 bridge_stp off auto br0
root@dlp:~#
root@dlp:~# ip addr 1: lo: >LOOPBACK,UP,LOWER_UP< mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens33: >BROADCAST,MULTICAST,UP,LOWER_UP< mtu 1500 qdisc pfifo_fast master br0 state UP group default qlen 1000 link/ether 00:0c:29:da:3a:55 brd ff:ff:ff:ff:ff:ff inet6 fe80::20c:29ff:feda:3a55/64 scope link valid_lft forever preferred_lft forever 3: br0: >BROADCAST,MULTICAST,UP,LOWER_UP< mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 00:0c:29:da:3a:55 brd ff:ff:ff:ff:ff:ff inet 10.0.0.30/24 brd 10.0.0.255 scope global br0 valid_lft forever preferred_lft forever inet6 fe80::20c:29ff:feda:3a55/64 scope link valid_lft forever preferred_lft forever 4: virbr0: >NO-CARRIER,BROADCAST,MULTICAST,UP< mtu 1500 qdisc noqueue state DOWN group default qlen 1000 link/ether 52:54:00:82:4b:a7 brd ff:ff:ff:ff:ff:ff inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0 valid_lft forever preferred_lft forever 5: virbr0-nic: >BROADCAST,MULTICAST< mtu 1500 qdisc pfifo_fast master virbr0 state DOWN group default qlen 1000 link/ether 52:54:00:82:4b:a7 brd ff:ff:ff:ff:ff:ff |
Sponsored Link |
|