Ubuntu Server 24.04 を VirtualBox にインストール
VirtualBox7.1がリリースされて、ようやくApple SiliconのPCでもVirtualBoxが利用できるようになりましたので、早速 Ubuntu Server 24.04 をインストールしてみました。
こちら 「to skip startup.nsh or any other key to continue.」 の対応方法 の記事のようにamdとarmを間違えないようお気をつけください。
環境
- Chip: Apple M2 Max
- macOS: Sequoia 15.0.1
- VirtualBox: 7.1.4
- Ubuntu: Ubuntu Server 24.04
インストール手順
ISOイメージ準備
まずはarm版をダウンロード Ubuntu Server for ARM。

VirtualBoxのVM作成
新規を選択。

名前とオペレーティングシステム
- ISOイメージ:先ほどダウンロードしたISOイメージを選択
- 自動インストールをスキップ:チェック

自動インストール
- 指定なし

ハードウェア
- 要件に合わせて設定

ハードディスク
- 要件に合わせて設定

完了を押すと画面が戻るので起動を選択。

Ubuntu Server 24.04 インストール
Try or Install Ubuntu Serverを選択。

起動画面に変わるのでしばらく待機。

設定する言語を選択。

最新のバージョンにアップデートするかの確認。今回はContinue without updatingを選択。

キーボードのレイアウトを選択。

インストールタイプを選択。

ネットワーク設定の確認。今回はデフォルトのまま。

プロキシアドレスの確認。今回はデフォルトのまま。

Ubuntuパッケージのミラーサイトを設定。ここでは日本国内のダウンロードサイトからメンテナンスをJapanese Teamが担当している富山大学のサイトを登録。

ストレージの設定。構成はデフォルトのまま。ここではDBも運用する想定のため暗号化を設定。

ストレージ設定の確認。問題なければDoneを選択。

Diskフォーマットの確認。問題なければCountinueを選択。

プロファイル設定。ユーザ名・サーバー名などほ入力。

Ubuntu Proにアップグレードするかの確認。ここではしないのスキップを選択。

記事執筆時点で、VirtualBoxのGuest Additionsによるクリップボード共有が成功していないため、OpenSSH serverをインストール。

必要なパッケージをインストール。ここでは何もインストールしないでDoneを選択。

インストール開始。

再起動。

エンターキーを押す。

サーバ起動中。

起動完了。

VirtualBoxのポートフォワーディング設定
ここではSSHで接続できるように設定していきます。
VMを選択して設定を選択。

ネットワークのポートフォワーディングを選択。

ホストポート2222をゲストポート22にフォワーディングするよう登録。

VMの設定変更を保存。

ターミナルで接続できることを確認。
% ssh -p 2222 ubuntu@localhost
The authenticity of host '[localhost]:2222 ([127.0.0.1]:2222)' can't be established.
ED25519 key fingerprint is SHA256:YYjmbsxcdOhVxrxXj1NrrHzbf34jP02TrwGcXtmFAW4.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '[localhost]:2222' (ED25519) to the list of known hosts.
ubuntu@localhost's password:
Welcome to Ubuntu 24.04.1 LTS (GNU/Linux 6.8.0-48-generic aarch64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/pro
System information as of Mon Nov 11 02:44:06 AM UTC 2024
System load: 0.0
Usage of /: 40.1% of 10.69GB
Memory usage: 8%
Swap usage: 0%
Processes: 97
Users logged in: 0
IPv4 address for enp0s8: 10.0.2.15
IPv6 address for enp0s8: fd00::a00:27ff:fe75:9a62
Expanded Security Maintenance for Applications is not enabled.
45 updates can be applied immediately.
To see these additional updates run: apt list --upgradable
Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
最後に
- 執筆時点でVirtualBoxのGuest Additionsのクリップボード共有設定が成功しないので調査中となります。成功したら共有させて頂きます。
Discussion