diff --git a/src/cmd-supermin-run b/src/cmd-supermin-run index dfcf2e0493..1ecde4da76 100755 --- a/src/cmd-supermin-run +++ b/src/cmd-supermin-run @@ -6,7 +6,7 @@ dn=$(dirname "$0") . "${dn}"/cmdlib.sh print_help() { - echo "Usage: cosa supermin-run [--cache|--snapshot] COMMAND [ARG...]" >&2 + echo "Usage: cosa supermin-run [--cache] COMMAND [ARG...]" >&2 } if [ $# = 0 ]; then @@ -21,11 +21,6 @@ case "$1" in set -- runvm_with_cache -- "$@" need_cache_dir=1 ;; - --snapshot) - shift - set -- runvm_with_cache_snapshot on -- "$@" - need_cache_dir=1 - ;; --*) echo "unrecognized option: $1" print_help diff --git a/src/cmdlib.sh b/src/cmdlib.sh index f8b8408d3c..9e84366f6c 100755 --- a/src/cmdlib.sh +++ b/src/cmdlib.sh @@ -574,10 +574,8 @@ runcompose_tree() { fi } -# Run with cache disk with optional snapshot=on, which means no changes get written back to -# the cache disk. `runvm_with_cache_snapshot on` will set snapshotting to on. -runvm_with_cache_snapshot() { - local snapshot=$1; shift +# Run with cache disk. +runvm_with_cache() { local cache_size=${RUNVM_CACHE_SIZE:-30G} # "cache2" has an explicit label so we can find it in qemu easily if [ ! -f "${workdir}"/cache/cache2.qcow2 ]; then @@ -590,16 +588,11 @@ runvm_with_cache_snapshot() { fi # And remove the old one rm -vf "${workdir}"/cache/cache.qcow2 - cache_args+=("-drive" "if=none,id=cache,discard=unmap,snapshot=${snapshot},file=${workdir}/cache/cache2.qcow2" \ + cache_args+=("-drive" "if=none,id=cache,discard=unmap,file=${workdir}/cache/cache2.qcow2" \ "-device" "virtio-blk,drive=cache") runvm "${cache_args[@]}" "$@" } -runvm_with_cache() { - local snapshot='off' - runvm_with_cache_snapshot $snapshot "$@" -} - # Strips out the digest field from lockfiles since they subtly conflict with # various workflows. strip_out_lockfile_digests() {