VirtualBox 6.1.6でゲストOSの画面が自動リサイズされない場合の対応策(Kali Linux 2020.1版)
VirtualBox上でOVAファイルからKali Linux 2020.1をインストールし、パッケージをアップデートしたところ「ゲストOSの画面を自動リサイズ」が効かなくなった。
動作環境
- ホストOS: Windows 10 Pro 1903
- ゲストOS: Kali Linux 2020.1 (5.5.0-kali2-amd64)
- VirtualBox Guest Additions 6.1.6-dfsg-1
- 仮想環境: VirtualBox 6.1.6 r137129 (Qt5.6.2)
ネット上では「virtualbox-guest-utilsの再インストール」や「VirtualBox側のグラフィックスコントローラをVMSVGAからVBoxVGAへ変更」で直るとの情報が多数掲載されており、そのどちらも実行したが直ることはなかった。
更にVirtualBoxのバグを調査すると以下のチケットを発見した。
更にVirtualBoxのバグを調査すると以下のチケットを発見した。
33番目のコメントには「VBoxGuestAdditions_6.1.7-137891で直ったよ」との情報が記載されていたので早速試してみた。
手順
事前準備
- VirtualBox test buildsへアクセス
- Latest 6.1.x test buildsからGuest AdditionsのISOイメージをダウンロード
- VirtualBoxゲストOS実行画面のプルダウンメニューから「デバイス->光学ドライブ->ディスクファイルを選択」をクリック
- 先程ダウンロードしたISOイメージを選択
ゲストOS側作業
- インストール済のVirtualBox Guest AdditionsをRemove
kali@kali:~$ sudo apt-get remove virtualbox-guest-utils virtualbox-guest-dkms
- ゲストOS再起動
- ゲストOSユーザログイン
- Terminal上でCD-ROMをマウント
kali@kali:~$ sudo mount -o exec /media/cdrom0 [sudo] password for kali: mount: /media/cdrom0: WARNING: device write-protected, mounted read-only.
- VirtualBox Guest Additions手動インストール
kali@kali:~$ sudo /media/cdrom0/VBoxLinuxAdditions.run Verifying archive integrity... All good. Uncompressing VirtualBox 6.1.7 Guest Additions for Linux........ VirtualBox Guest Additions installer ./install.sh: 143: VBoxControl: not found This system appears to have a version of the VirtualBox Guest Additions already installed. If it is part of the operating system and kept up-to-date, there is most likely no need to replace it. If it is not up-to-date, you should get a notification when you start the system. If you wish to replace it with this version, please do not continue with this installation now, but instead remove the current version first, following the instructions for the operating system. If your system simply has the remains of a version of the Additions you could not remove you should probably continue now, and these will be removed during installation. Do you wish to continue? [yes or no] yes
- 「yes」を入力し実行。
touch: cannot touch '/var/lib/VBoxGuestAdditions/skip-5.4.0-kali3-amd64': No such file or directory touch: cannot touch '/var/lib/VBoxGuestAdditions/skip-5.5.0-kali2-amd64': No such file or directory 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「VirtualBox Guest Additions: Running kernel modules will not be replaced until the system is restarted」が確認できればインストール完了。VirtualBox Guest Additions: or VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup all VirtualBox Guest Additions: Building the modules for kernel 5.5.0-kali2-amd64. update-initramfs: Generating /boot/initrd.img-5.5.0-kali2-amd64 VirtualBox Guest Additions: Running kernel modules will not be replaced until the system is restarted
- ゲストOS再起動
- ゲストOSユーザログイン
- VirtualBoxゲストOS実行画面のプルダウンメニューから「表示->ゲストOSの画面を自動リサイズ」をクリック(もしくは有効であることを確認)
以上の手順で「ゲストOSの画面を自動リサイズ」が正常動作することを確認できた。 VirtualBox Guest Additions 6.1.6と画面の自動リサイズは相性が悪いようだ。
なお、インストールされたVirtualBox Guest AdditionsはVBoxControl --versionコマンドで確認可能。今回は「6.1.7r137891」と出力された。
(おまけ) VirtualBox Guest Additions手動アンインストール
- VirtualBox Guest AdditionsのISOファイルをマウント
- VirtualBox Guest Additions手動アンインストール実行
kali@kali:~$ sudo /media/cdrom0/VBoxLinuxAdditions.run uninstall Verifying archive integrity... All good. Uncompressing VirtualBox 6.1.7 Guest Additions for Linux........ VirtualBox Guest Additions installer Removing installed version 6.1.7 of VirtualBox Guest Additions... update-initramfs: Generating /boot/initrd.img-5.5.0-kali2-amd64
- ゲストOS再起動
- ゲストOSユーザログイン
以上でVirtualBox Guest Additions手動アンインストールは完了。
コメント
コメントを投稿