Increase disk size of a UTM macOS VM and expand its APFS container 0 ▲ tinyapps.org 57 days ago · 10 min read2040 words · Tech · hide · Fediverse post Increasing a UTM virtual disk's size does not automatically expand the guest's APFS container. If a Recovery partition lies between the container's partition and the added free space, it blocks direct expansion. This Codex/Astra-crafted script uses Python 3.9+ standard library and macOS diskutil, cp, and lsof; no pip packages, Go, Homebrew, or QEMU are required. It targets macOS 26+ with diskutil image support and an APFS host filesystem for copy-on-write backups: #!/usr/bin/env python3 # Grow an offline Apple Silicon UTM image. Python stdlib + macOS diskutil/cp. import argparse import hashlib import json import os from pathlib import Path import plistlib import re import struct import subprocess import sys import uuid import zlib RECOVERY = uuid.UUID('52637672-7900-11aa-aa11-00306543ecac').bytes_le APFS = uuid.UUID('7c3457ef-0000-11aa-aa11-00306543ecac').bytes_le ISC = uuid.UUID('69646961-6700-11aa-aa11-00306543ecac').bytes_le CHUNK = 8 * 1024 * 1024 def require(ok, message): if not… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town