Build virtualbox in fedora35

Download VirtualBox source and extract it to /home/work/vb/VirtualBox-6.1.32.

Involve qt,

# read in ./configure
#	for q in $QT5DIR "$DEVDIR/linux.$TARGET_MACHINE"/qt/v5.*; do
# so download qt5.9.2 and install to /home/work/qt/Qt5.9.2
# make a link to qt5.9.2
cd /home/work/vb/VirtualBox-6.1.32/tools/linux.amd64
mkdir qt
ln -s /home/work/qt/Qt5.9.2/5.9.2/gcc_64 `pwd`/qt/v5.9.2

Build it,

# must add '--skip-broken', or else our fedora os will be mute curiously, suddenly
# in the subsequent experience.
yum install gcc-c++ subversion subversion-gnome kernel-devel which tar gzip bzip2 \
  doxygen mscgen wine-core \
  glibc-devel libcap-devel libcurl-devel libIDL-devel \
  libstdc++-static libxslt-devel libvpx-devel libXmu-devel \
  pam-devel pulseaudio-libs-devel python-devel qt-devel rpm-build SDL_ttf-devel \
  SDL-static device-mapper-devel glibc-static zlib-static \
  glibc-devel.i686 libstdc++.i686 pulseaudio \
  texlive texlive-latex texlive-latex-bin texlive-ec \
  texlive-collection-fontsrecommended texlive-pdftex-def texlive-fancybox texlive-tabulary \
  libpng-devel openssl-devel acpica-tools opus opus-devel --skip-broken

# in addition to offical prerequisites
yum install python3-devel libXcursor-devel libXinerama-devel libXrandr-devel alsa-lib-devel makeself yasm

cd /home/work/vb/VirtualBox-6.1.32

# modify ./configure
#SUPPYTHONLIBS="python3.10 python2.7 ..."

# RTAssertShouldPanic error: this statement may fall through [-Werror=implicit-fallthrough=]
# modify ./Config.kmk
# uncomment below line

./configure --disable-hardening --disable-docs --disable-java
source ./
kmk BUILD_TYPE=debug -j 1

how to run,

cd out/linux.x86/release/bin/src
sudo make install

#sign generated vbox kernel modules

cd ..
export LD_LIBRARY_PATH=/home/work/qt/Qt5.9.2/5.9.2/gcc_64/lib:LD_LIBRARY_PATH


chmod ugo+rw /dev/vboxdrv

The VM session was aborted?

Maybe we forgot load vboxnetadp and vboxnetflt,

#modprobe vboxdrv
#modprobe vboxnetadp
#modprobe vboxnetflt

or the shared folder locates in U-disk but we have not mounted it.

Where to get guest additions iso?

But why my Fedora os often drops dead?

What can make system dead must be that the modules we insert to kernel have problem.

The correct way to insert modules is that we should install official bundle first which will insert an configuation file in /etc/udev, modify /etc/udev/rules.d/60-vboxdrv.rules, give current user read and write permission and reboot system that will effect the rule. Then install the vbox*.ko we built.

refer to: