BIOS Open VT
Install Ubuntu system
-
Install KVM-related software and set up Bridge adapter
(1) # Apt-get install QEMU-KVM libvirt-bin virtinst bridge-utils cpu-checker
# $ sudo apt-get install virt-manager qemu
(2) # kvm-ok
INFO:/DEV/KVM exists
KVM acceleration can used
(3) # cp/etc/network/interfaces/etc/network/interfaces.bakup
(4) # vi/etc/network/interfaces
auto br0
iface br0 inet static
address 10.18.44.26
netmask 255.255.255.192
broadcast 10.18.44.63
Dns-nameservers 10.0.80.11 10.0.80.1
bridge_ports eth0
&NBS P BRIDGE_STP off
BRIDGE_FD 0
bridge_maxwait 0
&nb Sp auto eth0
iface eth0 inet static
(5) If you have a network card, you can do multiple bridge interfaces
Auto BR1
Iface BR1 inet Static
Address 208.43.222.51
Netmask 255.255.255.248
Broadcast 208.43.222.55
Gateway 208.43.222.49
Bridge_ports eth1
BRIDGE_STP off
BRIDGE_FD 0
Bridge_maxwait 0
Auto Eth1
Iface eth1 inet Static
Configure directly using the BRCTL command
$ sudo brctl addbr br0
$ sudo ip addr Show
$ sudo brctl addif br0 eth0
To create a virtual machine:
$ sudo virt-install \
--VIRT-TYPE=KVM \
--name centos7 \
--ram 2048 \
--vcpus=2 \
--OS-VARIANT=RHEL7 \
--VIRT-TYPE=KVM \
--HVM \
--cdrom=/var/lib/libvirt/boot/centos-7-x86_64-dvd-1511.iso \
--network=bridge=br0,model=virtio \
--network=bridge=br1,model=virtio \
--graphics VNC \
--disk Path=/var/lib/libvirt/images/centos7.qcow2,size=40,bus=virtio,format=qcow2
$ sudo virsh dumpxml centos7 | grep VNC
<graphics type= ' vnc ' port= ' 5901 ' autoport= ' yes ' listen= ' 127.0.0.1 ' >
$ sudo virsh vncdisplay centos7
Reference: the link https://www.cyberciti.biz/faq/installing-kvm-on-ubuntu-16-04-lts-server/
The KVM under Ubuntu