diff --git a/packer/provision.json b/packer/provision.json
index 1d117633a177d58def5361a9a6ff2a9f12c439e0..5e31dd118dec5eb55ed3aeba125ba757d174f9c7 100644
--- a/packer/provision.json
+++ b/packer/provision.json
@@ -49,16 +49,16 @@
     {
       "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}",
       "scripts": [
+        "scripts/xcode.sh",
         "scripts/xcode-cli-tools.sh",
         "scripts/add-network-interface-detection.sh",
         "scripts/autologin.sh",
         "scripts/system-update.sh",
-        "scripts/xcode-sdk.sh",
         "scripts/optimize.sh",
         "scripts/shrink.sh"
       ],
       "environment_vars": [
-        "XCODE_SDK_VERSION={{user `xcode_sdk_version`}}",
+        "XCODE_VERSION={{user `xcode_version`}}",
         "PASSWORD={{user `password`}}",
         "USERNAME={{user `username`}}",
         "MACHINE_NAME={{user `machine_name`}}"
@@ -70,7 +70,7 @@
     "source_path": "ovf/macos109.ovf",
     "guest_os_type": "MacOS109_64",
     "machine_name": "macos109",
-    "xcode_sdk_version": "109",
+    "xcode_version": "6.2",
     "output_directory": "ova",
     "password": "gitlab",
     "username": "gitlab",
diff --git a/run.sh b/run.sh
index 71a7cba71a12544eab8ef9fc0f5bb63a86494628..c6623a1337972c9e673e5c9d8373da65d24f0ebf 100755
--- a/run.sh
+++ b/run.sh
@@ -32,29 +32,22 @@ ovadir="${curdir}/ova"
 if [[ "$1" == "10.9" ]]; then
 	app="/Applications/Install OS X Mavericks.app"
 	dmg="${dmgdir}/OSX_InstallESD_10.9.5_13F34.dmg"
-  short_ver=${1/./}
-  xcode_sdk_version=${short_ver}
-  machine_name="macos${short_ver}"
-  guest_os_type="MacOS${short_ver}_64"
-  ovf="${ovfdir}/${machine_name}.ovf"
-  ova="${ovadir}/${machine_name}.ova"
+  xcode_version="6.2"
 else
 	echo "Version $1 is currently unsupported"
 	exit 1
 fi
 
-echo "Checking for Xcode installer and SDK availability..."
-if [ ! -r "xcode/XcodeLegacy.sh" ]; then
-  echo "XcodeLegacy.sh not available at directory xcode/"
-  echo "Download it from here: https://github.com/devernay/xcodelegacy"
-  exit 1
-elif [ ! -r "xcode/Xcode${xcode_sdk_version}SDK.tar.gz" ]; then
-  echo "SDK not available at xcode/Xcode${xcode_sdk_version}SDK.tar.gz"
-  echo "Use XcodeLegacy.sh (https://github.com/devernay/xcodelegacy)"
-  echo " - and generate it before running the image build, e.g.:..."
-  echo "$ ./XcodeLegacy.sh -osx${xcode_sdk_version} buildpackages"
-  echo "You'll also need the original Xcode DMG for this"
-  echo " - check the URL above for links"
+short_ver=${1/./}
+machine_name="macos${short_ver}"
+guest_os_type="MacOS${short_ver}_64"
+ovf="${ovfdir}/${machine_name}.ovf"
+ova="${ovadir}/${machine_name}.ova"
+
+echo "Checking for Xcode ${xcode_version} DMG..."
+if [ ! -r "xcode/Xcode_${xcode_version}.dmg" ]; then
+  echo "Cannot find xcode/Xcode_${xcode_version}.dmg for installation"
+  echo "Download it from: https://developer.apple.com/download/more/"
   exit 1
 fi
 
@@ -64,7 +57,7 @@ echo "password = ${password}"
 echo "app      = ${app}"
 echo "os type  = ${guest_os_type}"
 echo "name     = ${machine_name}"
-echo "sdk vers.= ${xcode_sdk_version}"
+echo "xcode    = ${xcode_version}"
 echo "dmg      = ${dmg}"
 echo "ovf      = ${ovf}"
 echo "ova      = ${ova}"
@@ -93,16 +86,15 @@ if [ ! -r "${ovf}" ]; then
     -var username="${username}" \
     -var password="${password}" \
     packer/ovf.json
-  rmdir packer_cache #normally empty
+  if [ -d packer_cache ]; then
+    rmdir packer_cache #normally empty
+  fi
 else
   echo "Skipping stage 2: [$(basename ${ovf})] exists. Remove to force rebuild."
 fi
 
-exit 1
-
 if [ ! -r "${ova}" ]; then
   echo "Stage 3: [$(basename ${ovf})] -> provision -> [$(basename ${ova})]"
-  cd ovf_to_ovf && \
   packer build \
     -on-error=ask \
     -only virtualbox-ovf \
@@ -110,12 +102,17 @@ if [ ! -r "${ova}" ]; then
     -var guest_os_type="${guest_os_type}" \
     -var output_directory="${ovadir}" \
     -var machine_name="${machine_name}" \
-    -var xcode_sdk_version="${xcode_sdk_version}" \
+    -var xcode_version="${xcode_version}" \
     -var username="${username}" \
     -var password="${password}" \
     -var provisioning_delay=30 \
     packer/provision.json
-  rmdir packer_cache #normally empty
+  if [ -d packer_cache ]; then
+    rmdir packer_cache #normally empty
+  fi
 else
   echo "Skipping stage 3: [$(basename ${ova})] exists. Remove to force rebuild."
 fi
+
+echo "Note: To be able to SSH into the host, since it is configure for NAT, follow"
+echo "instructions at: https://forums.virtualbox.org/viewtopic.php?f=8&t=55766"
diff --git a/scripts/add-network-interface-detection.sh b/scripts/add-network-interface-detection.sh
index b38e5241665d65eda409828ec81f1f657753f3b6..b7daaee411741d8b93bf5149482a221a7f1e2840 100755
--- a/scripts/add-network-interface-detection.sh
+++ b/scripts/add-network-interface-detection.sh
@@ -1,8 +1,11 @@
 #!/bin/sh
 
-# This script adds a Mac OS Launch Daemon, which runs every time the
-# machine is booted. The daemon will re-detect the attached network
-# interfaces. If this is not done, network devices may not work.
+set -eox pipefail
+
+# This script adds a Mac OS Launch Daemon, which runs every time the machine is
+# booted. The daemon will re-detect the attached network interfaces. If this is
+# not done, network devices may not work.
+
 PLIST=/Library/LaunchDaemons/com.github.timsutton.osx-vm-templates.detectnewhardware.plist
 cat <<EOF > "${PLIST}"
 <?xml version="1.0" encoding="UTF-8"?>
@@ -22,7 +25,7 @@ cat <<EOF > "${PLIST}"
 </plist>
 EOF
 
-# These should be already set as follows, but since they're required
-# in order to load properly, we set them explicitly.
+# These should be already set as follows, but since they're required in order
+# to load properly, we set them explicitly.
 /bin/chmod 644 "${PLIST}"
 /usr/sbin/chown root:wheel "${PLIST}"
diff --git a/scripts/autologin.sh b/scripts/autologin.sh
index 1cafc8ee16f036248a467f1b1655674cbcc6ceae..9a124c73bf5fd7c273df09ae191a53748362c532 100755
--- a/scripts/autologin.sh
+++ b/scripts/autologin.sh
@@ -1,3 +1,7 @@
+#!/bin/sh
+
+set -eox pipefail
+
 echo "Enabling automatic GUI login for the '$USERNAME' user.."
 
 python /private/tmp/set_kcpassword.py "$PASSWORD"
diff --git a/scripts/parallels.sh b/scripts/parallels.sh
deleted file mode 100755
index 4e74ae89543dcecbce9ff95e85c5e673a4e8d8bf..0000000000000000000000000000000000000000
--- a/scripts/parallels.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-set -eo pipefail
-
-TOOLS_PATH="/Users/$USERNAME/prl-tools-mac.iso"
-# Parallels Tools specific items
-if [ -e .PACKER_BUILDER_TYPE ] || [[ "$PACKER_BUILDER_TYPE" == parallels* ]]; then
-    if [ ! -e "$TOOLS_PATH" ]; then
-        echo "Couldn't locate uploaded tools iso at $TOOLS_PATH!"
-        exit 1
-    fi
-
-    TMPMOUNT=`/usr/bin/mktemp -d /tmp/parallels-tools.XXXX`
-    hdiutil attach "$TOOLS_PATH" -mountpoint "$TMPMOUNT"
-
-    INSTALLER_PKG="$TMPMOUNT/Install.app/Contents/Resources/Install.mpkg"
-    if [ ! -e "$INSTALLER_PKG" ]; then
-        echo "Couldn't locate Parallels Tools installer pkg at $INSTALLER_PKG!"
-        exit 1
-    fi
-
-    echo "Installing Parallels Tools..."
-    installer -pkg "$INSTALLER_PKG" -target /
-
-    # This usually fails
-    hdiutil detach "$TMPMOUNT"
-    rm -rf "$TMPMOUNT"
-    rm -f "$TOOLS_PATH"
-fi
diff --git a/scripts/system-update.sh b/scripts/system-update.sh
index 2494040868008995b883b4f987eae86f6f13661b..2d7d8e577ad026bdbdab25ca07c57dea070abd51 100755
--- a/scripts/system-update.sh
+++ b/scripts/system-update.sh
@@ -1,5 +1,37 @@
-echo "Downloading and installing recommended system updates..."
-softwareupdate --install --verbose --recommended
+#!/bin/bash
+
+set -eox pipefail
+
+# read into array ${RECOMMENDED[@]}, a filtered list of available and
+# recommended software updates
+self=`basename $0`
+TMPFILE=`mktemp -t ${self}` || exit 1
+softwareupdate -l | grep -e '^\s\+\*' | sed -e 's/^[ \*]*//g' > ${TMPFILE}
+
+# starts of strings of installables we don't care about
+BLACKLIST=()
+BLACKLIST+=('iBook')
+BLACKLIST+=('iTunes')
+BLACKLIST+=('Install macOS')
+
+cat ${TMPFILE} | while read k; do
+  update="yes"
+  for l in "${BLACKLIST[@]}"; do
+    if [[ "${k}" == ${l}* ]]; then
+      update="no"
+    fi
+  done
+  if [[ "${update}" == "yes" ]]; then
+    echo "Updating $k..."
+    touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
+    softwareupdate --verbose --install "${k}"
+    rm /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
+  else
+    echo "Ignoring update for $k..."
+    softwareupdate --ignore "${k}"
+  fi
+done
+rm -f ${TMPFILE}
 
 # We don't want our system changing on us or restarting to update. Disable
 # automatic updates.
diff --git a/scripts/xcode-cli-tools.sh b/scripts/xcode-cli-tools.sh
index b9062810981e0132fef02077acb4fc474febfc60..a11a5263ccae3ad8c10abeee565660adbde90916 100755
--- a/scripts/xcode-cli-tools.sh
+++ b/scripts/xcode-cli-tools.sh
@@ -1,13 +1,14 @@
 #!/bin/sh
 
-# Get and install Xcode CLI tools
-OSX_VERS=$(sw_vers -productVersion | awk -F "." '{print $2}')
+set -eox pipefail
 
 # create the placeholder file that's checked by CLI updates' .dist code
 # in Apple's SUS catalog
 touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
+
 # find the CLI Tools update
 PROD=$(softwareupdate -l | grep "\*.*Command Line" | tail -n 1 | awk -F"*" '{print $2}' | sed -e 's/^ *//' | tr -d '\n')
 # install it
 softwareupdate -i "$PROD" --verbose
+
 rm /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
diff --git a/scripts/xcode-sdk.sh b/scripts/xcode-sdk.sh
deleted file mode 100755
index 658931ce2580c6a320d875636f40e6c965a4c1d1..0000000000000000000000000000000000000000
--- a/scripts/xcode-sdk.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-# Installs the SDK required from the command-line
-cd /tmp/xcode && /bin/bash XcodeLegacy.sh -install -osx${XCODE_SDK_VERSION}
diff --git a/scripts/xcode.sh b/scripts/xcode.sh
new file mode 100755
index 0000000000000000000000000000000000000000..13ff06dee4c9ed1733c2e2351538dd26febf755a
--- /dev/null
+++ b/scripts/xcode.sh
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+
+set -eox pipefail
+
+mountpoint="/Volumes/xcode"
+
+hdiutil attach -mountpoint "${mountpoint}" /tmp/xcode/Xcode_${XCODE_VERSION}.dmg
+
+if [ -r ${mountpoint}/XcodeTools.mpkg ]; then
+  # newer versions of Xcode
+  installer -pkg ${mountpoint}/XcodeTools.mpkg -target /
+elif [ -d ${mountpoint}/Xcode.app ]; then
+  # older versions
+  cp -a ${mountpoint}/Xcode.app /Applications
+else
+  echo "Don't know how to install this version of Xcode (${XCODE_VERSION})"
+  exit 1
+fi
+
+hdiutil detach "${mountpoint}"
+rm -rf /tmp/xcode