More
referral
Increase your income with Hive. Invite your friends and earn real cryptocurrency!

Development and testing on HiveOS in a VM

Hi, I have a mining rig setup with 5 GPUs and I want to do some testing on it with a custom miner, but I don’t want to have it stop mining while I am testing things. I thought I’d try to install HiveOS in a VM on my non-mining PC for testing out things before I do it for real on the rig so that in case something doesn’t work how I expected then I don’t lose out any mining time.

I was able to install the OS in VirtualBox without any issues, and I wanted to install the guest additions, but it appears that Hive is running a custom kernel and I can’t find the kernel headers to compile the guest additions kernel module against.

Could you please add support for building 3rd party kernel modules like the guest additions against the HiveOS kernel?

Somehow I missed the headers in /usr/src/linux-headers-5.10.0-hiveos.

Ok compiled the guest additions without issues but the kernel module doesn’t load due to some missing symbols.

I run rcvboxadd setup and the below is the output:

Adding /lib/firmware/i915/kbl_guc_ver9_14.bin
Adding /lib/firmware/i915/kbl_dmc_ver1_01.bin
Adding /lib/firmware/i915/bxt_guc_ver8_7.bin
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 quicksetup all
VirtualBox Guest Additions: Building the modules for kernel 5.10.0-hiveos.
update-initramfs: Generating /boot/initrd.img-5.10.0-hiveos
Adding /lib/firmware/i915/kbl_guc_ver9_14.bin
Adding /lib/firmware/i915/kbl_dmc_ver1_01.bin
Adding /lib/firmware/i915/bxt_guc_ver8_7.bin
VirtualBox Guest Additions: modprobe vboxsf failed

So I check dmesg:

[    2.430031] vboxguest: host-version: 6.1.30r148432 0x8000000f
[    2.432991] vboxguest: misc device minor 59, IRQ 20, I/O port d040, MMIO at 0x00000000f0400000 (size 0x0000000000400000)
[    8.184349] vboxvideo: loading version 6.1.30 r148432
[    8.234658] vboxsf: Unknown symbol VBoxGuest_RTLogBackdoorPrintf (err -2)
[    8.234666] vboxsf: Unknown symbol VBoxGuestIDC (err -2)
[    8.234673] vboxsf: Unknown symbol VBoxGuest_RTSemFastMutexRequest (err -2)
[    8.234678] vboxsf: Unknown symbol VBoxGuest_RTSemFastMutexRelease (err -2)
[    8.234680] vboxsf: Unknown symbol VBoxGuest_RTStrNLen (err -2)
[    8.234684] vboxsf: Unknown symbol VBoxGuest_RTLogRelGetDefaultInstanceEx (err -2)
[    8.234688] vboxsf: Unknown symbol VBoxGuest_RTStrCopy (err -2)
[    8.234691] vboxsf: Unknown symbol VBoxGuest_RTErrConvertToErrno (err -2)
[    8.234698] vboxsf: Unknown symbol VBoxGuest_RTSemFastMutexCreate (err -2)
[    8.234729] vboxsf: Unknown symbol VBoxGuest_RTSemFastMutexDestroy (err -2)
[    8.234737] vboxsf: Unknown symbol VBoxGuest_RTMemContFree (err -2)
[    8.234741] vboxsf: Unknown symbol VBoxGuest_RTSemMutexRelease (err -2)
[    8.234748] vboxsf: Unknown symbol VBoxGuest_rtR0MemObjLinuxVirtToPage (err -2)
[    8.234756] vboxsf: Unknown symbol VBoxGuest_RTAssertShouldPanic (err -2)
[    8.234763] vboxsf: Unknown symbol VBoxGuest_RTLogLoggerEx (err -2)
[    8.234769] vboxsf: Unknown symbol VBoxGuest_RTMemContAlloc (err -2)
[    8.234775] vboxsf: Unknown symbol VBoxGuest_RTSemMutexRequest (err -2)
[    8.234780] vboxsf: Unknown symbol VBoxGuest_RTSemMutexCreate (err -2)
[    8.234784] vboxsf: Unknown symbol VBoxGuest_RTSemMutexDestroy (err -2)
[    8.234791] vboxsf: Unknown symbol VBoxGuest_RTAssertMsg1Weak (err -2)
[    8.234803] vboxsf: Unknown symbol VBoxGuest_RTAssertMsg2Weak (err -2)

Anyone have any ideas?

I made a post about this on the Virtualbox community forums and also reached out to the HiveOS support email. Support was willing to help but didn’t know what the reason was, so after a couple of responses on the Virtualbox forums, I found the solution.

The reason why vboxsf is giving unknown symbol errors is because the HiveOS kernel was compiled with CONFIG_VBOXGUEST=y instead of CONFIG_VBOXGUEST=m

After I recompiled the 5.10.0-hiveos kernel with CONFIG_VBOXGUEST=m and rebooted, I was able to start the rcvboxadd setup command and the guest additions loaded up properly.

For anyone else who wants to do this in the future, use this command after you have the guest additions running in order to find out the screen resolutions supported by your VM: xrandr --current and you can use one of the listed resolutions with the xrandr -s command to change your screen resolution.