2014-06-11 12:07:29 +00:00
|
|
|
diff --git a/bin/make-base-vm b/bin/make-base-vm
|
2017-04-10 15:25:22 +00:00
|
|
|
index a7c182b..8dc4091 100755
|
2014-06-11 12:07:29 +00:00
|
|
|
--- a/bin/make-base-vm
|
|
|
|
+++ b/bin/make-base-vm
|
2017-04-10 15:25:22 +00:00
|
|
|
@@ -227,5 +227,17 @@ else
|
|
|
|
mv $OUT/*.qcow2 $OUT.qcow2
|
|
|
|
rm -rf $OUT
|
|
|
|
# bootstrap-fixup is done on first boot
|
|
|
|
+
|
|
|
|
+ if [ $LXC = "1" ]; then
|
|
|
|
+ #sudo debootstrap --include=$addpkg --arch=$ARCH $SUITE $OUT-root $MIRROR
|
|
|
|
+ echo Extracting partition for lxc
|
|
|
|
+ qemu-img convert $OUT.qcow2 $OUT.raw
|
|
|
|
+ loop=`sudo kpartx -av $OUT.raw|sed -n '/loop.p1/{s/.*loop\(.\)p1.*/\1/;p}'`
|
|
|
|
+ sudo cp --sparse=always /dev/mapper/loop${loop}p1 $OUT
|
|
|
|
+ sudo chown $USER $OUT
|
|
|
|
+ sudo kpartx -d /dev/loop$loop
|
|
|
|
+ rm -f $OUT.raw
|
|
|
|
+ # bootstrap-fixup is done in libexec/make-clean-vm
|
|
|
|
+ fi
|
|
|
|
fi
|
|
|
|
|