Apache VCL logo Apache Software Foundation logo
Apache current event

Configuring a Standalone VCL Environment using VMware Server 1.x

{color:#ff0000}DISCLAIMER!{color}

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.

Install VCL Components

Begin by completing the installation instructions for the VCL components:

Gather Required Files & Information

You will need the following:

The following instructions assume the following locations on the management node:

These instructions assume you have root access and are using a bash shell: {panel} sudo bash {panel}

Configure the VCL Database for the VM Guest and Host 

Remove Existing Virtualization Components

{panel} yum groupremove “Virtualization” -y   {panel}

Make Sure The Host Computer Is Not Running A Xen Kernel

VMWare Server cannot be installed on a computer running a Xen kernel.  To determine if a Xen kernel is being used: {panel} uname -a {panel}The following output indicates a Xen kernel is being used: {panel} Linux blade1g6-4 2.6.18-92.el5{color:#cc0000}{}xen{}{color} #1 SMP Tue Jun 10 19:20:18 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux {panel}If “xen” appears in the output of the previous command, replace the Xen Kernel with the following commands: {panel} yum update ecryptfs-utils -y yum install kernel kernel-devel -y yum remove xen kernel-xen -y {panel}Check the grub.conf file to make sure it is not configured to boot using the Xen Kernel {panel} less /boot/grub/grub.conf  {panel}The grub.conf file should {color:#cc0000}{}NOT{}{color} look like this: {panel} # grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE:  You have a /boot partition.  This means that #          all kernel and initrd paths are relative to /boot/, eg. #          root (hd0,0) #          kernel /vmlinuz-version ro root=/dev/sda3 #          initrd /initrd-version.img #boot=/dev/sda default=0 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title CentOS (2.6.18-92.el5{color:#cc0000}{}xen{}{color})         root (hd0,0)         kernel /xen.gz-2.6.18-92.el5         module /vmlinuz-2.6.18-92.el5{color:#cc0000}{}xen{}{color} ro root=LABEL=/ pci=nommconf         module /initrd-2.6.18-92.el5xen.img {panel}The grub.conf file {color:#336600}{}SHOULD{}{color} look like this: {panel} # grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE:  You have a /boot partition.  This means that #          all kernel and initrd paths are relative to /boot/, eg. #          root (hd0,0) #          kernel /vmlinuz-version ro root=/dev/sda3 #          initrd /initrd-version.img #boot=/dev/sda default=0 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title CentOS (2.6.18-128.1.14.el5)         root (hd0,0)         kernel /vmlinuz-2.6.18-128.1.14.el5 ro root=LABEL=/1 pci=nommconf         initrd /initrd-2.6.18-128.1.14.el5.img {panel}After removing the Xen kernel, reboot the computer: {panel} reboot {panel}

Install VMware Server

Download the latest VMware Server 1.x RPM from http://www.vmware.com (Note: these instructions assume you saved the RPM into /install)

Install the VMware Server RPM: {panel} rpm -ivh /install/VMware-server-1.0.8-126538.i386.rpm {panel}Configure VMware Server: {panel} vmware-config.pl {panel}{}Note: if you receive an error message you may need to install or update some libraries and then run vmware-config.pl again: {panel} yum install glibc-devel -y yum install glibc -y  yum install libXtst-devel -y {panel}VMware networking should be configured as follows after answering the questions asked by vmware-config.pl

The following lists the sequence of answers to be entered after issuing the vmware-config.pl command:

  1. Press ENTER to view the license agreement, scroll to the bottom, type yes and press ENTER
  2. In which directory do you want to install the mime type icons? [/usr/share/icons](/usr/share/icons.html) ENTER
  3. What directory contains your desktop menu entry files? These files have a .desktop file extension. [/usr/share/applications](/usr/share/applications.html) ENTER
  4. In which directory do you want to install the application’s icon? [/usr/share/pixmaps](/usr/share/pixmaps.html) ENTER
  5. None of the pre-built vmmon modules for VMware Server is suitable for your running kernel.  Do you want this program to try to build the vmmon module for your system (you need to have a C compiler installed on your system)? [yes](yes.html) ENTER
  6. What is the location of the directory of C header files that match your running kernel? [/lib/modules/2.6.18-128.1.14.el5/build/include](/lib/modules/2.6.18-128.1.14.el5/build/include.html) ENTER
  7. Do you want networking for your virtual machines? (yes/no/help) [yes](yes.html) ENTER
  8. Your computer has multiple ethernet network interfaces available: eth0, eth1, virbr0. Which one do you want to bridge to vmnet0? [eth0](eth0.html) eth1
  9. Do you wish to configure another bridged network? (yes/no) [no](no.html) ENTER
  10. Do you want to be able to use NAT networking in your virtual machines? (yes/no) [yes](yes.html) no
  11. Do you want to be able to use host-only networking in your virtual machines? [no](no.html) yes
  12. Do you want this program to probe for an unused private subnet? (yes/no/help) [yes](yes.html) no
  13. What will be the IP address of your host on the private network? 192.168.0.1
  14. What will be the netmask of your private network? 255.255.0.0
  15. DHCP information is displayed, press ENTER
  16. Do you wish to configure another host-only network? (yes/no) [no](no.html) ENTER
  17. The default port : 902 is not free. We have selected a suitable alternative port for VMware Server use. You may override this value now. Remember to use this port when connecting to this server. Please specify a port for remote console connections to use [904](904.html) ENTER
  18. In which directory do you want to keep your virtual machine files? [/var/lib/vmware/Virtual Machines](/var/lib/vmware/virtual-machines.html) ENTER
  19. The path “/var/lib/vmware/Virtual Machines” does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes](yes.html) ENTER
  20. Please enter your 20-character serial number Type XXXXX-XXXXX-XXXXX-XXXXX or ‘Enter’ to cancel: enter the serial number

Verify the host-only network was configured correctly: {panel} /sbin/ifconfig {panel}You should see a vmnet1 interface using IP address 192.168.0.1: {panel} 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) {panel}Restart the vmware service (/sbin/service vmware restart), you should see the following: {panel} Starting VMware services:    Virtual machine monitor                                  [ OK ](-ok-.html)    Virtual ethernet                                         [ OK ](-ok-.html)    Bridged networking on /dev/vmnet0                        [ OK ](-ok-.html)    Host-only networking on /dev/vmnet1 (background) [ OK ](-ok-.html)    Starting VMware virtual machines…                     [ OK ](-ok-.html) {panel}

Configure /etc/hosts

Modify the /etc/hosts file to include entries for the VM host and guest computers: {panel} vi /etc/hosts {panel}Add the entries in bold: {panel} 127.0.0.1 localhost 192.168.0.1 localvmhost 192.168.1.1 vmguest-1 {panel}

h2. Configure the sshd Service to Listen on the Virtual Private Network 

{panel} vi /etc/ssh/sshd_config {panel}Add the following line to the end of the file: {panel} ListenAddress 192.168.0.1 {panel}Restart the sshd service on the management node: {panel} /sbin/service sshd restart {panel}

Configure The VM Host To Be Able To SSH To Itself

Add the VM host’s public key to its own authorized_keys file to allow it to SSH to itself without a password prompt:  {panel} cat /etc/vcl/vcl.key.pub » /root/.ssh/authorized_keys {panel}The following command should execute without having to enter a password: {panel} ssh localvmhost ‘ls /’ {panel}

Configure vcld to use vcl.key

Configure the keys column in the managementnode table in the VCL database

Configure the vcld.conf file to use vcl.key: {panel} vi /etc/vcl/vcld.conf {panel}Modify all of the IDENTITY lines to specify the vcl.key file: {panel} IDENTITY_blade_linux=/etc/vcl/vcl.key IDENTITY_solaris_lab=/etc/vcl/vcl.key IDENTITY_linux_lab=/etc/vcl/vcl.key IDENTITY_blade_win=/etc/vcl/vcl.key {panel}

Configure The DHCP Service 

Save a copy of the original dhcpd.conf file: {panel} mv /etc/dhcpd.conf /etc/dhcpd.conf.orig {panel}Configure the dhcpd.conf file: {panel} vi /etc/dhcpd.conf {panel}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: {panel} vi /etc/init.d/dhcpd {panel}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: {panel} /sbin/chkconfig --level 345 dhcpd on {panel}Start the dhcpd service:   {panel} /sbin/service dhcpd start {panel}