CLOVER🍀

That was when it all began.

Ubuntu Linux 24.04 LTSにVirtualBox 7.1をaptでインストールする

これは、なにをしたくて書いたもの?

Ubuntu Linux 24.04 LTSにVirtualBox 7.1をインストールしようかなということで。

VirtualBox

VirtualBoxのWebサイトはこちら。

Oracle VirtualBox

なんか、だいぶ見た目が変わった気がします…。

ダウンロードページはこちら。

Linux_Downloads – Oracle VirtualBox

debパッケージもあるのですが、このページ内の「Debian-based Linux distributions」に沿って進めていきたいと思います。

環境

今回の環境はこちら。Ubuntu Linux 24.04 LTSです。

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.1 LTS
Release:        24.04
Codename:       noble



$ uname -srvmpio
Linux 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec  5 13:09:44 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

動作確認はVagrantを使うことにします。

$ vagrant version
Installed Version: 2.4.3
Latest Version: 2.4.3

You're running an up-to-date version of Vagrant!

VirtualBoxをインストールする

では、こちらのページに沿ってVirtualBoxをインストールしていきます。

Linux_Downloads – Oracle VirtualBox

リポジトリーの取り込み方は、少しカスタマイズしてこんな感じに。

$ echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list```

GPG鍵の登録。

$ wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg --dearmor

リポジトリー情報の更新。

$ sudo apt update

VirtualBoxをインストール。

$ sudo apt install virtualbox-7.1

セキュアブートを有効にしていると、実質使い物にならなくなるので無効にしておいてください。

インストールされました。

$ VBoxManage --version
7.1.6r167084

動作確認はVagrantで行います。VirtualBox ProviderのBoxを適当に選択。

$ vagrant init gbailey/al2023

起動。

$ vagrant up

OKですね。

$ vagrant status
Current machine states:

default                   running (virtualbox)

The VM is running. To stop this VM, you can run `vagrant halt` to
shut it down forcefully, or you can run `vagrant suspend` to simply
suspend the virtual machine. In either case, to restart it again,
simply run `vagrant up`.

これでUbuntu Linux 24.04 LTSでVirtualBoxを使えるようになりました。