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
wget http://download.qt.io/archive/qt/5.9/5.9.2/qt-opensource-linux-x64-5.9.2.run
# 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
#VBOX_WITH_TESTCASES = 1
./configure --disable-hardening --disable-docs --disable-java
source ./env.sh
kmk BUILD_TYPE=debug -j 1
how to run,
cd out/linux.x86/release/bin/src
make
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
./VirtualBox
VERR_VM_DRIVER_NOT_ACCESSIBLE?
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?
http://download.virtualbox.org/virtualbox/6.1.32/VBoxGuestAdditions_6.1.32.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:
https://www.virtualbox.org/wiki/Downloads
https://download.virtualbox.org/virtualbox
How to sign module
https://www.virtualbox.org/wiki/Linux%20build%20instructions
https://blog.csdn.net/u013004700/article/details/81943881
https://www.linuxidc.com/Linux/2008-05/13132.htm