245 | | |
| 245 | '''Attention:''' If your '''boinc_app''' is a bash or perl script you may get problems when the VM is restored from a snapshot. To circumvent this you have to change your startup script to copy the contents of the shared/ directory to another directory 'inside' the VM and execute it there. For example: |
| 246 | {{{ |
| 247 | echo -- Launching boinc_app |
| 248 | if [ -f /root/shared/boinc_app ]; then |
| 249 | mkdir /root/worker |
| 250 | cp -r /root/shared/* /root/worker/ |
| 251 | cd /root/worker/ |
| 252 | ./boinc_app |
| 253 | cd /root/ |
| 254 | rm -rf /root/worker |
| 255 | shutdown -hP 0 |
| 256 | else |
| 257 | }}} |
| 258 | This way you can still reuse the VM for other applications but have to make sure that your '''boinc_app''' control script is copying the output files of the application to ´/root/shared/´ before exiting. This may take some time, so you should do something like: |
| 259 | {{{ |
| 260 | cp outfile1.zip /root/shared/out1.zip.tmp |
| 261 | cp outfile2.zip /root/shared/out2.zip.tmp |
| 262 | {...} |
| 263 | mv /root/shared/out1.zip.tmp /root/shared/out1.zip |
| 264 | mv /root/shared/out2.zip.tmp /root/shared/out2.zip |
| 265 | }}} |