User Tools

Site Tools


Site Tools

VM Core setup

Tools

Check host capabilities for Qemu-KVM :

virt-host-validate

And for details about what host can handle :

virsh capabilities

Using VirtualBox

Now, we will create a bridge on our primary hypervisor batman, so that all our VM can be reached easily from the network. Install needed packages:

yum install bridge-utils tunctl

cd to network configuration files directory /etc/sysconfig/network-scripts, and create the bridge file ifcfg-br0 :

DEVICE=br0
TYPE=Bridge
BOOTPROTO=static
IPADDR=10.0.0.1
ONBOOT=yes
STP=on
NETMASK=255.255.0.0

And configure local enp0s3 interface to use the bridge, edit ifcfg-enp0s3 :

TYPE=Ethernet
BOOTPROTO=static
NAME=enp0s3
DEVICE=enp0s3
ONBOOT=yes
IPV6INIT=no
BRIDGE=br0
NETMASK=255.255.0.0

Reboot the hypervisor to apply changes. At next login, install the following packages, we will need them to install VirtualBox :

yum install gcc g++ make bitmap-fangsongti-fonts kernel-devel xauth

Then do a manual rpm installation for virtualbox (using the manually downloaded package), using yum to keep dependencies :

yum localinstall VirtualBox-5.0-5.0.6_103037_el7-1.x86_64.rpm

Now, ssh using -X -C, and launch VirtualBox (virtualbox). You can here create your VM and manage them. When configuring a VM, choose bridged mode, and choose our bridge br0.

Now, install your first VM. Add a network interface on bridge br0. Call it base1, use the centos minimal cd, and boot. Choose minimal install (it will become our base vm that we will clone). When the OS is installed you can clone it, this will become our base for other VM (instead of reinstalling centos each time). First clone will be the dhcp server: dhcp1.