1

I've been trying to get Guest Additions running on Debian 9 in VirtualBox. I tried to install Guest Additions via VirtualBox, via Direct download from virtualbox.org and via apt. Everytime fail with Kernel headers. But I installed them as shown in several tutorials. (first I tried linux-headers-$(uname -r) later linux-headers-4.9.0-3-common) The last thing I tried was working on Debian 8 where I had the same problem

apt-get install virtualbox-guest-dkms virtualbox-guest-x11 linux-headers-$(uname -r)

The additions seemed to be installed. I didn't get an error when I tried to add shared folders. Before I got a message everytime saying that the GuestAdditions are not installed.

But after reboot I still have no fullscreen 16:9 display and there are no shared folders mounted

What's the problem? What can I do to fix this problem?

  • with sudo or as root dkms status Also uname -r You can edit your question for that. – user192526 Nov 10 '17 at 14:08
  • What version of VirtualBox do you use? – LinuxSecurityFreak Dec 1 '17 at 10:17
1

This works for me on Stretch (Debian 9). If it doesn't work for you, you'll need to update your question with contrasting information:

  1. First ensure that contrib repository has been added to your sources.list. If the following command returns nothing you need to add it.

    grep -rq 'stretch/.* contrib' /etc/apt/sources.list{,.d} 2>/dev/null && echo ok
    

    Expected output

    ok
    
  2. Update the repository and install the necessary set of packages.

    apt-get update
    apt-get install build-essential module-assistant
    module-assistant prepare
    
  3. Mount and run the VirtualBox Guest Additions image. Ensure the DVD image is available by going to the Guest window and then using the menu Devices > Insert Guest Additions Image... If you get an error here that you cannot understand, report it back in your question.

    mount /media/cdrom
    bash /media/cdrom/VBoxLinuxAdditions.run
    

    Expected output

    mount: /dev/sr0 is write-protected, mounting read-only
    
    Verifying archive integrity... All good.
    Uncompressing VirtualBox 5.2.8 Guest Additions for Linux........
    VirtualBox Guest Additions installer
    ...
    
  4. Check that the modules have been loaded into the running kernel. You may need to reboot to see this take effect (but I didn't).

    lsmod | grep vb
    

    Expected output (ignore the column of high-valued numbers)

    vboxvideo              36864  1
    ttm                    98304  1 vboxvideo
    drm_kms_helper        155648  1 vboxvideo
    drm                   360448  4 vboxvideo,ttm,drm_kms_helper
    vboxsf                 45056  0
    vboxguest             286720  1 vboxsf
    

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.