diff options
author | Li-Wen Hsu <lwhsu@FreeBSD.org> | 2022-11-03 22:17:43 +0300 |
---|---|---|
committer | Li-Wen Hsu <lwhsu@FreeBSD.org> | 2022-11-03 22:17:43 +0300 |
commit | c711f3b453703824c40bec1896d79ddcbd901781 (patch) | |
tree | 2fe09d8b41fe45872ec0a2c20bac512db27b344e /release | |
parent | 4dfd380e06c515349c5cc55a1f05effbf3a44ba1 (diff) |
release/azure: Don't use azure-agent deprovision to build image
Deprovision feature of waagent is used for preparing to capture a
running VM and turn it into a VM image. Using it in the process of
building a VM image from scratch will cause some side effects such as
the hostname of the building host getting reset.
Remove calling the deprovision command and use a simpler way to fulfill
the requirements of the Azure VM image.
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'release')
-rw-r--r-- | release/tools/azure.conf | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/release/tools/azure.conf b/release/tools/azure.conf index a9126ed8c389..dd43260201aa 100644 --- a/release/tools/azure.conf +++ b/release/tools/azure.conf @@ -20,17 +20,19 @@ export NOSWAP=YES export VM_BOOTPARTSOFFSET=1M vm_extra_pre_umount() { + mount -t devfs devfs ${DESTDIR}/dev + # 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. - mount -t devfs devfs ${DESTDIR}/dev chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ /usr/sbin/pkg delete -f -y pkg - umount ${DESTDIR}/dev rm ${DESTDIR}/var/db/pkg/repo-*.sqlite - yes | chroot ${DESTDIR} ${EMULATOR} /usr/local/sbin/waagent -deprovision + chroot ${DESTDIR} ${EMULATOR} pw usermod root -h - + + umount ${DESTDIR}/dev cat << EOF >> ${DESTDIR}/etc/rc.conf ifconfig_hn0="SYNCDHCP" |