Quantcast
Viewing all articles
Browse latest Browse all 2849

System and Network configuration • Re: Console resolution in Virtualbox

Hello @jimmi,

Thanks for posting.

I have to admit that I'm not a frequent user of Virtualbox (I prefer Linux containers and/or QEMU/KVM).

Any way, it's an interesting topic as it gives the opportunity to look at the inner workings of Debian GNU/Linux virtual consoles. Therefore, I installed Virtualbox in Debian Bookworm (as host) and tested it for you installing Debian Booworm (as guest). I used the Debian fasttrack repositories.

Code:

fbset -i
now it shows this:

Code:

mode "1280x800"    geometry 1280 800 1280 800 32    timings 0 0 0 0 0 0 0    accel true    rgba 8/16,8/8,8/0,0/0endmodeFrame buffer device information:    Name        : vmwgfxdrmfb    Address     : 0    Size        : 4096000    Type        : PACKED PIXELS    Visual      : TRUECOLOR    XPanStep    : 1    YPanStep    : 1    YWrapStep   : 0    LineLength  : 5120    Accelerator : No
According to the log above, the Debian virtual console in Virtualbox is running with a framebuffer [2] called "vmwgfxdrmfb".

I've searched for it in the Linux kernel source code and the Virtualbox source code (which should include the guest additions). [3]

I haven't found any reference to vmwgfxdrmfb framebuffer or any documentation about it, so far.

As far as I can tell, based on these elements, Virtualbox probably sets its virtual console screen resolution according to the maximum native resolution of the host, the configured video memory size allocated in the guest, and the video modes configured in the guest's BIOS.

The Virtualbox manual [1] says that custom VESA resolutions can be set by the user with the VBoxManage command:
9.6.1. Custom VESA Resolutions

Apart from the standard VESA resolutions, the Oracle VM VirtualBox VESA BIOS enables you to add up to 16 custom video modes which will be reported to the guest operating system. When using Windows guests with the Oracle VM VirtualBox Guest Additions, a custom graphics driver will be used instead of the fallback VESA solution so this information does not apply.

Additional video modes can be configured for each VM using the extra data facility. The extra data key is called CustomVideoModex with x being a number from 1 to 16. Please note that modes will be read from 1 until either the following number is not defined or 16 is reached. The following example adds a video mode that corresponds to the native display resolution of many notebook computers:

Code:

$ VBoxManage setextradata VM-name "CustomVideoMode1" "1400x1050x16"
The VESA mode IDs for custom video modes start at 0x160. In order to use the above defined custom video mode, the following command line has to be supplied to Linux:

Code:

vga = 0x200 | 0x160vga = 864
For guest operating systems with Oracle VM VirtualBox Guest Additions, a custom video mode can be set using the video mode hint feature.
I tried it, but the above command with suggested kernel parameters did not work with the aforementioned framebuffer. Perhaps, vmwgfxdrmfb is not a VESA compatible framebuffer.

Code:

I think I'll forget all this and use Putty instead, nore flexible.
Standalone servers can be easily managed from a remote console, unless a connection to the local console is not strictly necessary. So your choice makes perfectly sense.

--
[1] 9.6.1. Custom VESA Resolutions
[2] Linux Kernel - The Frame Buffer Device API
[3] Linux Kernel - Frame buffer list

Statistics: Posted by Aki — 2024-07-25 19:30



Viewing all articles
Browse latest Browse all 2849

Trending Articles