{"id":47410,"date":"2025-04-15T13:26:25","date_gmt":"2025-04-15T17:26:25","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=47410"},"modified":"2025-04-25T09:50:45","modified_gmt":"2025-04-25T13:50:45","slug":"how-disk-images-and-vms-are-more-efficient","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2025\/04\/15\/how-disk-images-and-vms-are-more-efficient\/","title":{"rendered":"How Disk Images and VMs Are More Efficient"},"content":{"rendered":"<p><a href=\"https:\/\/eclecticlight.co\/2025\/04\/09\/how-disk-images-and-vms-are-more-efficient\/\">Howard Oakley<\/a>:<\/p>\n<blockquote cite=\"https:\/\/eclecticlight.co\/2025\/04\/09\/how-disk-images-and-vms-are-more-efficient\/\">\n<p>What happens with an Apple silicon VM is a bit more complicated, and harder to observe. This time the virtualisation app should create the disk image inside the VM bundle as a sparse file to begin with, then copy into that what&rsquo;s needed for the VM, so skipping the first mount stage and Trimming during the second mount.<\/p>\n<p>The result is the same, though, with a 350 GB VM taking just 22 GB on disk. Inspect that disk image using my free utility <a href=\"https:\/\/eclecticlight.co\/taccy-signet-precize-alifix-utiutility-alisma\/\">Precize<\/a>, and you&rsquo;ll see that economy confirmed, and the Sparse File flag set.<\/p>\n<\/blockquote>\n<p>He has a summary of the requirements for &ldquo;plain read-write disk images and those inside VMs to be sparse files.&rdquo;<\/p>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2024\/10\/16\/disk-images-in-sequoia\/\">Disk Images in Sequoia<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2021\/03\/30\/sparse-files-are-common-in-apfs\/\">Sparse Files Are Common in APFS<\/a><\/li>\n<\/ul>\n\n<p id=\"how-disk-images-and-vms-are-more-efficient-update-2025-04-25\">Update (<a href=\"#how-disk-images-and-vms-are-more-efficient-update-2025-04-25\">2025-04-25<\/a>): <a href=\"https:\/\/eclecticlight.co\/2025\/04\/24\/how-disk-images-can-become-sparse-files\/\">Howard Oakley<\/a>:<\/p>\n<blockquote cite=\"https:\/\/eclecticlight.co\/2025\/04\/24\/how-disk-images-can-become-sparse-files\/\"><p>Read-write disk images are created as normal files. They&rsquo;re Trimmed by APFS on each subsequent mount, and may then become sparse files when there&rsquo;s sufficient unused space in them.<\/p><p>VM disk images are created as sparse files. They&rsquo;re Trimmed by APFS in the VM during each boot and on demand, maintaining their sparse format when they have sufficient unused space.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Howard Oakley: What happens with an Apple silicon VM is a bit more complicated, and harder to observe. This time the virtualisation app should create the disk image inside the VM bundle as a sparse file to begin with, then copy into that what&rsquo;s needed for the VM, so skipping the first mount stage and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2025-04-15T17:26:28Z","apple_news_api_id":"5c080d5d-722e-44df-bf04-bc9f4ea8c229","apple_news_api_modified_at":"2025-04-25T13:50:47Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/AXAgNXXIuRN-_BLyfTqjCKQ","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[1395,1396,30,2598,2251],"class_list":["post-47410","post","type-post","status-publish","format-standard","hentry","category-technology","tag-apple-file-system-apfs","tag-disk-image","tag-mac","tag-macos-15-sequoia","tag-virtualization"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/47410","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=47410"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/47410\/revisions"}],"predecessor-version":[{"id":47495,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/47410\/revisions\/47495"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=47410"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=47410"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=47410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}