{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf480 {\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;} {\colortbl;\red255\green255\blue255;} \paperw11900\paperh16840\margl1440\margr1440\vieww11640\viewh8820\viewkind0 \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural \f0\b\fs24 \cf0 0. Introduction\ \ To support VM images, we will add mods to the Wrapper program. Need to support both UNIX and WIN32 host systems. Let's go through some of the code in order. My comments are in BOLD... \f1\b0 \ \ // wrapper.C\ // wrapper program - lets you use non-BOINC apps with BOINC\ //\ // Handles:\ // - suspend/resume/quit/abort\ // - reporting CPU time\ // - loss of heartbeat from core client\ //\ // Does NOT handle:\ // - checkpointing\ // If your app does checkpointing,\ // and there's some way to figure out when it's done it,\ // this program could be modified to report to the core client.\ \ \f0\b This version I used DOES handle checkpointing - code exists in many places! \f1\b0 \ \ //\ // See http://boinc.berkeley.edu/wrapper.php for details\ // Contributor: Andrew J. Younge (ajy4490@umiacs.umd.edu)\ \ \f0\b 1. Run a VM image\ \ Need to add code to: \f1\b0 \ \ int TASK::run(int argct, char** argvt) \ \ \f0\b Currently this just fork()'s and execv()'s the legacy app for UNIX or uses CreateProcess() for WIN32.\ We need to use the VIX API to connect to, open and power-on the VM using VixHost_Connect(), VixVM_Open() and VixVM_PowerOn().\ \ 2. Poll a running VM and get its CPU use\ \ Need to add code to:\ \ \f1\b0 bool TASK::poll(int& status) \f0\b and: \f1\b0 double TASK::cpu_time()\ \ \f0\b Currently the Wrapper just waits for the app to terminate and calculates the total CPU time.\ We need to do the same for the guest machine's CPU using VixJob_Wait() and the VMware Guest SDK.\ \ (It may well be possible to get the guest machine's CPU usage DURING execution too, which would allow issuing partial credit for long-running VM's. Would need to look how this is done in BOINC for e.g. the ClimatePrediction project).\ \ 3. Kill a running VM\ \ Need to add code to:\ \ \f1\b0 void TASK::kill()\ \ \f0\b Call VixVM_PowerOff() instead of kill() or TerminateProcess().\ \ 4. Suspend a running VM\ \ Need to add code to:\ \ \f1\b0 void TASK::stop()\ \ \f0\b Call VixVM_Suspend()\ \ 5. Resume a suspended VM\ \ Need to add code to:\ \ \f1\b0 void TASK::resume()\ \ \f0\b Call VixVM_PowerOn() again\ \ 6. Checkpoint support\ \ This probably just needs judicious use of VixVM_Suspend() and VixVM_PowerOn().}