How to set 4K screen resolution

Discussions related to using VirtualBox on Linux hosts.
satimis
Posts: 506
Joined: 12. Jun 2007, 03:41

(Solved) How to set 4K screen resolution

Post by satimis »

Computer A has been running for 2~3 years, I can't find its original ISO. Besides it has been upgraded. Which Guest Additions ISO I have to download on VirtualBox website?

Start CentOS 8 VM on computerA

Device -> Insert Guest Additions ISO CD Image ....

Warning:

Code: Select all

Unable to insert the virtual optical disk /usr/share/virtualbox/VBoxGuestAdditions.iso into the machine centos8_00.

Detail
Could not mount the media
/drive '/usr/share/virtualbox/VBoxGuestAdditions.iso' (VERR_PDM_MEDIA_LOCKED).

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: ConsoleWrap
Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}
Callee: IMachine {85632c68-b5bb-4316-a900-5eb28d3413df}
Its new VBox.log.zip is attached. I'll come back to ComputerB later.

Regards
Attachments
centos8_computerA_20210427.log.zip
(34.58 KiB) Downloaded 11 times
Last edited by satimis on 30. Apr 2021, 13:08, edited 1 time in total.
satimis
Posts: 506
Joined: 12. Jun 2007, 03:41

Re: How to set 4K screen resolution

Post by satimis »

I'm now working on ComputerB

Start CentOS 8

-> Run Guest Additions without complaint.

On reboot it re-selects 800x600 resolution
File sharing and copy'n'drog still fail to work

On VirturalBox Manager
Devices -> Insert Guest Addition CD Image ...

Fail

Warning:

Code: Select all

Unable to insert the virtual optical disk /usr/share/virtualbox/VBoxGuestAdditions.iso into the machine centos8_00.

Could not mount the media/drive '/usr/share/virtualbox/VBoxGuestAdditions.iso' (VERR_PDM_MEDIA_LOCKED).

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: ConsoleWrap
Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}
Callee: IMachine {85632c68-b5bb-4316-a900-5eb28d3413df}
VBox.log.zip is attached

Regards
Attachments
centos8_computerB_20210427.log.zip
(25.57 KiB) Downloaded 12 times
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: How to set 4K screen resolution

Post by scottgus1 »

I will assume this one has been answered:
satimis wrote: Which Guest Additions ISO I have to download on VirtualBox website?
(because it has been, a few times already)

VERR_PDM_MEDIA_LOCKED means that you already have the Guest Additions ISO loaded in the VM's CD drive. Now you follow the directions in Sections 2 and 4 of the manual regarding the prerequisites and the Guest Additions installation: https://www.virtualbox.org/manual/ch04. ... ions-linux and https://www.virtualbox.org/manual/ch02. ... nux-prereq
satimis
Posts: 506
Joined: 12. Jun 2007, 03:41

Re: How to set 4K screen resolution

Post by satimis »

scottgus1 wrote:Thanks for the logs. Neither log shows the Guest Additions installed in the VM. Without Guest Additions, only the VM OS's native drivers are used, with loss of graphics capability as a result.

Additionally, the "Computer A" log was a restore from a saved state and is missing some diagnostic data that may have helped:
scottgus1 wrote:Start the VM from full normal shutdown, not save-state.
I have tried several times installing Guest Addtions but failed

Warning:

Code: Select all

Verifying archive integrity... All good.
Uncompressing VirtualBox 6.1.20 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 6.1.20 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.18.0-301.1.el8.x86_64. Please install them and execute
  /sbin/rcvboxadd setup
ValueError: File context for /opt/VBoxGuestAdditions-6.1.20/other/mount.vboxsf already defined
modprobe vboxguest failed
The log file /var/log/vboxadd-setup.log may contain further information.
Press Return to close this window...
vboxadd-setup.log is attached here.

Only one line on the file

Code: Select all

modprobe vboxguest failed
The VBox.log was from full normal shutdown, not save-state.

Regards
Attachments
vboxadd-setup.log
(26 Bytes) Downloaded 14 times
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: How to set 4K screen resolution

Post by scottgus1 »

satimis's code block wrote:VirtualBox Guest Additions: Kernel headers not found for target kernel
4.18.0-301.1.el8.x86_64.
scottgus1 wrote:follow the directions in Sections 2 ... of the manual regarding the prerequisites ... https://www.virtualbox.org/manual/ch02. ... nux-prereq
satimis
Posts: 506
Joined: 12. Jun 2007, 03:41

Re: How to set 4K screen resolution

Post by satimis »

Hi scottgus1,

Performed following steps;

Started CentOS 8 VM

Select screen resolution : 1920x1440 and saved it

$ sudo dnf install epel-release

Code: Select all

.....
Installed:
  epel-release-8-8.el8.noarch                                                                                                            

Complete!
$ sudo dnf install gcc make perl kernel-devel kernel-headers bzip2 dkms

$ rpm -q kernel-devel

Code: Select all

kernel-devel-4.18.0-301.1.el8.x86_64
$ uname -r

Code: Select all

4.18.0-301.1.el8.x86_64
$ sudo dnf update kernel-*

Code: Select all

Last metadata expiration check: 0:05:ccccccccccccccccccccccccccccccccccccccccccccgggggggggggggggggg27 ago on Wed 28 Apr 2021 03:03:58 AM EDT.
Dependencies resolved.
Nothing to do.
Complete!
$ sudo reboot

This time it surprises me.
Screen resolution 1920x1044 (not 800x600)
drag'n'drop (copy'n'paste) between Host and VM works. I haven't installed Guest Addition yes?

$ rpm -q kernel-devel

Code: Select all

kernel-devel-4.18.0-301.1.el8.x86_64
$ uname -r

Code: Select all

4.18.0-301.1.el8.x86_64
File sharing between Host and VM still doesn't work

On Terminal:

$ ls -ald /media/sf_Transfer_Directory_PC3

Code: Select all

drwxrwx---. 1 root vboxsf 4096 Apr 25 07:24 /media/sf_Transfer_Directory_PC3
$ sudo chown satimis:vboxsf /media/sf_Transfer_Directory_PC3/
$ sudo chown satimis:satimis /media/sf_Transfer_Directory_PC3
Didn't work

$ ls -ald /media/sf_Transfer_Directory_PC3

Code: Select all

drwxrwx---. 1 root vboxsf 4096 Apr 25 07:24 /media/sf_Transfer_Directory_PC3
still not changed

What shall I do?

Shall I install Guest Addition?

Regards
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: How to set 4K screen resolution

Post by scottgus1 »

satimis wrote:Screen resolution 1920x1044 (not 800x600)
drag'n'drop (copy'n'paste) between Host and VM works. I haven't installed Guest Addition yes?
Seems like it could have worked. Please post another log.
satimis
Posts: 506
Joined: 12. Jun 2007, 03:41

Re: How to set 4K screen resolution

Post by satimis »

Computer A
==========

Tried again.

Normal start CentOS 8 VM

-> Devices -> Insert Guest Additions CD Image ...
-> Run

Code: Select all

Verifying archive integrity... All good.
Uncompressing VirtualBox 6.1.18 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 6.1.18 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: Building the modules for kernel 
4.18.0-240.22.1.el8_3.x86_64.
ValueError: File context for /opt/VBoxGuestAdditions-6.1.18/other/mount.vboxsf already defined
VirtualBox Guest Additions: Running kernel modules will not be replaced until 
the system is restarted
Press Return to close this window...
Reboot CentOS 8 VM

-> sf_Transfer_Folder
File sharing not permitted

Normal Power-Off CentOS 8 VM

VBox.log.zip is attached

Regards
Attachments
centos8_00-2021-04-30-06-28-08.log.zip
(42.1 KiB) Downloaded 13 times
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: How to set 4K screen resolution

Post by scottgus1 »

It appears you have successfully installed Guest Additions. Per One issue per thread, you should start a new topic about file transfer, after reading the pertinent section of the manual to see if there are further things that need to be done in the VM OS.

This topic is about setting 4K screen size in the VM. Video RAM is 32MB, which is small for 3D-accelerated video. Max that video RAM slider, reboot the VM, then try to set 4K. If that works, then we are good! (Note that making the 4K stick through VM reboots would be settings in the VM's OS, not in Virtualbox, and solvable by web-searching the CentOS help channels.)
satimis
Posts: 506
Joined: 12. Jun 2007, 03:41

Re: How to set 4K screen resolution

Post by satimis »

Performed following tests;

1)
CentOS 8
Video RAM - 64MB

4K (3840x1700) screen resolution possible

Pls see attached VBox.log

2)
Ubuntu 20.04
Video RAM - 128MB

Still can't get 4K (3840x1700) screen resolution

Pls see attached VBox.log

I'll create another posting on file sharing between Host and CentOS 8 VM still doesn't work

Regards
Attachments
ub2004pciessd-04-2021-04-26-00-41-15.log.zip
(55.3 KiB) Downloaded 14 times
centos8_00-2021-04-30-11-19-03.log.zip
(36.58 KiB) Downloaded 11 times
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: How to set 4K screen resolution

Post by fth0 »

ub2004pciessd-04-2021-04-26-00-41-15.log wrote:
00:00:07.996072 VMMDev: Guest Log: vboxguest: host-version: 6.1.18r142142 0x8000000f
00:00:07.996098 VMMDev: Guest Additions information report: Version 6.0.0 r127566 '6.0.0'
[...]
00:00:23.279350 VMMDev: Guest Log: 12:20:27.894000 main     VBoxService 6.0.22 r137980 (verbosity: 0) linux.amd64 (May 14 2020 21:03:58) release log
Please re-install the VirtualBox Guest Additions 6.1.18 and especially pay attention to error messages during the installation.
satimis
Posts: 506
Joined: 12. Jun 2007, 03:41

Re: How to set 4K screen resolution

Post by satimis »

Thanks for your advice.

Now I do it again

-> Devices -> Insert Guest Addition CD image....
-> Run

Code: Select all

Verifying archive integrity... All good.
Uncompressing VirtualBox 6.1.18 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 6.1.18 of VirtualBox Guest Additions...
update-initramfs: Generating /boot/initrd.img-5.8.0-50-generic
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: Building the modules for kernel 5.8.0-50-generic.
update-initramfs: Generating /boot/initrd.img-5.8.0-50-generic
VirtualBox Guest Additions: Running kernel modules will not be replaced until 
the system is restarted
Press Return to close this window...
Settings -> Display
3840x1778 resolution

Video RAM - 64MB

Regards
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: How to set 4K screen resolution

Post by fth0 »

The GA installation log looks fine. Did you restart your guest afterwards as requested in the log? What did the new VBox.log file show in respect to the lines I quoted previously (note that you have to search for the last occurrence of those log lines)?
satimis
Posts: 506
Joined: 12. Jun 2007, 03:41

Re: How to set 4K screen resolution

Post by satimis »

I need to reboot the VM before taking effect.

I have 8 Ubuntu 20.04 VMs running. I need to install Guest Additions on each of them.

The VBox.log of one VM is attached here.

Regards
Attachments
ub2004pciessd-03-2021-04-30-18-26-09.log.zip
(33.35 KiB) Downloaded 12 times
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: How to set 4K screen resolution

Post by fth0 »

satimis wrote:I need to reboot the VM before taking effect.
Well, the GA installation log told you so, didn't it? ;)
satimis wrote:The VBox.log of one VM is attached here.
It looks fine.
satimis wrote:I have 8 Ubuntu 20.04 VMs running. I need to install Guest Additions on each of them.
Well, if you possess and use 8 computers, you'll have to administer them. VMs are no different. :)
Post Reply