Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions documentation/content/en/books/handbook/virtualization/_index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,46 @@ Mount the shared folder from within the guest system like this:
# mount_vboxvfs -w myshare /mnt
....

If you want to change the resolution of the console but `vidcontrol -i mode` returns an empty list, then you'll need to switch from the "vt" console driver to the "sc" console driver as explained in man:vidcontrol[1].
Copy link
Contributor

@grahamperrin grahamperrin Sep 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you want to change the resolution of the console but `vidcontrol -i mode` returns an empty list, then you'll need to switch from the "vt" console driver to the "sc" console driver as explained in man:vidcontrol[1].
If you want to change the resolution of the console, but `vidcontrol -i mode` returns an empty list: you may use the legacy man:syscons[4] alternative to the man:vt[4] console driver.
According to the manual page:
NOTE: the syscons driver is not compatible with systems booted via man:uefi[8].
Forcing use of syscons on such systems will result in no usable console.

This includes NOTE: as an AsciiDoc admonition.


Add the following line to [.filename]#/boot/loader.conf#:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Add the following line to [.filename]#/boot/loader.conf#:
For syscons (sc), add the following line to [.filename]#/boot/loader.conf#:


[.programlisting]
....
kern.vty=sc
....

Then, after rebooting, you'll be able to list available console video modes and select one with `vidcontrol` (be sure to adjust the video memory setting for this VM in VirtualBox parameters to a sufficient value). For example:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Then, after rebooting, you'll be able to list available console video modes and select one with `vidcontrol` (be sure to adjust the video memory setting for this VM in VirtualBox parameters to a sufficient value). For example:
Shut down the guest, then review its video memory setting.
Allow enough memory for the intended resolution.
After the guest boots, man:vidcontrol[1] will allow you to specify a listed mode.
For example:


[source,shell]
....
# vidcontrol -i mode
mode# flags type size font window linear buffer
------------------------------------------------------------------------------
...
325 (0x145) 0x0000000f G 1280x1024x32 D 8x16 0xa0000 64k 64k 0xe0000000 5120k
...
# vidcontrol MODE_325
....

If this new video mode is acceptable, it can be permanently set on boot for all virtual consoles by adding it to [.filename]#/etc/rc.conf#:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If this new video mode is acceptable, it can be permanently set on boot for all virtual consoles by adding it to [.filename]#/etc/rc.conf#:
If the new mode is acceptable, it can be set for all virtual consoles:


[.programlisting]
....
allscreens_flags="MODE_325"
Comment on lines +421 to +423
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[.programlisting]
....
allscreens_flags="MODE_325"
[source,shell]
....
# sysrc allscreens_flags+="MODE_325"

For the configuration to take effect, either reboot -r or restart the OS.

....

If you are using a foreign keyboard, you also need to add appropriate keymap and font lines to [.filename]#/etc/rc.conf#.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you are using a foreign keyboard, you also need to add appropriate keymap and font lines to [.filename]#/etc/rc.conf#.
If you use a foreign keyboard, you should also add appropriate keymap and font lines to [.filename]#/etc/rc.conf#.
See man:rc.conf[5].

Beware, the keymap files are different from "vt" to "sc" console types! Check [.filename]#/usr/share/syscons/keymaps# for appropriate values...
Copy link
Contributor

@grahamperrin grahamperrin Sep 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Beware, the keymap files are different from "vt" to "sc" console types! Check [.filename]#/usr/share/syscons/keymaps# for appropriate values...
NOTE: keymap files for syscons differ from those for vt.
For appropriate values, see files in [.filename]#/usr/share/syscons/keymaps#.


For example, in order to set a French keyboard do:
Copy link
Contributor

@grahamperrin grahamperrin Sep 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For example, in order to set a French keyboard do:
For example, to set a French keyboard, a font size, and font:


[.programlisting]
....
keymap="fr.iso.acc"
font8x16="iso-thin-8x16"
Comment on lines +433 to +434
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume that this format suits syscons (not vt).

....

[[virtualization-host-virtualbox]]
== FreeBSD as a Host with VirtualBox(TM)

Expand Down