総数:13 今日:1 昨日:0
参考url
Rocky on VirtualBox
ゲストOS に「VirtualBox Guest Additions」をインストール
installing virtualbox on ubuntu desktop 24.04.2
2025/05/28
バージョン 7.1.8r168469
https://ftp.iij.ad.jp/pub/linux/rocky/8/isos/x86_64/ からダウンロードする。
https://ftp.iij.ad.jp/pub/linux/rocky/8/isos/x86_64/Rocky-8.10-x86_64-dvd1.iso
~/Downloads$ ls -la 合計 14008716 drwxr-xr-x 2 ryu ryu 4096 5月 28 10:16 . drwxr-x--- 19 ryu ryu 4096 5月 28 09:46 .. -rw-rw-r-- 1 ryu ryu 22973798 5月 28 09:32 Oracle_VirtualBox_Extension_Pack-7.1.8.vbox-extpack -rw-rw-r-- 1 ryu ryu 14213840896 5月 28 10:16 Rocky-8.10-x86_64-dvd1.iso ★ -rw-rw-r-- 1 ryu ryu 108093464 5月 27 15:03 virtualbox-7.1_7.1.8-168469~Ubuntu~noble_amd64.deb
| 設定項目 | 設定内容 |
| 名前 | Rocky Linux 8.10 |
| Folder | /home/<username>/VirtualBox VMs |
| ISO Image | 未選択状態 |
| タイプ | Linux |
| Subtype | Red Hat |
| バージョン | Red Hat(64-bit) |
| 設定項目 | 設定内容 |
| メインメモリー | 8192 MB |
| Processors | 4 CPU |
| 設定項目 | 設定内容 |
| Create a Virtual Hard Disk Now ラジオボタン | 選択する |
| Disk Size | 128 GB |
| Pre-allocate Full Size | チェックする |
| 設定項目 | 設定内容 |
| クリップボードの共有 | 双方向 を選択する。 |
| ドラッグ&ドロップ | 双方向 を選択する。 |
| 設定項目 | 設定内容 |
| プロセッサー数 | 適切な個数を選択する。例)2 |
| 設定項目 | 設定内容 |
| 割り当て | ブリッジアダプター を選択 |
| 設定項目 | 設定内容 |
| フォルダーのパス | VM側のディレクトリ名を指定 例)~/shared_with_guests |
| フォルダー名 | VM側のディレクトリ名を指定 例)shared_with_host |
| マウントポイント | 空白 |
| 自動マウント | チェック状態 にする。 |
Tokyo
あなたの名前: 例 コンピューターの名前: ubdt2204vbox0 ユーザー名の入力: <''username''> パスワードの入力: ''password'' パスワードの確認: ''password''
ログイン直後のデスクトップ画面が表示された状態 にて
$ pwd /media/<username>/VBox_GAs_7.0.10 ←(自動マウント時の位置)
$ sudo ./VBoxLinuxAdditions.run
[sudo] パスワード: Verifying archive integrity... All good. Uncompressing VirtualBox 6.0.14 Guest Additions for Linux........ VirtualBox Guest Additions installer Copying additional installer modules ... Installing additional modules ... VirtualBox Guest Additions: Starting. VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules. This may take a while. VirtualBox Guest Additions: To build modules for other installed kernels, run VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup <version> VirtualBox Guest Additions: or VirtualBox Guest Additions: /sbin/rcvboxadd quic-rw-rw-r-- 1 ryu ryu 14213840896 5月 24 13:28 Rocky-8.10-x86_64-dvd1.isoksetup all VirtualBox Guest Additions: Building the modules for kernel 5.0.0-23-generic. This system is currently not set up to build kernel modules. Please install the gcc make perl packages from your distribution. VirtualBox Guest Additions: Running kernel modules will not be replaced until the system is restarted Press Return to close this window...
$ sudo apt update
$ sudo apt upgrade
$ sudo apt install gcc make perl
再度挑戦!
$ pwd /media/<username>/VBox_GAs_7.0.10 ←(自動マウント時の位置)
$ sudo ./VBoxLinuxAdditions.run
[sudo] パスワード: Verifying archive integrity... All good. Uncompressing VirtualBox 6.0.14 Guest Additions for Linux........ VirtualBox Guest Additions installer Removing installed version 6.0.14 of VirtualBox Guest A-rw-rw-r-- 1 ryu ryu 14213840896 5月 24 13:28 Rocky-8.10-x86_64-dvd1.isodditions... Copying additional installer modules ... Installing additional modules ... VirtualBox Guest Additions: Starting. VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules. This may take a while. VirtualBox Guest Additions: To build modules for other installed kernels, run VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup <version> VirtualBox Guest Additions: or[[Memorandums]] VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup all VirtualBox Guest Additions: Building the modules for kernel 5.0.0-23-generic. update-initramfs: Generating /boot/initrd.img-5.0.0-23-generic I: The initramfs will attempt to resume from /dev/dm-1 I: (/dev/mapper/ubuntu--vg-swap_1) I: Set the RESUME variable to override this. VirtualBox Guest Additions: Running kernel modules will not be replaced until the system is restarted Press Return to close this window...
~$ ls -la /media/
合計 16 drwxr-xr-x 4 root root 4096 7月 31 16:54 . drwxr-xr-x 20 root root 4096 7月 31 14:01 .. drwxr-x---+ 2 root root 4096 7月 31 20:02 ryu drwxrwx--- 1 root vboxsf 4096 7月 30 15:08 sf_shared_with_host
~$ groups <username> <username> : <username> adm cdrom sudo dip plugdev lpadmin sambashare
~$ sudo gpasswd -a <username> vboxsf ユーザ <username> をグループ vboxsf に追加
~$ groups <username> <username> : <username> adm cdrom sudo dip plugdev lpadmin sambashare vboxsf