aboutsummaryrefslogtreecommitdiff
path: root/release/tools
diff options
context:
space:
mode:
Diffstat (limited to 'release/tools')
-rw-r--r--release/tools/vagrant-virtualbox.conf18
-rw-r--r--release/tools/vagrant-vmware.conf22
-rw-r--r--release/tools/vagrant.conf10
3 files changed, 42 insertions, 8 deletions
diff --git a/release/tools/vagrant-virtualbox.conf b/release/tools/vagrant-virtualbox.conf
new file mode 100644
index 000000000000..ff14674ca708
--- /dev/null
+++ b/release/tools/vagrant-virtualbox.conf
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+. ${WORLDDIR}/release/tools/vagrant.conf
+
+export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} virtualbox-ose-additions"
+
+vm_extra_pre_umount () {
+ # VirtualBox first boot pkgs
+ echo 'firstboot_pkgs_list="sudo rsync virtualbox-ose-additions"' >> ${DESTDIR}/etc/rc.conf
+ echo 'vboxguest_enable="YES"' >> ${DESTDIR}/etc/rc.conf
+ echo 'vboxservice_enable="YES"' >> ${DESTDIR}/etc/rc.conf
+
+ # Setup the Vagrant common items
+ vagrant_common
+}
diff --git a/release/tools/vagrant-vmware.conf b/release/tools/vagrant-vmware.conf
new file mode 100644
index 000000000000..330892bc7b85
--- /dev/null
+++ b/release/tools/vagrant-vmware.conf
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+. ${WORLDDIR}/release/tools/vagrant.conf
+
+export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} open-vm-tools-nox11"
+
+vm_extra_pre_umount () {
+ # VMWare first boot pkgs
+ echo 'firstboot_pkgs_list="sudo rsync open-vm-tools-nox11"' >> ${DESTDIR}/etc/rc.conf
+
+ echo 'vmware_guest_vmblock_enable="YES"' >> ${DESTDIR}/etc/rc.conf
+ echo 'vmware_guest_vmhgfs_enable="YES"' >> ${DESTDIR}/etc/rc.conf
+ echo 'vmware_guest_vmmemctl_enable="YES"' >> ${DESTDIR}/etc/rc.conf
+ echo 'vmware_guest_vmxnet_enable="YES"' >> ${DESTDIR}/etc/rc.conf
+ echo 'vmware_guestd_enable="YES"' >> ${DESTDIR}/etc/rc.conf
+
+ # Setup the Vagrant common items
+ vagrant_common
+}
diff --git a/release/tools/vagrant.conf b/release/tools/vagrant.conf
index 7e629caa4549..159da4fa21a9 100644
--- a/release/tools/vagrant.conf
+++ b/release/tools/vagrant.conf
@@ -10,17 +10,14 @@ export VM_EXTRA_PACKAGES="firstboot-freebsd-update firstboot-pkgs"
# Set to a list of third-party software to enable in rc.conf(5).
export VM_RC_LIST="firstboot_freebsd_update firstboot_pkgs"
-vm_extra_pre_umount() {
+vagrant_common () {
# The firstboot_pkgs rc.d script will download the repository
# catalogue and install or update pkg when the instance first
# launches, so these files would just be replaced anyway; removing
# them from the image allows it to boot faster.
env ASSUME_ALWAYS_YES=yes pkg -c ${DESTDIR} delete -f -y pkg
rm ${DESTDIR}/var/db/pkg/repo-*.sqlite
-
- # The size of the EC2 root disk can be configured at instance launch
- # time; expand our filesystem to fill the disk.
- echo 'growfs_enable="YES"' >> ${DESTDIR}/etc/rc.conf
+ env ASSUME_ALWAYS_YES=yes pkg -c ${DESTDIR} clean -y -a
# Vagrant instances use DHCP to get their network configuration.
echo 'ifconfig_DEFAULT="SYNCDHCP"' >> ${DESTDIR}/etc/rc.conf
@@ -36,9 +33,6 @@ vm_extra_pre_umount() {
echo 'sendmail_outbound_enable="NO"' >> ${DESTDIR}/etc/rc.conf
echo 'sendmail_msp_queue_enable="NO"' >> ${DESTDIR}/etc/rc.conf
- # sudo is required
- echo 'firstboot_pkgs_list="sudo rsync"' >> ${DESTDIR}/etc/rc.conf
-
# Create the vagrant user with a password of vagrant
/usr/sbin/pw -R ${DESTDIR} \
groupadd vagrant -g 1001