Changeset View
Changeset View
Standalone View
Standalone View
release/tools/azure.conf
| Show All 13 Lines | |||||
| # No swap space; waagent will allocate swap space on the resource disk. | # No swap space; waagent will allocate swap space on the resource disk. | ||||
| # See ResourceDisk.EnableSwap and ResourceDisk.SwapSizeMB in waagent.conf | # See ResourceDisk.EnableSwap and ResourceDisk.SwapSizeMB in waagent.conf | ||||
| export NOSWAP=YES | export NOSWAP=YES | ||||
| # https://learn.microsoft.com/en-us/partner-center/marketplace/azure-vm-certification-faq#vm-images-must-have-1-mb-of-free-space | # https://learn.microsoft.com/en-us/partner-center/marketplace/azure-vm-certification-faq#vm-images-must-have-1-mb-of-free-space | ||||
| export VM_BOOTPARTSOFFSET=1M | export VM_BOOTPARTSOFFSET=1M | ||||
| vm_extra_pre_umount() { | vm_extra_pre_umount() { | ||||
| # Remove the pkg package and repo databases as they will likely | |||||
| # be out of date by the time the image is used. In unprivileged | |||||
| # builds this is unnecessary as pkg will not be installed to | |||||
| # begin with. | |||||
| if [ -z "${NO_ROOT}" ]; then | |||||
| mount -t devfs devfs ${DESTDIR}/dev | mount -t devfs devfs ${DESTDIR}/dev | ||||
| # The firstboot_pkgs rc.d script will download the repository | # The firstboot_pkgs rc.d script will download the repository | ||||
| # catalogue and install or update pkg when the instance first | # catalogue and install or update pkg when the instance first | ||||
| # launches, so these files would just be replaced anyway; removing | # launches, so these files would just be replaced anyway; removing | ||||
| # them from the image allows it to boot faster. | # them from the image allows it to boot faster. | ||||
| chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ | chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ | ||||
| /usr/sbin/pkg delete -f -y pkg | /usr/sbin/pkg delete -f -y pkg | ||||
| umount ${DESTDIR}/dev | |||||
| rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports | rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports | ||||
| rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports-kmods | rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports-kmods | ||||
| fi | |||||
| chroot ${DESTDIR} ${EMULATOR} pw usermod root -h - | pw -R ${DESTDIR} usermod root -h - | ||||
| umount ${DESTDIR}/dev | |||||
| cat << EOF >> ${DESTDIR}/etc/rc.conf | cat << EOF >> ${DESTDIR}/etc/rc.conf | ||||
| ifconfig_hn0="SYNCDHCP" | ifconfig_hn0="SYNCDHCP" | ||||
| ntpd_sync_on_start="YES" | ntpd_sync_on_start="YES" | ||||
| EOF | EOF | ||||
| cat << EOF >> ${DESTDIR}/boot/loader.conf | cat << EOF >> ${DESTDIR}/boot/loader.conf | ||||
| autoboot_delay="-1" | autoboot_delay="-1" | ||||
| beastie_disable="YES" | beastie_disable="YES" | ||||
| loader_logo="none" | loader_logo="none" | ||||
| hw.memtest.tests="0" | hw.memtest.tests="0" | ||||
| console="comconsole efi vidconsole" | console="comconsole efi vidconsole" | ||||
| comconsole_speed="115200" | comconsole_speed="115200" | ||||
| boot_multicons="YES" | boot_multicons="YES" | ||||
| boot_serial="YES" | boot_serial="YES" | ||||
| mlx4en_load="YES" | mlx4en_load="YES" | ||||
| mlx5en_load="YES" | mlx5en_load="YES" | ||||
| EOF | EOF | ||||
| metalog_add_data ./boot/loader.conf | |||||
| return 0 | return 0 | ||||
| } | } | ||||