Configuring Condor for Virtual Machine Universe using VMware on Windows
From Ben's Writing
Contents |
Introduction
NOTE: This information is no longer completely relevant: Condor's VM Universe no longer needs two configuration files. Read at your own risk
The following is an attempt at a basic how-to for configuring Condor's VM Universe on Windows using VMware. It contains only the bare minimum of information required to start using VM Universe and, therefore, should not be used a definitive guide to VM Universe. Please refer to the Condor manual for further information.
I've made all attempts to make the material accurate, but as with any side project, there may be mistakes in the document. Use this at your own risk, and prefer the manual instructions if they conflict with this document (unless explicitly stated otherwise).
Requirements
You will need the pieces following software:
- Condor (with VM Universe support)
- VMware Server
- ActivePerl
At the time of writing, I used Condor 6.9.4, VMware Server 1.0.4 and ActivePerl 5.8.8.822 for my installation.
Installation
- Install Condor, VMware Server and ActivePerl as per usual. (I used the installers for each; however, you can use the ZIP file for the Condor install if you are so inclined [or just upgrading, in which case you can just copy over the new binaries].) For the purposes of the instructions, I assume you have installed all the software on the
C:drive. - Copy
condor_vmgahp_config.vmwareout of the\condor\etcdirectory to the\condordirectory. (Most of the configuration will take place in this file, leaving thecondor_configfile primarily untouched.)
Configuration
condor_config
Required Settings
There a few crucial settings that must be set, in order for Condor to be aware of the vm-gaph:
- Set
VM_GAHP_SERVERto the location where the vm-gaph executable resides. The following is what I used:
VM_GAHP_SERVER = $(SBIN)/condor_vm-gahp.exe
- You must also set
VM_TYPE. Since we already know that are using VMware, we know what this setting needs to be:
VM_TYPE = vmware
- Finally, you must tell Condor where the vm-gaph configuration file resides. We already know this, because we copied it to the Condor root directory during installation:
VM_GAHP_CONFIG = $(RELEASE_DIR)/condor_vmgahp_config.vmware
- It would be a good idea to set
VM_GAHP_LOGto something sane; like, say, for example:
VM_GAHP_LOG = $(LOG)/VMGahpLogs/VMGahpLog.$(USERNAME)
Note: The directory VMGahpLogs must exist prior to starting the the Condor service, otherwise the service will fail to start. This can also be set to NUL if you don't care about logging at all (and, no, that is not a typo, there is only one L— it's the equivalent of /dev/null on *NIX). Also, ensure that Everyone (the group) has full access (i.e. Full Control), as the log files created in this directory will be user-specific.
Optional Settings
- Another option worth setting is
VM_MEMORY. This tells the vm-gaph how much of the machine's memory can be used by VM Universe jobs. If you don't set this, the vm-gaph with select its own value. On a machine with little ram, the following would suffice:
VM_MEMORY = 128
- The final setting worth mentioning for a starting WM universe user is the
VM_NETWORKING. This allows for support networking in VM Universe jobs. Since in our example will use networking, we enable it:
VM_NETWORKING = TRUE
Note: The reliability of networking in VM universe is touchy, at best. Jobs written for VM universe should not rely on connections remaining open. This is because if a VM is suspended, all network connections will be lost. Worst still: if a job is transferred to another machine, the VMs IP may even change.
Thus, if your jobs require networking you have two choices: either don't us VM universe (but you are reading this, so we'll assume this is not an option), or make all network transactions as fast as possible; also, if you do find the connection is lost during communication, do not immediately consider this an error; instead, attempt to re-connect first (or ping a well know active host) before determining that the connection to be in error.
condor_vmgahp_config.vmware
The virtual machine we are using uses a NAT for its networking, so the following instructions assume the use of a NAT.
Required Settings
- First, you must set the
VM_TYPE, which tells the vm-gaph which virtual machine program it will be using:
VM_TYPE = vmware
- You must also tell the vm-gaph which version of the software you are using. In my case, I am using 1.0.4, so I wrote:
VM_VERSION = server1.0.4
Note: While required, this setting does not alter the behavior of the vm-gaph. Instead, it is added to the ClassAd for the machine, so it can be matched against if future releases of VMware support new features that are desirable to your job.
- If you do not use ActivePerl—which adds itself to the
PATHenvironment—then you will also need tell the vm-gaph where Perl is located:
VMWARE_PERL = perl
However, since we're using ActivePerl, the above will suffice; but, in general, you would specify a fully qualified path to the Perl executable:
VMWARE_PERL = "C:\Perl\bin\perl.exe"
- The maximum amount of ram that the virtual machine can use must also be set:
VM_MAX_MEMORY = 512
Note: the above can differ from the VM_MEMORY set in condor_config, because this will be used as the default maximum, if no machine level maximum is set. In the case when the machine sets VM_MEMORY to a value lower to that of VM_MAX_MEMORY, the value of VM_MEMORY is used. That is to say, the execute node will always have control over its resources; so be warned: if your jobs memory requirements exceed the amount of memory allocated for VM Universe jobs (whether it be by VM_MEMORY or VM_MAX_MEMORY) they will not be matched with those machines.
Optional Settings
- The two final setting worth mentioning are
VM_NETWORKINGandVM_NETWORKING_TYPE. This allows for networking support in VM Universe jobs. Since in our example will use networking, we enable it:
VM_NETWORKING = TRUE VM_NETWORKING_TYPE = nat_dhcp
Conclusion
At this point, you should be able to start your Condor service and have the vm-gaph available. Again, please refer to the Condor manual for further information and more advanced configuration options.