I had the same problem with the new Kubuntu release. Do the following:
- Shut down your Ubuntu VM.
- Open the Settings for your Ubuntu VM and select the Display section
- Select VBoxSVGA as your Graphics Controller. VirtualBox will warn you at the bottom of the Settings window about the invalid settings, you can ignore that.
- Leave the option Enable 3D Acceleration unchecked, otherwise VirtualBox will revert the Graphics Controller back to VMSVGA when you confirm the settings.
- Confirm your choices by clicking OK.
- Start your Ubuntu VM.
I'm using VM VirtualBox ver. 6.1.6, Extension Pack (with included Guest additions virtual CD) is also 6.1.6
If someone knows how how to remedy the resolution issue with VMSVGA selected as Graphics Controller, I'd love to read it.
This issue with screen resizing didn't let go of me, so I went and searched on the web some more.
From what I've read - and with my limited knowledge of inner workings of Linux systems, hopefully understood it at least somewhat correctly - the problem lies in relation between the graphic drivers included in Oracle's VM VirtualBox Guest Additions and the new Linux kernels that came with the recently released version of Ubuntu distro and others based on it. It seems the drivers present in ver. 6.1.6 Guest Additions aren't working correctly with these new kernels, hence the resizing problem when the Graphics Controller in VM is set to VMSVGA.
So until Oracle comes up with updated version of VirtualBox/Guest Additions, the temporary solution is the one I explained above, or what I've tried earlier and for me at least, works as well.
- Uninstall the current Guest Additions from your VM, then power it off.
- Download the older version - 6.1.2 ISO (link to Oracle's web page, there's only one such file listed).
- Start your VM and after you logged back, open VM Devices menu, select Optical Drives > Choose a disc file... to mount Guest Additions CD.
- Open your terminal and run the install script VBoxLinuxAdditions.run located in the root of the CD.
- Follow this step if your VM Graphics Controller is set to VBoxSVGA, otherwise skip to step 6: Power off the VM and in Settings > Display > Graphics Controller select VMSVGA, also enable 3D Acceleration. Confirm changes by clicking OK.
- Restart the VM, automatic screen resizing should work now.
I chose version 6.1.2 of Guest Additions because there's a bug with Bidirectional Clipboard support in 6.1.4.