Virtual Exams Instructions

Virtual Exam Documentation

Logging into <class_account>vx account e.g. cs1234vx starts the exam.

The exam files are under <class_account>exam account e.g. follow (symbolic link) currentexam.

You have ssh access to both these accounts if you have ssh access to the <class account>.

Scripts

 

 

 

 

~give/stable/bin/prac-install-vx [<fr_prac>] <to_prac>

  1. ssh into <class_account>exam

  2. Run script

    1. creates a new exam to_prac by copying an old exam fr_prac

    2. creates a template exam if omit fr_prac

  3. Customise, edit files under currentexam/class and currentexam/etc

~give/stable/bin/prac-rsync-vx <fr_exam_acct> <fr_path> [<to_path>]

  1. Start ssh agent - eval $(ssh-agent)
    Add ssh passphrase - ssh-add ~/.ssh/id_rsa

  2. ssh -A into <class_account>exam, -A option to forward ssh agent

  3. Run script

    1. copy exam from main exam account (e.g. cs1511exam) to series of exam accounts (cs1511exam{1,2,3,4})

    2. copy exam from one class to another, need to have ssh access to both class accounts.

Example:

ssh -A cs9024exam@localhost ~give/stable/bin/prac-rsync-vx \ cs2521exam \ "exams/24T1final" \ “exams/24T2final”

priv passwd

  • Change the <class_account>vx password before and after the exam with this script

  • Run priv passwd from the <class_account>

priv chown <wildcard>

Change ownership of work directories from 90<uid> to exam account at the end of the exam to access the students' files

after changing ownership, students can't start the exam

marimba % ls -la exams/19T1midterm/work total 16 drwxrwxrwt 4 en1811exam en1811exam 4096 Mar 14 21:19 . drwxr-x--- 6 en1811exam en1811exam 4096 Mar 12 17:50 .. drwxrws--- 14 929389 en1811exam 4096 Mar 14 21:36 z5016573 drwxrws--- 13 906444 en1811exam 4096 Mar 12 20:02 z8470184

Hints

  1. /home/vxconf/vx.conf.d is the repository for vx.conf files for commonly used products e.g. gcc, python, gedit, fluxbox

    • prac-install-vx creates ~/exams/<prac>/etc/vx.conf.d and fill it with symbolic links to vx.conf files in /home/vxconf/vx.conf.d

    • remove any sym links not needed. exam takes less time to start up if there are less software.

  2. when the exam crashes after you authenticated with your zid, check stderr.log file under <exam_account>/var directory. Look at the latest directories.

    ls -lt ~/var | head -5
  3. after changing ownership of the work directories (e.g. under /home/cs1234exam/currentexam/work), you can't start the exam with the same work directories.

    • create a new work directory.

    • or remove the student's work directory

  4. path mounted on top of a previous mount cause the exam environment to abort on subsequent logins. The exam environment, on start, attempts to delete the old gaol if it exists by unmounting directories.

    • The problem can be avoided by ensuring that a directory is not under [bind mounts] when its parent is already set to be mounted. Check /home/virtualexam/etc/vx.conf for global bind mounts.

    • Stale gaols are removed every night by a cron job on the VX servers. Any that can’t be removed are checked by SS and manually processed.

    • To fix the problem above, as root

      • unmount "/var/gaol/meicheng/usr/lib"

      • delete gaol manually

      • May need to remove any associated processes, look for user ID's equal to 900000 + the actual user ID.