beautypg.com

Dell PowerEdge C1100 User Manual

Page 11

background image

Cloud Training in a Box: Inexpensive and Reproducible Training Environments for Cloud Solutions

11

virsh net-start private
virsh net-autostart private

# Optional – Convert the Installer VM from a VMware image to a KVM image
tar xzvf openstack_installer.tgz
cd Openstack\ Installer/
virt-convert Openstack\ Installer.vmx vmdef.OpenstackInstaller.xml
mv Openstack_Installer.raw /var/lib/libvirt/images/

# Define a default storage pool
virsh pool-create-as default dir --target /var/lib/libvirt/images

# Create the disk images for the VMs
virsh vol-create-as default admin-hda.img 10G --allocation 256k
virsh vol-create-as default node1hda.img 10G --allocation 256k
virsh vol-create-as default node1hdb.img 10G --allocation 256k
virsh vol-create-as default node2hda.img 10G --allocation 256k
virsh vol-create-as default node2hdb.img 10G --allocation 256k

# Define the VMs from .xml files
virsh define vmdef.installer.xml
virsh define vmdef.admin.xml
virsh define vmdef.node1.xml
virsh define vmdef.node2.xml

EOF1

# backup the original rc.local
cp /etc/rc.local /root/rc.local

# add CloudSolutionsPostInstallPrep.sh to rc.local
cat >> /etc/rc.local <if [ -f /root/CloudSolutionsPostInstallPrep.sh ]; then
cd /root
bash /root/CloudSolutionsPostInstallPrep.sh
mv /root/CloudSolutionsPostInstallPrep.sh /root/CloudSolutionsPostInstallPrep.sh.executed
fi

EOF