lumeでmacOSの仮想環境を作成してみる
lumeを使ったmacOS上でmacOSの仮想環境を作成してみる
lumeのインストール
1# brewでインストール
2brew install lume
3
4# インストールの確認
5lume --version
60.2.52
ipswをダウンロード
ipsw(macOS)のイメージをまずダウンロード。
1lume ipsw
こんな感じでダウンロード用URLが表示されるのでURLをコピーしてcurlでダウンロード
1lume ipsw
2[2026-01-31T07:57:50Z] INFO: Fetching latest supported IPSW URL
3[2026-01-31T07:57:50Z] INFO: Found latest IPSW URL url=https://updates.cdn-apple.com/2025FallFCS/fullrestores/093-37399/E144C918-CF99-4BBC-B1D0-3E739B9A3F2D/UniversalMac_26.2_25C56_Restore.ipsw
4https://updates.cdn-apple.com/2025FallFCS/fullrestores/093-37399/E144C918-CF99-4BBC-B1D0-3E739B9A3F2D/UniversalMac_26.2_25C56_Restore.ipsw
5
6curl -L -o ~/Downloads/macos.ipsw "https://updates.cdn-apple.com/2025FallFCS/fullrestores/093-37399/E144C918-CF99-4BBC-B1D0-3E739B9A3F2D/UniversalMac_26.2_25C56_Restore.ipsw"
仮想環境(VM)の作成
デフォルトの設定でVMを作成するためのコマンド
1# macos-26-base という名前でmacOSのVMを~/Downloads/フォルダにあるmacos.ipswを使って作成
2lume create macos-26-base --os macos --ipsw ~/Downloads/macos.ipsw
この場合、以下の設定で作成される
| VMの保存場所 | ~/.lume |
|---|---|
| 解像度 | 1024x768 |
| CPU | 4コア |
| メモリ(RAM) | 8GB |
| ストレージ | 50GB |
VMのストレージを保存する場所を変更する(直接場所を指定する)
1# ストレージの保存場所を ~/VM にする
2lume create macos-26-base --os macos --ipsw ~/Downloads/macos.ipsw --storage ~/VM
ストレージの保管場所に名前を付け、デフォルトの保管場所を設定する
1# 外部SSD上に置きたいとき「external-ssd」という名前で保管場所を追加
2lume config storage add external-ssd /Volumes/ExternalSSD/lume
3
4# デフォルトの保管場所にする
5lume config storage default external-ssd
6
7# 保管場所の一覧
8lume config storage list
9
10# 保管場所の削除
11lume config storage remove old-location
12
13# 作成した保管場所でVMを作成する
14lume create macos-26-base --os macos --ipsw ~/Downloads/macos.ipsw --storage external-ssd
リソース(CPU,RAM,ストレージ)を変更する
1# CPU:8コア,RAM:16GB,ストレージ:100GB でVMを作成する
2lume create macos-26-base --os macos --ipsw ~/Downloads/macos.ipsw \
3 -cpu 8 \
4 --memory 16GB \
5 --disk-size 100GB
macOSの自動セットアップを有効にする
1# macOS 26のセットアップを自動で行う
2lume create macos-26-base --os macos --ipsw ~/Downloads/macos.ipsw --unattended tahoe
仮想環境(VM)の起動
1# 画面表示ありで起動 (VNCウインドウが開く)
2lume run macos-26-base
3
4# ヘッドレス(画面表示無し)で起動
5lume run macos-26-base --no-display
6
7# バックグランドで起動
8lume run macos-26-base > /dev/null 2>&1 &
ホストとのファイル共有
1# ~/project フォルダをVMに共有(VMからは`/Volumes/My Shared Files`でアクセスできる)
2lume run macos-26-base --shared-dir ~/project
その他の操作コマンド
1# VMの一覧表示
2lume ls
3
4# VMの詳細
5lume get macos-26-base
6
7# VMを停止
8lume stop macos-26-base
9
10# VMを複製
11lume clone macos-26-base macos-26-dev
12
13# VMを削除
14lume delete macos-26-base
VMへSSH接続
まず、VM上で「システム設定」→「一般」→「共有」→「リモートログイン」をON二しておく。 その後、VMのIPアドレスを取得し、SSHコマンドで接続
1# IPアドレスを取得
2lume get macos-26-dev
3
4# SSH接続
5ssh ship@192.168.64.3
6(ship@192.168.64.3) Password: (パスワードを入力)
使用してみた所感
VMを作成した後起動してみると、macOSのセットアップ画面となり、セットアップを完了すると見慣れたMacのデスクトップが現れた。 操作感は悪くない。多少もっさりしているが許容範囲内と感じた。 今後は使い捨てできる環境として使っていこうと思う。