Last active
December 26, 2015 20:49
-
-
Save jistr/7211251 to your computer and use it in GitHub Desktop.
Prepare a Beaker machine for Undercloud Live 2 node installation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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