How to get Auto-resize guest display working on Debian Guest?

Discussions about using Linux guests in VirtualBox.

How to get Auto-resize guest display working on Debian Guest?

Postby sleepypanda » 19. Jul 2021, 19:48

Hello :)

I’m new to Linux and VMs and wanted to know how to get the “Auto-resize guest display” working for a Debian guest on macbook (if possible).

VirtualBox
Version 6.1.22 r144080 (Qt5.6.3)

HOST
macOS High Sierra 10.13.6
MacBook Pro (Retina, 15-inch, Late 2013)
Processor: 2.6 GHz Intel Core i7
Memory: 16 GB
Graphics: Intel Iris Pro 1536 MB

GUEST
debian-10.10.0-amd64-netinst.iso
xfce (also tried with Gnome)
allocated 3cpus, 6140mb memory
128mb video memory VMSVGA 3D acceleration

What I tried
Initially the Guest Additions didn’t install but after I following a troubleshooting post that suggested -> file/virtual media manager -> release/remove -> restart, it didn’t install but did mount VBox_GAs_6.1.22 on the desktop. I tried the installer form the menus but it failed with an error message. So I ran: sh ‘/media/cdrom0/VBoxLinuxAdditions.run’ and it seemed to install the Guest Additions:

Code: Select all   Expand viewCollapse view
Verifying archive integrity... All good.
Uncompressing VirtualBox 6.1.22 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 6.1.22 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
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: Kernel headers not found for target kernel
4.19.0-17-amd64. Please install them and execute
  /sbin/rcvboxadd setup
VirtualBox Guest Additions: Running kernel modules will not be replaced until
the system is restarted
it didn’t work. I followed a troubleshooting post which suggested -> file/virtual media manager  -> release/remove  -> restart


However, the ‘Auto-resize guest display’ option is greyed (but is ticked) yet isn’t working. When I startup the Debian VM there is a little popup on the top right hand side that says, “VBoxCLient: Failed to get displ…” but when I click on the notification it disappears.

I’ve added and removed the guest additions a few times now aswell as restarting. Also tried GNOME to see if it made a difference but it didn’t. I also tried Ubuntu, it installed and the auto-resize guest display works fine - but is too heavy for me to run.

Any advice would be appreciated.
sleepypanda
 
Posts: 3
Joined: 19. Jul 2021, 19:43

Re: How to get Auto-resize guest display working on Debian Guest?

Postby scottgus1 » 19. Jul 2021, 19:51

There are prerequisites for Guest Additions in Linux https://www.virtualbox.org/manual/ch02. ... nux-prereq (these prereqs are the same as for installing Virtualbox on a Linux host) then see https://www.virtualbox.org/manual/ch04. ... ions-linux
scottgus1
Site Moderator
 
Posts: 13392
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: How to get Auto-resize guest display working on Debian Guest?

Postby sleepypanda » 19. Jul 2021, 20:21

Thanks. Yes my setup seems to meet most of the prerequisites, though I missed/didn't check the kernel modules so will see if that helps.
sleepypanda
 
Posts: 3
Joined: 19. Jul 2021, 19:43

Re: How to get Auto-resize guest display working on Debian Guest?

Postby sleepypanda » 19. Jul 2021, 22:23

scottgus1 wrote:There are prerequisites for Guest Additions in Linux (these prereqs are the same as for installing Virtualbox on a Linux host) then see virtualbox manual ch04 additions


All working now. Totally missed 4.2.2.1. Installing Linux Guest Additions and didn’t realise that with Debian I had to manually install the kernal header and GCC (unlike with Ubuntu - a guest addition). After doing so all is working fine. I tried a few commands that didn’t work so have written the commands that did work for me below incase other noobs like me need them.

Installed kernal headers with:

Code: Select all   Expand viewCollapse view
sudo apt install linux-headers-$(uname -r)


Ran update with:

Code: Select all   Expand viewCollapse view
sudo apt update


Installed the GNU Compiler Collection (GCC) with:

Code: Select all   Expand viewCollapse view
sudo apt install build-essential


Then ran disk as per 4.2.2.1. instructions:

sh '/media/cdrom0/VBoxLinuxAdditions.run'

After reboot “auto-rezise guest display” is all working now. Thanks again. :D
sleepypanda
 
Posts: 3
Joined: 19. Jul 2021, 19:43

Re: How to get Auto-resize guest display working on Debian Guest?

Postby scottgus1 » 19. Jul 2021, 22:31

Great! Glad you're up and running.
scottgus1
Site Moderator
 
Posts: 13392
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux


Return to Linux Guests

Who is online

Users browsing this forum: No registered users and 14 guests