diff options
Diffstat (limited to 'kpov_judge')
-rwxr-xr-x | kpov_judge/create_disk_images.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kpov_judge/create_disk_images.py b/kpov_judge/create_disk_images.py index 2f8fffe..d4a7cfd 100755 --- a/kpov_judge/create_disk_images.py +++ b/kpov_judge/create_disk_images.py @@ -41,7 +41,7 @@ def create_snapshot(class_id, task_id, student_id, computer_name, disk_name, fmt # ensure task dir exists os.makedirs(task_path, exist_ok=True) - if fmt == 'vdi': + if fmt in ('vdi', 'vmdk'): # don’t use backing files, just copy the template os.chdir(task_path) if settings.STUDENT_DISK_COW: @@ -49,7 +49,7 @@ def create_snapshot(class_id, task_id, student_id, computer_name, disk_name, fmt else: subprocess.call(['cp', os.path.join(settings.DISK_TEMPLATE_PATH, template), snap]) - elif fmt in ('qcow2', 'vmdk'): + elif fmt == 'qcow2': # qemu-img create stores backing-file path as given, so link all # backing images to task directory where target image will be # generated |