Fedora 33でVirtualBox 6.1をインストールする


私は最近、私のサーバーがストレージドライバを持っているいくつかの問題のためにFedora用のCNTOS 8を変更しました(古いDell RAIDドライバはCNTOS 8ではサポートされていませんので、どんなアップデートでも悪夢のビットでした.)
私はVirtualBoxで放浪者を使用しようとしていたので、私はまだそれをチェックしようとした多くのチェックを行うまで、私はVirtualBoxのサポートがないことを実現しました.
私はガイドのカップルを見つけた.
VirtualBox 6.1 on Fedora 33/32, CentOS/RHEL 8.2/7.8
Install VirtualBox 6.1 on Fedora 33
どちらも非常に似ています、そして、それらの両方で、あなたはデフォルトのPython VirtualBoxを使用しようとするためにRPMを修正する必要があります.
しかし、それはあなたが直面することができた唯一の問題ではないので、私は次の時間を覚えておくためにこれを投稿することを決めたが、次の時間私はVirtualBoxをインストールしようとすると、我々はFedora
まず最初に必要とするのは、libvirtを無効にして衝突を防ぎ、全てのパッケージを更新することです(これは実際には"間違い"ですが、解決できないものはありません)
|=| server in ~ ○ → sudo systemctl stop libvirtd-admin.socket
|=| server in ~ ○ → sudo systemctl stop libvirtd.socket
|=| server in ~ ○ → sudo systemctl stop libvirtd-ro.socket
|=| server in ~ ○ → sudo systemctl stop libvirtd
|=| server in ~ ○ → sudo systemctl disable libvirtd

|=| server in ~ ○ → sudo su -
[root@server ~]# dnf update
Last metadata expiration check: 0:20:58 ago on Fri 15 Jan 2021 15:49:20 GMT.
Dependencies resolved.
Nothing to do.
Complete!
前に述べたガイドの後で、我々はFirdora
[root@server ~]# dnf install rpmrebuild
[....]
[root@server ~]# cd /tmp && wget http://download.virtualbox.org/virtualbox/rpm/fedora/32/x86_64/VirtualBox-6.1-6.1.16_140961_fedora32-1.x86_64.rpm
--2021-01-15 16:12:37--  http://download.virtualbox.org/virtualbox/rpm/fedora/32/x86_64/VirtualBox-6.1-6.1.16_140961_fedora32-1.x86_64.rpm
Resolving download.virtualbox.org (download.virtualbox.org)... 23.217.4.135
[....]
[root@server tmp]# rpmrebuild --change-spec-preamble='sed -e "s/6.1.16_140961_fedora32/6.1.16_140961_fedora33/"' --change-spec-requires='sed -e "s/python(abi) = 3.8/python(abi) >= 3.8/"' --package VirtualBox-6.1-6.1.16_140961_fedora32-1.x86_64.rpm
(GenRpmQf) remove tag line ENHANCESFLAGS
(GenRpmQf) remove tag line ENHANCESNAME
[....]
[root@server tmp]# dnf install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms qt5-qtx11extras libxkbcommon
[....]
[root@server tmp]# dnf install ~/rpmbuild/RPMS/x86_64/VirtualBox-6.1-6.1.16_140961_fedora33-1.x86_64.rpm
[....]
[root@server tmp]# usermod -a -G vboxusers solifugo
[root@server tmp]# su - solifugo
|=| server in ~ ○ → sudo reboot
VirtualBoxがインストールされ、システムを再起動した後、私は現在のカーネル5.10.6 - 200にカーネルモジュールを構築しようとしたときに以下のエラーを見つけました.FC 33x 86 . 64 (新しいカーネルは私が以前にした「dnf update」実行の結果の1つでした).
|=| server in ~ ○ → VirtualBox
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (5.10.6-200.fc33.x86_64) or it failed to
         load. Please recompile the kernel module and install it by

           sudo /sbin/vboxconfig

         You will not be able to start VMs until this problem is fixed.
Qt WARNING: could not connect to display
Qt FATAL: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Aborted (core dumped)

|=| server in ~ ○ →

|=| server in ~ ○ → sudo /sbin/vboxconfig
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong.

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.  If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.

|=| server in ~ ○ →

ログファイルは私にとって非常に役に立ちませんでした、そして、読んで、VirtualBoxがFedora 33のサポートをまだしていないので、私は新しいカーネルのサポートがありません
## Log file
Building the main VirtualBox module.
Error building the module:
make V=1 CONFIG_MODULE_SIG= CONFIG_MODULE_SIG_ALL= -C /lib/modules/5.10.6-200.fc33.x86_64/build M=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j24 modules
make[1]: warning: -j24 forced in submake: resetting jobserver mode.
make -f ./scripts/Makefile.build obj=/tmp/vbox.0 \

最後に、grub 2のデフォルトカーネルを変更して、以前のバージョンのカーネルに対してカーネルモジュールを設定することができました
|=| server in ~ ○ → sudo grubby --info=ALL |egrep -i 'index|title'
index=0
title="Fedora (5.10.6-200.fc33.x86_64) 33 (Server Edition)"
index=1
title="Fedora (5.9.16-200.fc33.x86_64) 33 (Server Edition)"
index=2
title="Fedora (5.8.15-301.fc33.x86_64) 33 (Server Edition)"
index=3
title="Fedora (0-rescue-eeb04d2dc1b443f59d24a68f801e7ee6) 33 (Server Edition)"

|=| server in ~ ○ → sudo grubby --default-index
0

|=| server in ~ ○ → sudo grubby --set-default-index=1
The default is /boot/loader/entries/eeb04d2dc1b443f59d24a68f801e7ee6-5.9.16-200.fc33.x86_64.conf with index 1 and kernel /boot/vmlinuz-5.9.16-200.fc33.x86_64



|=| server in ~ ○ → sudo grubby --default-index
1

|=| server in ~ ○ → sudo reboot


|=| server in ~ ○ → uname -a
Linux server.localdomain 5.9.16-200.fc33.x86_64 #1 SMP Mon Dec 21 14:08:22 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

|=| server in ~ ○ → sudo /usr/lib/virtualbox/vboxdrv.sh setup
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.

|=| server in ~ ○ → VirtualBox

|=| server in ~ ○ →

私が言及したように、新しいVirtualboxのバージョンはFedora 33と最新のカーネルバージョンのサポートを開始することになっています.