Skip to content

Instantly share code, notes, and snippets.

@zqidev
zqidev / macOS P2V on Apple Silicon.md
Last active October 5, 2025 20:56
P2V on Apple Silicon - Converting a Physical Apple Silicon MacBook to a Virtual Machine on another Apple Silicon device (M1, M2, M3) on Apple's Virtualization Framework

P2V on Apple Silicon - Converting a Physical Apple Silicon MacBook to a Virtual Machine on another Apple Silicon device (M1, M2, M3) on Apple's Virtualization Framework

Outline: Having recently bought a MacBook Pro (M3 Max) to replace my MacBook Air (M2), I decided it would be a good idea to start fresh and reinstall everything on my new Mac. However, I always like to keep a backup of my old data, so I thought it would be a good idea to virtualize my old machine on my new machine. Having much previous experience working with Windows P2V's (Physical to Virtual), I figured it would be as simple as Clone, Copy, Restore, and Boot. However, with the advent of Apple's new Signed System Volume, as well as the differences in file systems, APFS containers, and all, this ended up being a project that took about 2 days of nonstop researching, debugging, when I expected it to be a project which would last as long as it would take to clone my drive. I was very wrong. However, with all of my newfound knowledge in this s

@davidalger
davidalger / cloud-config.yaml
Created April 15, 2020 20:34
Automatically format and mount both EBS Volume devices and Amazon EC2 NVMe Instance Storage devices (ephemeral local storage) via cloud-init on Nitro instances running CentOS 7
#cloud-config
packages:
- epel-release # required for jq installation to succeed
write_files:
- path: /usr/local/bin/mount-scratch-disks
owner: root:root
permissions: '0700'
content: |
#!/bin/bash