Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add snapshot after initial install and after install of vagrant deps

so we can rerun without having to start from scratch completely
  • Loading branch information...
commit c81f88a82615f2966c1c90a3b87c39a45862003f 1 parent 98c0b9a
@jasherai jasherai authored
Showing with 9 additions and 2 deletions.
  1. +6 −1 build-vagrant
  2. +1 −1  build-vbox
  3. +2 −0  clean-vbox
View
7 build-vagrant
@@ -8,6 +8,9 @@ for ARCH in $ARCHS
do
VBOX="${LABEL}-ubuntu-$VERSION-$DISTRO-$ARCH"
+ # Reset to snapshot at time of initial build
+ VBoxManage snapshot "${VBOX}" restore "AUTO_${LABEL}_base_build #000001"
+
# Start the virtual machine. Spin slowly until SSH is usable.
VBoxManage startvm "$VBOX" --type gui
#VBoxHeadless --startvm "$VBOX" --vrdp config
@@ -36,7 +39,9 @@ do
mv "package.box" \
"${LABEL}$([ "$ARCH" = "i386" ] && echo 32 || echo 64).box"
+ # Snapshot after vagrant dep install....
+ VBoxManage snapshot "${VBOX}" take "AUTO_${LABEL}_vagrant_base #000002" --description "Snapshot taken after installing vagrant dependencies"
done
# Creating Vagrant boxes ruins the normal VM setup so get rid of them.
-eval "$(dirname $0)/clean-vbox"
+#eval "$(dirname $0)/clean-vbox"
View
2  build-vbox
@@ -99,5 +99,5 @@ do
do
sleep 1
done
-
+ VBoxManage snapshot "${VBOX}" take "AUTO_${LABEL}_base_build #000001" --description "Snapshot taken after initial build to be able to restore back when recreating vagrant boxes"
done
View
2  clean-vbox
@@ -10,6 +10,8 @@ do
VBOX="${LABEL}-ubuntu-$VERSION-$DISTRO-$ARCH"
VBoxManage controlvm "$VBOX" poweroff
+ VBoxManage snapshot "${VBOX}" delete "AUTO_${LABEL}_base_build #000001"
+ VBoxManage snapshot "${VBOX}" delete "AUTO_${LABEL}_vagrant_build #000002"
VBoxManage storagectl "$VBOX" --name IDE --remove
VBoxManage storagectl "$VBOX" --name SATA --remove
VBoxManage unregistervm "$VBOX"
Please sign in to comment.
Something went wrong with that request. Please try again.