From nobody Sat Jul 30 22:07:23 2022 X-Original-To: freebsd-cloud@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 4LwJQm08WDz4Xs35 for ; Sat, 30 Jul 2022 22:07:28 +0000 (UTC) (envelope-from pat@patmaddox.com) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4LwJQl00WDz471G for ; Sat, 30 Jul 2022 22:07:26 +0000 (UTC) (envelope-from pat@patmaddox.com) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C32B05C0052; Sat, 30 Jul 2022 18:07:25 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sat, 30 Jul 2022 18:07:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=patmaddox.com; h=cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm2; t=1659218845; x=1659305245; bh=Bp2qAXuFww bBcLuJ/iXqYFAab1D+UDoekZzrczvJRog=; b=As0XoKfwpWcFwcVwt1SergwmeN 2nWJYjwu2UgnAOMIZ++mzLFEFX0hLRc17oAu3QaDtIJMDOjMLEmAm9SS+6rgxVQR SAlQLMAGZ1DpJmMSOMMpheb8TqojCFnffI3CPeqiJLaP1Z0d2kPn7KjqjgKoGHy3 QNnmsTWD8hV6xPyFgMj/G1fyvxedPz8CcHKitL9l0BMd9eMI00c5ojroXk1wmZNs ++1yJeeOig9uvg1muttsvT6KVo8opqQd3pxSO/g9pxoF7KJjk6JXykfynC7GfF4B bhNMg1LJExOEGRRH5b7WPi15nm0XtSk2ZsIlIxefLPA8Ne+S+WvEBUOdLtnA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1659218845; x=1659305245; bh=Bp2qAXuFwwbBcLuJ/iXqYFAab1D+ UDoekZzrczvJRog=; b=QK+j8brqr9uoFwNPgdxVQuuCT59UyWIbM3ALZkHOWP8G I55ZPXQeNaU83VfJrL7uHCbotdVf4W41zs2l/bAIGvXUiQOPhA8UDKXC2/weLBzh AWph7lP452x0LKL6//qTh4DvTP3JAWSXJT3yPmDpHs6jvgS9TPwB3tbeeLpkWjFZ n2REQJ7OlzpfWBuGiQQTDQtc+ZtMy/BTe3oOdhAtiFz94OXvLJ4nrbjy++/f9SG4 mVWlKnLKKXR+OgVt3qf6e4HzRS9Dfw50SK4aNWwktGQryxxGzLR82MrQmpjboyyx CixY6KY6fBvGSr9KYirDyOet6y8PcwXCkkpbdmfB5A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvddvtddgtdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffokfggtgfgsehtkehmtd ertdejnecuhfhrohhmpedfrfgrthcuofgrugguohigfdcuoehprghtsehprghtmhgruggu ohigrdgtohhmqeenucggtffrrghtthgvrhhnpeegheeugfekffejudelueegteevueefve dvfeejtedvkefhtdeujedtueeifeekieenucffohhmrghinhepghhithhhuhgsrdgtohhm necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgrth esphgrthhmrgguughogidrtghomh X-ME-Proxy: Feedback-ID: i8b6c40f9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sat, 30 Jul 2022 18:07:25 -0400 (EDT) From: "Pat Maddox" To: freebsd-cloud@FreeBSD.org Subject: GCP ZFS-on-Root (working, and some questions) Date: Sat, 30 Jul 2022 15:07:23 -0700 X-Mailer: MailMate (1.13.2r5673) Message-ID: <360A7428-8A37-428D-BACE-6335A7AA6554@patmaddox.com> List-Id: FreeBSD on cloud platforms (EC2, GCE, Azure, etc.) List-Archive: https://lists.freebsd.org/archives/freebsd-cloud List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-cloud@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4LwJQl00WDz471G X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=patmaddox.com header.s=fm2 header.b=As0XoKfw; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=QK+j8brq; dmarc=none; spf=pass (mx1.freebsd.org: domain of pat@patmaddox.com designates 66.111.4.26 as permitted sender) smtp.mailfrom=pat@patmaddox.com X-Spamd-Result: default: False [-4.70 / 15.00]; DWL_DNSWL_LOW(-1.00)[messagingengine.com:dkim]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[patmaddox.com:s=fm2,messagingengine.com:s=fm3]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.26]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[66.111.4.26:from]; RWL_MAILSPIKE_GOOD(-0.10)[66.111.4.26:from]; FREEFALL_USER(0.00)[pat]; PREVIOUSLY_DELIVERED(0.00)[freebsd-cloud@freebsd.org]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[patmaddox.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[patmaddox.com:+,messagingengine.com:+]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_NONE(0.00)[]; ARC_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:19151, ipnet:66.111.4.0/24, country:US]; MLMMJ_DEST(0.00)[freebsd-cloud@FreeBSD.org] X-ThisMailContainsUnwantedMimeParts: N Hey there, I have taken some of the concepts and scripts that Colin used to make the AWS AMI Builder (thank you!!), and used them to configure a ZFS-on-Root image for GCP. Here’s the script: https://gist.github.com/patmaddox/1a0be973ecfce4f056c517abb7746286 I did it slightly differently from the AMI builder. Instead of working in a mem disk, I just fetch base.txz and expand it to a dir, edit the files, etc. One other difference is that because base.txz doesn’t include a kernel, I `cp -Rp /boot/kernel/ /mnt/boot/kernel/`. It boots, I can SSH and do all the usual things, so far I am very happy. My questions: 1. Is there anything I might be missing with the approach of extracting base.txz, and copying over the current instance’s kernel? 2. If I change the GCP disk size and reboot, the partition table is corrupt. I need to `geom part recover da0 && geom part resize -i 2 da0` to resize it. How can I have that happen automatically during the boot process, the way that the AMI does? Pat