This document provides instuctions for configuring a standalone VCL environment running on a single computer which is able to provision VCL reservations using VMware. It is only provided to help you understand how the various components of VCL operate. This document DOES NOT describe how to configure a production VCL environment. The environment described in this document can however be used to learn, test, and help develop VCL.
You will need the following:
These instructions assume the VMware Server RPM has been downloaded to the following location on the management node:
/root/VMware-server-2.0.2-203138.x86_64.rpm
These instructions assume you are logged in to the management node as root and are using a bash shell.
Begin by completing the VCL 2.2.1 Installation instructions. Install all of the components on the same computer.
yum groupremove "Virtualization" -y
VMWare Server cannot be installed on a computer running a Xen kernel. To determine if a Xen kernel is being used:
uname -a
The following output indicates a Xen kernel is being used:
Linux blade1g6-4 2.6.18-92.el5xen #1 SMP Tue Jun 10 19:20:18 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
If "xen" appears in the output of the previous command, replace the Xen kernel:
yum update ecryptfs-utils -y
yum install kernel kernel-devel -y
yum remove xen kernel-xen -y
Check the grub.conf file to make sure it is not configured to boot using the Xen Kernel
less /boot/grub/grub.conf
The grub.conf file should NOT look like this:
title CentOS (2.6.18-92.el5xen)
module /vmlinuz-2.6.18-92.el5xen ro root=LABEL=/ pci=nommconf
After removing the Xen kernel, reboot the computer:
reboot
Download the latest VMware Server 2.0 RPM from http://www.vmware.com
These instructions assume you saved the RPM into /root
Install VMware Server:
rpm -ivh /root/VMware-server-2.0.2-203138.x86_64.rpm
Configure VMware Server:
vmware-config.pl
Answer the questions asked by vmware-config.pl as follows:
If you receive an error message when you execute vmware-config.pl you may need to install or update the following libraries and then run vmware-config.pl again:
yum install glibc-devel -y
yum install glibc -y
yum install libXtst-devel -y
Verify the host-only network was configured correctly:
/sbin/ifconfig
You should see a vmnet1 interface using IP address 192.168.0.1:
vmnet1 Link encap:Ethernet HWaddr 00:50:56:C0:00:01
inet addr:192.168.0.1 Bcast:192.168.255.255 Mask:255.255.0.0
inet6 addr: fe80::250:56ff:fec0:1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
/sbin/service vmware restart
You should see the following:
Starting VMware services:
Virtual machine monitor [<span style="color: #339966">OK</span> ]
Virtual ethernet [<span style="color: #339966">OK</span> ]
Bridged networking on /dev/vmnet0 [<span style="color: #339966">OK</span> ]
Host-only networking on /dev/vmnet1 (background) [<span style="color: #339966">OK</span> ]
Starting VMware virtual machines... [<span style="color: #339966">OK</span> ]
VMware Server 2.0 will not run reliably if the version of glibc installed on the host is newer than 2.5-34. This problem is known to affect recent versions of Red Hat Enterprise Linux and CentOS. If not corrected, VMware Server will crash intermittently and the VMware administration web pages will lock up or fail to load.
Check the version of glib installed on the VMware host:
yum list installed glibc
You will need to configure VMware to use glibc 2.5-34 if the version installed on the host is newer than 2.5-34:
Installed Packages glibc.i686 2.5-42 installed glibc.x86_64 2.5-42 installed
For CentOS, you will need to download the glibc RPM included with CentOS 5.3. This is available from vault.centos.org:
Create a temp directory and cd to it:
mkdir /tmp/glibc ; cd /tmp/glibc
Download the glibc RPM (change the URL accordingly):
Extract the cpio archive from the glibc RPM:
rpm2cpio glibc-2.5-34.el5_3.1.x86_64.rpm | cpio --extract --make-directories
Create the following directory:
mkdir /usr/lib/vmware/lib/libc.so.6
Copy the following file to the new directory:
cp /tmp/glibc/lib64/libc-2.5.so /usr/lib/vmware/lib/libc.so.6/libc.so.6
Make a backup of the original vmware-hostd file:
cp /usr/sbin/vmware-hostd /root/vmware-hostd.orig
Edit vmware-hostd:
vi /usr/sbin/vmware-hostd
Navigate to the bottom of the file. You should see the following as the last line:
eval exec "$DEBUG_CMD" "$binary" "$@"
Add the following export line immediately before the last eval line in vmware-hostd:
export LD_LIBRARY_PATH=/usr/lib/vmware/lib/libc.so.6:$LD_LIBRARY_PATH eval exec "$DEBUG_CMD" "$binary" "$@"
The following sed command can also be used to add the line to vmware-hostd:
Do not both manually edit vmware-hostd and run the following sed command
sed -i -r -e "s/(eval exec.*)/export LD_LIBRARY_PATH=\/usr\/lib\/vmware\/lib\/libc.so.6:\$LD_LIBRARY_PATH\n\1/" /usr/sbin/vmware-hostd
Restart the vmware service:
/sbin/service vmware restart
Modify the /etc/hosts file to include entries for the VM host and guest computers:
vi /etc/hosts
Add the entries in bold:
127.0.0.1 localhost
192.168.0.1 localvmhost
192.168.1.1 vmguest-1
vi /etc/ssh/sshd_config
Add the following line to the end of the file:
ListenAddress 192.168.0.1
Restart the sshd service on the management node:
/sbin/service sshd restart
If you have not already generated an SSH identity key on the management node to be used to login to the computers the management node controls, run the following command to generate a new key:
ssh-keygen -t rsa -f "/etc/vcl/vcl.key" -N '' -b 1024 -C "VCL root account on $HOSTNAME"
Add the VM host's public key to its own authorized_keys file to allow it to SSH to itself without a password prompt:
cat /etc/vcl/vcl.key.pub >> /root/.ssh/authorized_keys
The following command should execute without having to enter a password:
ssh -i /etc/vcl/vcl.key localvmhost 'ls /'
Configure the keys column in the managementnode table in the VCL database
Save a copy of the original dhcpd.conf file:
mv /etc/dhcpd.conf /etc/dhcpd.conf.orig
Configure the dhcpd.conf file:
vi /etc/dhcpd.conf
The dhcpd.conf file should contain the following:
ddns-update-style none; shared-network vmnet1 { subnet 192.168.0.0 netmask 255.255.0.0 { ignore unknown-clients; option routers 192.168.0.1; host vmguest-1 { option host-name "vmguest-1"; hardware ethernet 00:50:56:1a:01:01; fixed-address 192.168.1.1; filename "/tftpboot/pxelinux.0"; option dhcp-server-identifier 192.168.0.1; next-server 192.168.0.1; } } }
The DHCP daemon should only listen on the virtual private network (vmnet1) to avoid conflicts with other production VCL networks. Configure the dhcpd service startup script to only listen on the vmnet1 interface:
vi /etc/init.d/dhcpd
Add vmnet1 the to the daemon $dhcpd line as shown:
start() { [ -x $dhcpd ] || return 5 [ -f $conf ] || return 6 pidofproc $prog >/dev/null 2>&1 RETVAL=$? [ $RETVAL -eq 0 ] && return $RETVAL echo -n $"Starting $prog: " daemon $dhcpd vmnet1 $DHCPDARGS 2>/dev/null RETVAL=$? echo [ $RETVAL = 0 ] && touch $lockfile return $RETVAL }
Configure the dhcpd service to automatically start at runlevels 3-5:
/sbin/chkconfig --level 345 dhcpd on
Start the dhcpd service:
/sbin/service dhcpd start