Commit 00965a49 authored by dylanmei's avatar dylanmei

VirtualBox builders install VBoxGuestAdditions

parent c7446a43
......@@ -2,5 +2,6 @@
/iso/*
!/iso/README.md
/output-vmware/
/output-virtualbox/
/*.box
/packer_cache/
#!/bin/sh
set -x
wget --no-check-certificate http://pm.puppetlabs.com/puppet-enterprise/2.7.2/puppet-enterprise-2.7.2.msi
msiexec /qn /i puppet-enterprise-2.7.2.msi
wget --no-check-certificate http://pm.puppetlabs.com/puppet-enterprise/3.0.1/puppet-enterprise-3.0.1.msi -O puppet.msi
msiexec /qn /i puppet.msi
rm -rf puppet.msi
cmd.exe /c setx /m PATH "%path%;C:\\Program Files (x86)\\Puppet Labs\\Puppet Enterprise\\bin"
sleep 1
#!/bin/sh
set -x
if [ "$PACKER_BUILDER_TYPE" != "virtualbox" ]; then
echo "not building virtualbox, skipping"
exit
fi
# 7zip will allow us to extract a file from an ISO
wget http://downloads.sourceforge.net/sevenzip/7z920-x64.msi
msiexec /qb /i 7z920-x64.msi
# There needs to be Oracle CA (Certificate Authority) certificates installed in order
# to prevent user intervention popups which will undermine a silent installation.
cmd /c certutil -addstore -f "TrustedPublisher" A:\\oracle-cert.cer
mkdir /home/vagrant/virtualbox
chown -R vagrant /home/vagrant/virtualbox
# Extract and install
/cygdrive/c/Program\ Files/7-Zip/7z.exe x -y C:\\cygwin\\VBoxGuestAdditions*.iso -ovirtualbox
cmd.exe /c .\\virtualbox\\VBoxWindowsAdditions.exe /S
rm -rf /home/vagrant/VBoxGuestAdditions.iso
rm -rf /home/vagrant/virtualbox
msiexec /qb /x 7z920-x64.msi
rm -rf 7z920-x64.msi
#cmd /c shutdown.exe /r /t 0 /d p:4:1 /c "Vagrant reboot for VBoxWindowsAdditions"
sleep 1
if [ "$PACKER_BUILDER_TYPE" -ne "vmware" ]; then
#!/bin/sh
set -x
if [ "$PACKER_BUILDER_TYPE" != "vmware" ]; then
echo "not building vmware, skipping"
exit
fi
......
......@@ -34,7 +34,12 @@
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Vagrant Shutdown\"",
"guest_os_type": "Windows2008_64",
"disk_size": 61440,
"floppy_files": ["./answer_files/2008_r2/Autounattend.xml", "./scripts/install-cygwin-sshd.bat", "./scripts/install-win-updates.ps1"],
"floppy_files": [
"./answer_files/2008_r2/Autounattend.xml",
"./scripts/oracle-cert.cer",
"./scripts/install-cygwin-sshd.bat",
"./scripts/install-win-updates.ps1"
],
"vboxmanage": [
["modifyvm", "{{.Name}}", "--memory", "2048"],
["modifyvm", "{{.Name}}", "--cpus", "2"]
......@@ -42,7 +47,7 @@
}],
"provisioners": [{
"type": "shell",
"scripts": ["./scripts/postinstall.sh", "./scripts/install-vmware-tools.sh", "./scripts/install-chef.sh"]
"scripts": ["./scripts/postinstall.sh", "./scripts/install-vmware-tools.sh", "./scripts/install-virtualbox-tools.sh", "./scripts/install-chef.sh"]
}],
"post-processors": [{
"type": "vagrant",
......
......@@ -34,7 +34,12 @@
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Vagrant Shutdown\"",
"guest_os_type": "Windows2012_64",
"disk_size": 61440,
"floppy_files": ["./answer_files/2012/Autounattend.xml", "./scripts/install-cygwin-sshd.bat", "./scripts/install-win-updates.ps1"],
"floppy_files": [
"./answer_files/2012/Autounattend.xml",
"./scripts/oracle-cert.cer",
"./scripts/install-cygwin-sshd.bat",
"./scripts/install-win-updates.ps1"
],
"vboxmanage": [
["modifyvm", "{{.Name}}", "--memory", "2048"],
["modifyvm", "{{.Name}}", "--cpus", "2"]
......@@ -42,7 +47,7 @@
}],
"provisioners": [{
"type": "shell",
"scripts": ["./scripts/postinstall.sh", "./scripts/install-vmware-tools.sh", "./scripts/install-chef.sh"]
"scripts": ["./scripts/postinstall.sh", "./scripts/install-vmware-tools.sh", "./scripts/install-virtualbox-tools.sh", "./scripts/install-chef.sh"]
}],
"post-processors": [{
"type": "vagrant",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment