Skip to content

Instantly share code, notes, and snippets.

@jistr
Last active December 26, 2015 20:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jistr/7211251 to your computer and use it in GitHub Desktop.
Save jistr/7211251 to your computer and use it in GitHub Desktop.
Prepare a Beaker machine for Undercloud Live 2 node installation.
#!/bin/bash
set -x
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
# install dependencies and wget
yum -y install git libvirt libvirt-python openvswitch qemu-kvm wget
# load kernel module for virtualization
modprobe kvm-intel
# modprobe kvm-amd
# start libvirtd and wait a while before using it
systemctl start libvirtd.service
sleep 5
# move default storage pool from /var/lib/libvirt/images
# to /home/vm_storage_pool
mkdir /home/vm_storage_pool
virsh pool-destroy default
virsh pool-define-as default dir --target /home/vm_storage_pool
virsh pool-start default
virsh pool-autostart default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment