Changing default FreeBSD running under VirtualBox

Greeting Everyone.

I installed FreeBSD in VirtualBox and I want to increase the default resolution. Please, how can I accomplish this task?
One thing to consider: I am new to all related aspects of FreeBSD - new to Linus and Unix as well; the simple the answer
the better.

Thank you all so much for reading the above request.

Cordially,

FreeBSDNewbee
 
For Xorg you can use a /usr/local/etc/X11/xorg.conf.d/monitor.conf:
Code:
Section "Monitor"
     Identifier "VGA-1"
    Option "PreferredMode" "1920x1080"
EndSection

For console you can add to /boot/loader.conf:
Code:
efi_max_resolution="1920x1080"
vbe_max_resolution="1920x1080"
CSM boot uses the vbe_max_resolution setting, if you EFI boot it will use efi_max_resolution.
 
Have you installed the emulators/virtualbox-ose-additions package?

It's ages since I did the setup, but my recollection is you need it to get screen resolutions above 800x600:
Code:
pkg install virtualbox-ose-additions
The message in the package (/usr/ports/emulators/virtualbox-ose-additions/pkg-message) says:
Code:
To enable and start the required services:

# sysrc vboxguest_enable="YES"
# sysrc vboxservice_enable="YES"

To start the services, restart the system.

In some situations, a panic will occur when the kernel module loads.
Having no more than one virtual CPU might mitigate the issue.

For features such as window scaling and clipboard sharing, membership of
the wheel group is required. With username "jerry" as an example:

# pw groupmod wheel -m jerry

The settings dialogue for FreeBSD guests encourages use of the VMSVGA
graphics controller. Whilst this might suit installations of FreeBSD
without a desktop environment (a common use case), it is not appropriate
where Guest Additions are installed.

Where Guest Additions are installed:

1. prefer VBoxSVGA

2. do not enable 3D acceleration (doing so will invisibly
   lose the preference for VBoxSVGA)

You may ignore the yellow alert that encourages use of VMSVGA.
 
For Xorg you can use a /usr/local/etc/X11/xorg.conf.d/monitor.conf:
Code:
Section "Monitor"
     Identifier "VGA-1"
    Option "PreferredMode" "1920x1080"
EndSection

For console you can add to /boot/loader.conf:
Code:
efi_max_resolution="1920x1080"
vbe_max_resolution="1920x1080"
CSM boot uses the vbe_max_resolution setting, if you EFI boot it will use efi_max_resolution.
SirDice, thank you so much for your reply to my post.

I follow the steps given and unfortunately it didn't work. However, after long hours of trials and errors, I found a method to increase the size of FreeBSD's shell [to full window size] in VirtualBox by enabling the "Scaled Mode" option (View -> Scaled Mode) after the FreeBSD engine is running; once this mode is enabled, a VirtualBox message will appeared informing "...the virtual machine will be now switched to Scaled Mode....," the user will have two choices at this point, "Switch" or "Cancel." If the "Switch" option is selected, the FreeBSD shell will be full windows screen, this will allow the user to alter the size of the window by known Windows OS methods; to disable this mode just hit the right Ctrl + Home keys in Windows and deselect the "Scaled Mode" option.

The method found was implemented running VirtualBox 7.0 installed in MacOS Ventura 13.1.4 and in Windows 10 Pro 22H2, both platforms are 64-Bit. Please see attached pictures to illustrate this method.

I will continue to obtain my original goal of resizing the FreeBSD shell to full screen resolution - and others as well - without using VirtualBox's "Scaled Mode" option. I will keep you posted, SirDice.

Once again, I am extremely grateful for your reply and assistance,

Cordially,

FreeBSDNewbee
 

Attachments

  • pict0.jpg
    pict0.jpg
    259.2 KB · Views: 144
  • pict1.jpg
    pict1.jpg
    252.4 KB · Views: 117
  • pict2.jpg
    pict2.jpg
    276 KB · Views: 107
Have you installed the emulators/virtualbox-ose-additions package?

It's ages since I did the setup, but my recollection is you need it to get screen resolutions above 800x600:
Code:
pkg install virtualbox-ose-additions
The message in the package (/usr/ports/emulators/virtualbox-ose-additions/pkg-message) says:
Code:
To enable and start the required services:

# sysrc vboxguest_enable="YES"
# sysrc vboxservice_enable="YES"

To start the services, restart the system.

In some situations, a panic will occur when the kernel module loads.
Having no more than one virtual CPU might mitigate the issue.

For features such as window scaling and clipboard sharing, membership of
the wheel group is required. With username "jerry" as an example:

# pw groupmod wheel -m jerry

The settings dialogue for FreeBSD guests encourages use of the VMSVGA
graphics controller. Whilst this might suit installations of FreeBSD
without a desktop environment (a common use case), it is not appropriate
where Guest Additions are installed.

Where Guest Additions are installed:

1. prefer VBoxSVGA

2. do not enable 3D acceleration (doing so will invisibly
   lose the preference for VBoxSVGA)

You may ignore the yellow alert that encourages use of VMSVGA.
Hello gpw928,

Thank you so much for your assistance, and my apologies for perhaps resurrecting painful memories.

I will implement the code presented, and as a reminder: I am still new to FreeBSD and Linux, so I am definitely will make mistakes here and there. I will keep you posted with my results. I must thank SirDice for his knowledgeable contribution to my post as well.
 
For Xorg you can use a /usr/local/etc/X11/xorg.conf.d/monitor.conf:
Code:
Section "Monitor"
     Identifier "VGA-1"
    Option "PreferredMode" "1920x1080"
EndSection

For console you can add to /boot/loader.conf:
Code:
efi_max_resolution="1920x1080"
vbe_max_resolution="1920x1080"
CSM boot uses the vbe_max_resolution setting, if you EFI boot it will use efi_max_resolution.
Hello once again, SirDice,

Well, I have good news: THE RESIZING OF THE FreeBSD shell WORKS!!!!!!

I used "efi_max_resolution="1920x1080" as you suggested, however, I had to set the following options to the motherboard under "Settings":

EFI: Enable

Graphics Controller: VBoxSVGA

---- please see attached picture to illustrate.

I fully removed and re-installed FreeBSD in VirtualBox for the EFI and VBoxSVGA options to take effect, by the way, there is
a huge visible graphical difference in installing FreeBSD with these two options set.

I can now add any resolution to the "efi_max_resolution" command included in the /boot/loader.conf file, execute a "shutdown -r now" command, see the new resolution
take effect after the completion of the engine's boot process.

SirDIce, I cannot thank you enough for your guidance, and I also must give credit to gpw928 for his guidance as well.

The only sad thing is that I will be posting more questions during my FreeBSD learning journey.

Cordially,

FreeBSDNewbee
 

Attachments

  • Added Options.jpg
    Added Options.jpg
    134.6 KB · Views: 119
You are very welcome to ask smart questions (and it looks like you had good start here), there is nothing sad about those.
Hello yuripv79,

Thank you so much for your acceptance and encouraging words.

For several months I began searching for a stable Unix like operating system, my search ended when
I can across FreeBSD. FreeBSD contains three valuable attributes:

a) A system that motivates you get involve,
b) Documentation - in time I will familiarize myself with some of the terms,
c) Staff and Users willing to share their knowledge.

yuripv79, thank you once for your words.

Cordially,

FreeBSDNewbee
 
Back
Top