diff options
author | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2019-02-21 00:35:05 +0100 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2019-02-21 00:36:19 +0100 |
commit | cd8fd82d09b3636c8667f64d6c3264ba18e118f9 (patch) | |
tree | a7028475aea5eca2da5aa950bebe16c782dcd746 /kpov_judge | |
parent | 8dce6e5d762192e23591a91af017f513664a2364 (diff) |
create_disk_images: create standalone VMDK images
They are useful in both VirtualBox and VMware. VDI is horrible and
should die and also it is fat.
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 |