diff options
Diffstat (limited to 'grid5000/steps/export/save_appliance_VM.yaml')
-rw-r--r-- | grid5000/steps/export/save_appliance_VM.yaml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/grid5000/steps/export/save_appliance_VM.yaml b/grid5000/steps/export/save_appliance_VM.yaml new file mode 100644 index 0000000..b064d02 --- /dev/null +++ b/grid5000/steps/export/save_appliance_VM.yaml @@ -0,0 +1,23 @@ +# +# Save Appliance from virtual machine +# +- export_appliance_script: $${kameleon_data_dir}/helpers/export_appliance.py + +# Zero free unallocated blocks from ext2/3 file-systems before export to +# reduce image size +- zerofree: true + +- save_appliance: + - check_cmd_local: python2 + - exec_local: | + if [ "$${zerofree}" = "true" ]; then + EXPORT_OPTS="--zerofree" + else + EXPORT_OPTS="" + fi + - exec_local: | + python2 $${export_appliance_script} $${image_disk}.$${image_format} \ + -o $${appliance_filename} \ + --formats $${appliance_formats} \ + --tar-compression-level $${appliance_tar_compression_level} \ + --tar-excludes $${appliance_tar_excludes} $EXPORT_OPTS |