TESTING CENTER SETUP WITH KVM
- Requires CPU that supports virtualization.
- The following instructions are for Redhat based flavors of Linux (Redhat, Fedora, CentOS).
- In the host machine's bios, enable the virtualization option for your CPU.
- Install your favorite flavor of Linux on the host machine. In our case, we used Centos 5.5
- As root, install the virtualization packages.
yum install @virtualization (or yum groupinstall Virtualization (or KVM)) (or yum install kvm libvirt python-virtinst qemu-kvm for Centos 6.3) chkconfig libvirtd on service libvirtd start reboot # may be necessary
- Confirm kvm kernel modules are running
lsmod | grep kvm #Should output the following (or similar): kvm kvm_intel #If not, please refer to the KVM Troubleshooting section below.
- Download CSEP-VM image to /export/vms directory
- Create the virtual machine
- Highlight the localhost connector and click NEW
'''VIRTUALIZATION METHOD''' FULLY-VIRTUALIZED CPU-ARCHITECTURE: x86_64 HYPERVISOR: KVM '''INSTALLATION METHOD''' PXE BOOT (just to satisfy the wizard) OS TYPE: Linux OS VARIANT: Fedora Core 14 (or highest available) '''STORAGE''' FILE DISK-IMAGE: /export/vms/csep.img #or browse for downloaded image SIZE: 30000MB '''NETWORK''' VIRTUAL NETWORK: DEFAULT SET FIX MAC ADDRESS: 00:1E:C9:AD:89:28 '''MEMORY AND CPU ALLOCATIONS''' MAX MEMORY: 10000MB START MEMORY: 10000MB VIRTUAL CPUS: 1
- After you FINISH the wizard, the VM will start automatically. You can FORCE SHUT the initial boot up because we are not actually installing the OS from PXE. After it's shutdown, click RUN to boot from image.
- The CSEP VM is configured with the IP: 192.168.122.101. Add this to your host file:
echo 192.168.122.101 csep >> /etc/hosts
- Create a home directory. There are several options:
Use virt-manager to create shared a directory on the host. In our example, we called it /op-home and mounted with the following command in /etc/fstab on the client
/op-home /home 9p trans=virtio,access=any 0 0
Virtio device Use virt-manager to create a new virtio disk. It will show up on client as /dev/vdb
NFS Create an NFS exported home directory on the HOST machine or using existing home. For example, if /home/csep exists, then:
echo /home/csep csep(rw,sync,no_root_squash) >> /etc/exports chkconfig nfs on service nfs restart # Remember to open up the firewall and disable selinux
- From the host machine, you should be able to ssh into csep now. If not, use the console in the virt-manager to login to troubleshoot the network.
ssh -l root csep #Password is 'testing'
- Once logged in, uncomment the last line of /etc/fstab (or modify it according to your home directory in step 12. Mount the home directory.
- Copy testing center appropriate config files from /usr/local/csep-config directory. Copy this to your your home directory. For example:
cp /usr/local/csep-config/japan/.tcshrc /home/csep cp /usr/local/csep-config/japan/.matplotlib /home/csep
If KVM is not loaded, try the following:
- yum install kmod-kvm kvm kvm-qemu-img
- yum update kernel kernel-devel
- modprobe kvm-intel
NOTE Previous methods of installations are no longer fully supported, but are still available:
- Setting up Testing Center manually
This section also explains how to configure your Testing Center for automated processing