Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems with Gentoo as VirtualBox guest
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
viio
n00b
n00b


Joined: 17 Mar 2020
Posts: 33

PostPosted: Sat Apr 04, 2020 3:33 pm    Post subject: Problems with Gentoo as VirtualBox guest Reply with quote

Hi,

I've installed Gentoo as a VirtualBox Guest on a Windows 10 host system.
I've installed Xorg and a window manager and now I'm trying to get the following to work:
- Automatic display resizing
- Copy/Paste in both directions


I followed the Gentoo wiki articles for xorg and virtualbox-guest.
Here's what I did:

Code:
# /etc/portage/make.conf

USE="X"
VIDEO_CARDS="virtualbox"
Code:
emerge -avq x11-base/xorg-server


Since I'm running the newes VirtualBox version on the Windows host:
Code:
# /etc/portage/package.accept_keywords

app-emulation/virtualbox-guest-additions ~amd64
Code:
emerge -avq app-emulation/virtualbox-guest-additions
rc-update add virtualbox-guest-additions default
rc-update add dbus default
gpasswd -a myuser vboxguest
gpasswd -a myuser video


After virtualbox-guest-additions installation finished, it showed me a message to use the following configuration:
Code:
# /etc/X11/xorg.conf

Section "Device"
        Identifier  "Device-vboxvideo"
        Driver      "vboxvideo"
EndSection
Section "Screen"
        Identifier  "Screen-vboxvideo"
        Device      "Device-vboxvideo"
EndSection

Section "ServerLayout"
        Identifier  "Default Layout"
        Screen      "Screen-vboxvideo"
EndSection


But when I do that, "startx" fails because "no screens found".
If I delete "xorg.conf" startx works.

Also somewhere the wiki mentioned I should run
"eselect opengl set xorg-x11"
but this gives me "!!! Error: Can't load module opengl"

I've added the following to my window manager's startup script:
(Without it, resizing doesn't work)
Code:
VBoxClient --clipboard
VBoxClient --display


The VirtualBox graphic adapter is set to "VBoxSVGA" as mentioned in the wiki.

Automatic screen resizing kind of works but with a delay of ~ 5 seconds.
I could live with that, but much more important is the copy/paste feature.

Any ideas what I missed or how could I get this to work?
Do I need to install a clipboard manager or something like that?

PS:
"/etc/init.d/virtualbox-guest-additions start"
gives me:
Code:
* Loading kernel modules
modprobe: ERROR: could not insert 'vboxsf': Unknown symbol in module, or unknown parameter (see dmesg)
* ERROR: virtualbox-guest-additions failed to start


dmesg:
Code:

[  965.889514] vboxsf: Unknown symbol VBoxGuest_RTLogBackdoorPrintf (err -2)
[  965.889538] vboxsf: Unknown symbol VBoxGuestIDC (err -2)
[  965.889557] vboxsf: Unknown symbol VBoxGuest_RTSemFastMutexRequest (err -2)
[  965.889571] vboxsf: Unknown symbol VBoxGuest_RTSemFastMutexRelease (err -2)
[  965.889581] vboxsf: Unknown symbol VBoxGuest_RTStrNLen (err -2)
[  965.889593] vboxsf: Unknown symbol VBoxGuest_RTLogRelGetDefaultInstanceEx (err -2)
[  965.889604] vboxsf: Unknown symbol VBoxGuest_RTStrCopy (err -2)
[  965.889615] vboxsf: Unknown symbol VBoxGuest_RTErrConvertToErrno (err -2)
[  965.889632] vboxsf: Unknown symbol VBoxGuest_RTSemFastMutexCreate (err -2)
[  965.889642] vboxsf: Unknown symbol VBoxGuest_RTSemFastMutexDestroy (err -2)
[  965.889653] vboxsf: Unknown symbol VBoxGuest_RTMemContFree (err -2)
[  965.889663] vboxsf: Unknown symbol VBoxGuest_RTSemMutexRelease (err -2)
[  965.889675] vboxsf: Unknown symbol VBoxGuest_rtR0MemObjLinuxVirtToPage (err -2)
[  965.889688] vboxsf: Unknown symbol VBoxGuest_RTAssertShouldPanic (err -2)
[  965.889700] vboxsf: Unknown symbol VBoxGuest_RTLogLoggerEx (err -2)
[  965.889711] vboxsf: Unknown symbol VBoxGuest_RTMemContAlloc (err -2)
[  965.889722] vboxsf: Unknown symbol VBoxGuest_RTSemMutexRequest (err -2)
[  965.889732] vboxsf: Unknown symbol VBoxGuest_RTSemMutexCreate (err -2)
[  965.889741] vboxsf: Unknown symbol VBoxGuest_RTSemMutexDestroy (err -2)
[  965.889754] vboxsf: Unknown symbol VBoxGuest_RTAssertMsg1Weak (err -2)
[  965.889772] vboxsf: Unknown symbol VBoxGuest_RTAssertMsg2Weak (err -2)
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7653
Location: Saint Amant, Acadiana

PostPosted: Sat Apr 04, 2020 3:59 pm    Post subject: Reply with quote

To begin with your modules apparently were built for a different kernel, they must match the running kernel.
You should use VMSVGA emulation and vmware driver in guest.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
viio
n00b
n00b


Joined: 17 Mar 2020
Posts: 33

PostPosted: Sat Apr 04, 2020 4:03 pm    Post subject: Reply with quote

Jaglover wrote:
To begin with your modules apparently were built for a different kernel, they must match the running kernel.


I already run "emerge @module-rebuild" which should solve the problem?

However I'm not sure how I could build it for a wrong kernel?
I have only one kernel version.

Jaglover wrote:
You should use VMSVGA emulation and vmware driver in guest.

The wiki mentions "virtualbox" driver and "VBoxSVGA".
See here.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7653
Location: Saint Amant, Acadiana

PostPosted: Sat Apr 04, 2020 4:12 pm    Post subject: Reply with quote

'emerge @module-rebuild' builds modules for kernel which the linux symlink is pointing at, in actuality you may be running a different kernel. Sometimes even same version of kernel, but different build will result in module loading errors. Also make sure you have not enabled CONFIG_TRIM_UNUSED_KSYMS.
VMSVGA is recommended by Oracle, Gentoo wiki may be outdated. Never take any wiki without a grain of salt.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
viio
n00b
n00b


Joined: 17 Mar 2020
Posts: 33

PostPosted: Sat Apr 04, 2020 4:30 pm    Post subject: Reply with quote

How could I check or fix the kernel thing?
I generated the kernel with 'genkernel' since configuring it manually seemed a bit too complex for the beginning.

uname -r
5.4.28-gentoo-x86_64

ls /etc/kernels
kernel-config-5.4.28-gentoo-x86_64

In the above file I can't find "CONFIG_TRIM_UNUSED_KSYMS"
So I guess it isn't enabled?
But shouldn't it be there as a comment at least?

Okay good to know that VMSVGA and VMWARE driver is the recommended option.
Kind of impossible to figure out while reading the wiki.
I'm using VirtualBox, not VMware so using Vmware driver seems completely wrong to me.

So I changed VIDEO_CARDS in make.conf from "virtualbox" to "vmware".
And now I'm running "emerge -avquUD --with-bdeps=y @world"
Could take a while since Firefox got an update in the last hour(s) hehe
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7653
Location: Saint Amant, Acadiana

PostPosted: Sat Apr 04, 2020 4:34 pm    Post subject: Reply with quote

Code:
ls -l /usr/src/

This tells you what kernel sources are in use.
Code:
uname -a

Tells you the time and build # in addition to version. I think with genkernel the build may be always #1, though. It is quite common among Gentoo newcomers they missed a step during kernel installation/upgrade and are unknowingly running some older kernel. (Never used genkernel myself, I think kernel config is still even with genkernel /usr/src/linux/.config ... it is not?)
_________________
Please learn how to denote units correctly!


Last edited by Jaglover on Sat Apr 04, 2020 4:37 pm; edited 1 time in total
Back to top
View user's profile Send private message
viio
n00b
n00b


Joined: 17 Mar 2020
Posts: 33

PostPosted: Sat Apr 04, 2020 4:37 pm    Post subject: Reply with quote

ls -al /usr/src/
lrwxrwxrwx 1 root root 19 31. Mär 14:27 linux -> linux-5.4.28-gentoo
drwxr-xr-x 25 root root 4096 31. Mär 14:40 linux-5.4.28-gentoo

uname -a
Linux gentoo-vm 5.4.28-gentoo-x86_64 #1 SMP Tue Mar 31 14:29:30 CEST 2020 x86_64
Back to top
View user's profile Send private message
viio
n00b
n00b


Joined: 17 Mar 2020
Posts: 33

PostPosted: Sat Apr 04, 2020 5:07 pm    Post subject: Reply with quote

Code:
lsmod | grep vbox
vboxvideo              36864  1
drm_vram_helper        20480  1 vboxvideo
drm_kms_helper        217088  1 vboxvideo
drm                   552960  5 drm_kms_helper,drm_vram_helper,vboxvideo,ttm
vboxguest              45056  0


modprobe vboxdrv
modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/5.4.28-gentoo-x86_64

This was on the old snapshot of the VM with vbox drivers obviously.

On a new snapshot I switched to vmware drivers and VMSVGA now.
It is much faster than with VBoxSVGA.
But both auto-resize and clipboard still aren't working.

"lsmod | grep vbox" shows only "vboxguest"
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7653
Location: Saint Amant, Acadiana

PostPosted: Sat Apr 04, 2020 5:21 pm    Post subject: Reply with quote

Please forget all vboxdrv talk, I have slight fever and wasn't concentrating, it is not needed for guest.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum