The following commands will install the Linux packages required for VCL to manage a KVM host:
Panel |
---|
yum install libvirt virt-manager dejavu-lgc-sans-fonts bridge-utils libguestfs-tools -y echo "Starting the libvirtd service..." |
The virt-manager package is optional. It is a graphical utility which is used to manage KVM and other hypervisors controlled via libvirt. The dejavu-lgc-sans-fonts package is usually necessary in order for virt-manager to render fonts correctly.
The following commands will configure networking to allow KVM guests to communicate. It configures a bridge named br0 on eth0, and br1 on eth1. When configured this way, the network names in the VM host profile should be set to br0 and br1.
Panel |
---|
echo "Stopping the NetworkManager service..." cat > /etc/sysconfig/network-scripts/ifcfg-eth0 <<EOF cat > /etc/sysconfig/network-scripts/ifcfg-br0 <<EOF cat > /etc/sysconfig/network-scripts/ifcfg-eth1 <<EOF cat > /etc/sysconfig/network-scripts/ifcfg-br1 <<EOF echo "Configuring eth0 bridge..." echo "Configuring eth1 bridge..." /sbin/chkconfig network on |
The following commands will add an NFS storage pool named images to the KVM host. The /images directory is exported via NFS from host 10.10.10.1. This directory is mounted as /mnt/kvm1 on the KVM host. An entry is added to /etc/fstab to ensure the directory is mounted if the KVM host is rebooted.
Panel |
---|
echo "Adding the images pool..." virsh pool-define-as --name images --type dir --target /images |
The following commands will define a storage pool named local-vms pointing to the /vms directory on the local disk:
Panel |
---|
echo "Adding the local-vms pool..." |