Need to set Windows XP Host resolution to exactly 1600x795

Discussions related to using VirtualBox on Windows hosts.
Post Reply
wade_solarch
Posts: 3
Joined: 15. Jun 2021, 14:18

Need to set Windows XP Host resolution to exactly 1600x795

Post by wade_solarch »

Hello,

We are having a peculiar problem with Virtualbox that we need advice on. A little info about our setup:

A client needs several new computers purchased and setup, with Windows XP virtualized and running an ancient DOS program that is critical to their business. We have an XP virtual machine cloned to all the devices and running with Virtualbox version 6.1.22 r144080. Guest Additions is installed on each guest. We need to run these VM's at exactly 1600x795 resolution on Scaled Mode (Scaled Mode is important, as that seems to be the easiest setup for the users, as we would like them to be able to use the program in a window that nearly takes up the whole Virtualbox screen while still showing their taskbar on the Host computers). We have determined 1600x795 as the ideal resolution because through tinkering in Virtualbox settings we were eventually able to get the guests to reliably run at that resolution several times on a couple of the hosts, and that resolution works best for the program we are using. However, it is very flaky on a couple of the hosts, as we never seem to be presented with that option no matter what we try. The hosts are all Lenovo Thinkcentre M60e's, except for one Thinkcentre M75q.

Here is some more detail on the specs of the hosts and guest:

Host type 1: Lenovo Thinkcentre M75q (only 1 of these)
CPU: AMD Ryzen 5 PRO 3400GE 4 cores 8 threads
RAM: 8.00 GB

Host Type 2: Lenovo Thinkcentre M60e (several of these)
CPU: Intel i5-1035G1 4 Cores 8 Threads
RAM: 8.00 GB

Guest: Windows XP 32 bit (same machine copied to all hosts and running in the same version of Virtualbox)
CPU: 1 core assigned
RAM: 1024 MB assigned

Is there any way we can reliably force this resolution in Scaled Mode? Or alternatively, does anyone know of a better way to do what we are trying to do?

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

Re: Need to set Windows XP Host resolution to exactly 1600x795

Post by scottgus1 »

After the VM has booted up, run these commands in the command prompt:
cd "c:\Program Files\Oracle|Virtualbox"
vboxmanage controlvm "VM name" setvideomodehint 1600 795 32


See https://www.virtualbox.org/manual/ch08. ... -controlvm, search for "setvideomodehint"

I was able to get an XP VM on my Windows host to jump to 1600x975 with this command, then set it to Scaled Mode maximized, and the VM shut down and restarted back to that size and Scaled Mode maximized.
wade_solarch
Posts: 3
Joined: 15. Jun 2021, 14:18

Re: Need to set Windows XP Host resolution to exactly 1600x795

Post by wade_solarch »

scottgus1 wrote:After the VM has booted up, run these commands in the command prompt:
cd "c:\Program Files\Oracle|Virtualbox"
vboxmanage controlvm "VM name" setvideomodehint 1600 795 32


See [redacted], search for "setvideomodehint"

I was able to get an XP VM on my Windows host to jump to 1600x975 with this command, then set it to Scaled Mode maximized, and the VM shut down and restarted back to that size and Scaled Mode maximized.
Thank you very much for your help! I was able to force the VM to this resolution using this method.

However, I have one small issue. When I leave Scaled Mode the resolution resets to the highest option and then the VM retains that resolution until I run the command again. It would be really nice if there was maybe a way to keep that resolution persistent even across display mode changes. Can you think of any setting or command that would accomplish this?

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

Re: Need to set Windows XP Host resolution to exactly 1600x795

Post by scottgus1 »

wade_solarch wrote:When I leave Scaled Mode the resolution resets to the highest option and then the VM retains that resolution until I run the command again.
I'm not seeing this happen myself. Can you please relate the exact steps you take in dealing with the VM? Maybe we're doing different things.

For example, I can run the command to force XP to the desired size. Then I can put it into Scaled Mode and maximize the window. The VM stays at the desired size. I then hit "HostKey-C" on the keyboard to take it out of Scaled Mode and the VM stays at the size.
wade_solarch
Posts: 3
Joined: 15. Jun 2021, 14:18

Re: Need to set Windows XP Host resolution to exactly 1600x795

Post by wade_solarch »

scottgus1 wrote:
wade_solarch wrote:When I leave Scaled Mode the resolution resets to the highest option and then the VM retains that resolution until I run the command again.
I'm not seeing this happen myself. Can you please relate the exact steps you take in dealing with the VM? Maybe we're doing different things.

For example, I can run the command to force XP to the desired size. Then I can put it into Scaled Mode and maximize the window. The VM stays at the desired size. I then hit "HostKey-C" on the keyboard to take it out of Scaled Mode and the VM stays at the size.
Here is the process I am doing:

Run the command with the Virtual machine open. Press Right Control + C. That seems to reset the resolution to the highest option supported by the display. Press Right Control + C again. That takes me back to Scaled Mode but it is still the wrong resolution.
Post Reply