From 4dc2527fafa601d114b778a775d538aab36d8970 Mon Sep 17 00:00:00 2001
From: Lunar <lunar@torproject.org>
Date: Mon, 13 Oct 2014 00:26:22 +0200
Subject: [PATCH 1/2] Copy target image as a sparse file in LXC mode

This will save us from writing a lot of zeros on disk.
---
 libexec/make-clean-vm |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libexec/make-clean-vm b/libexec/make-clean-vm
index 9915df3..b02b0d2 100755
--- a/libexec/make-clean-vm
+++ b/libexec/make-clean-vm
@@ -59,7 +59,7 @@ case $VMSW in
     qemu-img create -f qcow2 -o backing_file="$BASE.qcow2" "$OUT.qcow2"
     ;;
   LXC)
-    cp -a $BASE $OUT
+    cp -a --sparse=always $BASE $OUT
     on-target -u root /root/firstboot.sh
     ;;
   VBOX)
-- 
1.7.9.5

