$ sudo egrep -c '(vmx|svm)' /proc/cpuinfo
note:output should be “1” or greater.
$ sudo yum install -y qemu-kvm libvirt libvirt-python libguestfs-tools virt-install
$ sudo systemctl enable libvirtd && systemctl start libvirtd
$ sudo lsmod | grep kvm
note: should see results for kvm
and kvm_intel
(on intel hardware).
todo
note: assumes wired interface's identifier is em1
. verify the identifier for the interface being bridged via ip addr show
.
add bridge=br0
to the end of /etc/sysconfig/network-scripts/ifcfg-em1
.
add the following to /etc/sysconfig/network-scripts/ifcfg-br0
:
device="br0"
bootproto="dhcp"
ipv6init="yes"
ipv6_autoconf="yes"
onboot="yes"
type="bridge"
delay="0"
add net.ipv4.ip_forward = 1
to /etc/sysctl.conf
, then read the configuration:
$ sudo sysctl -p /etc/sysctl.conf
$ sudo systemctl restart networkmanager
note: for the bridge to be usable by guests, a reboot may be required.
$ mkdir /home/deployment-user/kvm_storage
$ sudo virsh pool-build isos # bootable os iso images go here.
$ sudo virsh pool-build images # guest disk images, including "golden" images go here.
note: any files moved into the kvm_storage/images
or kvm_storage/isos
directories will be automagically chwon'd by root.
$ sudo virsh pool-define-as isos dir - - - - "/home/deployment-user/kvm_storage/isos"
$ sudo virsh pool-define-as images dir - - - - "/home/deployment-user/kvm_storage/images"
$ sudo virsh pool-autostart isos
$ sudo virsh pool-autostart images
$ sudo virsh pool-start isos
$ sudo virsh pool-start images