From nobody Thu Nov 03 19:18:43 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4N3D7l4knjz4gVQk; Thu, 3 Nov 2022 19:18:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N3D7l4FYYz49X8; Thu, 3 Nov 2022 19:18:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667503123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kfEpj0XxIgNZTyxsZocyViVcypBmYw3yFeIqhkz0qEE=; b=moz64VUo1AnX4n0JZ5ACkyolroDl7ab6tbqdirZCZXajcFQqmoG96+s8GpiSacSS54Jy6/ h9r8WWTk0vadkw0Uin5kHnVo1E+K9vPlIxi5IJf+w74MVKTza2KFZ2BME/nIWWa6OTdpRH eX4WNCVyObXexxNTcMHdyqWULAu/MEwlmafTSwP/Yb7ovnIP3+wCrummsBYV247BGTmh/t 0wVWwvW5K3KS2nxquaC8unVbD/oI+srianf5E6iPQ3a5OwH6zvLzAvooYvzeUc6LtAl0nr omBvlJofH4f0PvQ7SKMYDuslDFxO4oxhB3z0MqBlVX+BCkdtPXs7Q1gcqeN6RQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4N3D7l382mznKm; Thu, 3 Nov 2022 19:18:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2A3JIhAa084334; Thu, 3 Nov 2022 19:18:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2A3JIhfT084332; Thu, 3 Nov 2022 19:18:43 GMT (envelope-from git) Date: Thu, 3 Nov 2022 19:18:43 GMT Message-Id: <202211031918.2A3JIhfT084332@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: c711f3b45370 - main - release/azure: Don't use azure-agent deprovision to build image List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c711f3b453703824c40bec1896d79ddcbd901781 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667503123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kfEpj0XxIgNZTyxsZocyViVcypBmYw3yFeIqhkz0qEE=; b=H1wT9EGecEYc2wjbpWpTz51LfU37QPaSRhU5L3cP8kSk/ZkwcJ2RiXQ6blJSjq2wQExwxD w9NFqVkYiVAlssrtZHqxOFmN+JqPzlkKjDSGaq9Q73LhOiPuF/zGuPxi1jyU+VAWkLTgXB Jm5BZFl6OJFZ1opzJ3TgmqWYbtChrXqU7IkZZlECZjasP9JNoWWB6R9eXjRGFz3Jq+Gfj0 eAMPCYgP9USW0VJhyhuh9NZMLhJ/sjyD2n17tNh0iSYETU/AsNjKHY8qpt6xlVn9BwjL/T NELZJeCmDs4ReS+le1Zr719JqdcHTogQgn6hkkHa3REsKckg/VcQQIoUguqtPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667503123; a=rsa-sha256; cv=none; b=l9+I6LRtJISnFX+DXqtk7ryxS8+WIbooc9oachWSMqdpCf5frqHlW2nKCmwmKdb5JwGF5m HA4lQYpiCq39GpQfG7Ji9rW7xKocThx4Keu979BJ1+wk38Crixmumy2aO3KaFfJ520DJ28 Os6SzzBB1ekRj0CDxhE8IMJ1Fp6YhbFdPGsdx7Cl9eQLsTD1tLvXot14kVmYrcAPiBgwG5 L2E3BRBLFd8dzMYtCZWxsu21t8WvqJBmIEUJft4p17kJWu6PhyLS+hGwTrQ7QUZ+Xp/emn yEpgrZ5hDbRDugke9V5dhaQSli46z6EcpBDrs50rdqMhPlxTzBaIxRxGVZGnKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=c711f3b453703824c40bec1896d79ddcbd901781 commit c711f3b453703824c40bec1896d79ddcbd901781 Author: Li-Wen Hsu AuthorDate: 2022-11-03 19:17:43 +0000 Commit: Li-Wen Hsu CommitDate: 2022-11-03 19:17:43 +0000 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 --- release/tools/azure.conf | 8 +++++--- 1 file 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"