How to Change the Screen Resolution in VirtualBox

Martin Brinkmann
Updated •
Windows

To change the screen resolution of a VirtualBox virtual machine, install the VirtualBox Guest Additions in the guest, reboot, and then resize the VM window or pick a size from View > Virtual Screen. Without Guest Additions, a Windows guest stays at 1024x768 and the resize options are grayed out.

This guide covers the Windows fix step by step, then Linux guests and the command line option for stubborn cases.

Why the VirtualBox screen resolution is locked

VirtualBox View menu with grayed out resize to options

A fresh Windows guest in VirtualBox uses a generic display driver that only offers a small set of modes, which is why the resolution sticks at 1024x768. The View > Virtual Screen menu shows the symptom: the "Resize to" entries are inactive, while the scaling options still work.

The VirtualBox Guest Additions replace that generic driver with one that talks to the host. According to the VirtualBox User Manual, Windows, Linux and Oracle Solaris guests with Guest Additions adjust their resolution automatically when you resize the VM window. The Additions also add a shared clipboard, shared folders and better mouse integration, so the install is worth doing on any VM you keep.

How to install Guest Additions on a Windows guest

Select Devices > Insert Guest Additions CD image in the VM window, then run the installer from the virtual CD drive inside Windows. No physical disc is involved: VirtualBox mounts an ISO image for you.

  1. Start the virtual machine and sign in to Windows.
  2. Select Devices > Insert Guest Additions CD image. The manual notes that the guest normally starts the installer on its own.
  3. If nothing starts, open File Explorer and open the CD drive named "VirtualBox Guest Additions".
  4. Run VBoxWindowsAdditions. This is the automatic selector. The -amd64 and -x86 files are for 64-bit and 32-bit systems if you prefer to pick manually.
  5. Accept the User Account Control prompt and click Next through the wizard. The default folder is fine for most users.
  6. Click Install, then choose Reboot now and Finish.

Devices menu option Insert Guest Additions CD image in VirtualBox

Guest Additions CD contents in File Explorer with VBoxWindowsAdditions files

Running VBoxWindowsAdditions to start the installer

Oracle VM VirtualBox Guest Additions setup welcome page

Guest Additions setup wizard second page

Guest Additions installation folder selection

Guest Additions components list before installation

Reboot now prompt after Guest Additions installation

How to change the resolution after the reboot

After the restart, drag the VM window to the size you want and Windows follows, or select View > Virtual Screen and pick a resolution from the list. It can take a few seconds before the new options appear.

View Virtual Screen menu with all resolutions unlocked in VirtualBox

The physical display limits the choices: the guest cannot go beyond the maximum resolution your host monitor supports. If the window is simply too small on a high-DPI host, the scaling options in the same menu enlarge the picture without changing the guest resolution.

Resizing the screen of a Linux guest

On a Linux guest, install the Guest Additions from the terminal as root and reboot. The manual describes the steps: prepare the guest for building kernel modules (compiler and kernel headers), insert the Guest Additions CD image, change to the mounted CD directory and run sh ./VBoxLinuxAdditions.run.

If something seems wrong afterwards, the manual suggests running rcvboxadd setup as root. On many distributions the Additions are also packaged by the distro, so check whether yours already ships them before using the ISO, and take a snapshot first if you replace them. Guests that use the VMSVGA graphics controller rely on the VBoxClient or VBoxDRMClient services for resizing, so make sure those are running if the window resize has no effect.

Setting a resolution from the command line

When the VM is running with Guest Additions, the host can send a resolution request with VBoxManage. The documented syntax is VBoxManage controlvm <uuid | vmname> setvideomodehint <xres> <yres> <bpp>. For example, a VM named "Windows 11" at 1920x1080 and 32 bits per pixel uses VBoxManage controlvm "Windows 11" setvideomodehint 1920 1080 32.

This is a request to the guest, so it only works once the Guest Additions are running. The command is described in the VBoxManage chapter of the manual.

Related: install VMware Tools when the option is grayed out, best virtual machine software, taking screenshots on Windows 10

Comments

  1. Anonymous said on
    Reply

    pretty shocked that this wasn’t in the default virtualbox help files as far as I could tell; thank you!

  2. Amilcar said on
    Reply

    Awesome, Thank you!

  3. matthew said on
    Reply

    What is NOT pointed out in this article is that the licensing for Guest Additions is different than that for VirtualBox itself. The Guest Additions is more restrictively licensed (PUEL license) and for many uses you require a purchased license for the Guest Additions. The license may only cost $50 (11/2022) but Oracle only sell in bulk – minimum order is 100 units – so one seat in a commercial environment costs $5000

  4. Erik said on
    Reply

    Thanks so much for this instructional! I would’ve had no idea that installing a program in the VM OS would have solved this resolution problem for VirtualBox itself! Clearly, I have a ways to go before I understand virutal machines.

    Definitely a fan of ghacks now!

  5. Anonymous said on
    Reply

    You only need to install Guest Additions once.
    Subsequently, when you upgrade VirtualBox, it upgrades the Guest Additions.

    I seem to remember that I fixed the problem by setting the display resolution in the OS, rather than thru a VirtualBox setting.

  6. unicorns-will-save-you said on
    Reply

    And because I like accuracy more than fake news,

    https://en.wikipedia.org/wiki/64-bit_computing

    It also explains where the amd64 comes from, and not because of compilers (since they use the current binary name) because that was actually the name x86_x64 changed to since it was like mentioned AMD the corp who developed it. Wikipedia doesnt lie.

    But its not for AMD machines, like @Jeff wrongly claimed.

    1. Jerry said on
      Reply

      See my reply above. Again, I didn’t claim amd64 is for AMD systems. Martin did, in the first version of this article. Martin messed up with the concept of amd64, NOT ME. I was here to correct him, and thankfully he did correct it in this 2nd version. So stop accusing me (like five times!) of the mistaken statements that Martin made.

      What’s so annoying about you is that you didn’t even read what I had written. If you did, you would know what I was talking about. You only read one sentence from my reply, which is the quotes from Martin, thought I said those, and suddenly picked up the gun and wrote 6 or 7 posts how “Jerry has no idea”. Gosh, you are such a clown.

  7. Farmers said on
    Reply

    As stated above, AMD64 does not refer to anything AMD-specific – it’s the term used for all 64-bit Windows. The term is used simply because AMD invented the 64-bit architecture used today by AMD and Intel. Yes, I know Intel invented one first, but it didn’t take off because it was incompatible with all previous Win32 software.

    1. unicorns-will-save-you said on
      Reply

      Correct, and the filename is only because Virtualbox windows binaries are cross compiled in Linux and the compiler doesn’t use x64 by default for x64 bitness and uses the default amd64.

      But its OK, people dont have to know everything, its only when they realize that they are talking rubbish and refuse to learn the actual facts, that then and only then these people can be kindly referred to as ignorant.

  8. Anonymous said on
    Reply

    did we really need a dedicated tutorial just to tell people “install vmware tools/vbox guest additions lol”?

    1. mr cool guy said on
      Reply

      you’re actually so cool

    2. unicorns-will-save-you said on
      Reply

      This is a very clever article, to show everyone windows 11 running on Virtualbox, anyone who is not dumb or afraid to RTFM can go read https://www.virtualbox.org/manual/ch04.html which explains what this article explains, but with no pretty screenshots of Windows 11.

      I wonder ho much Microsoft pays for these articles.

    3. Harro Glööckler said on
      Reply

      Agree, i thought that was common knowledge when tinkering with virtual machines. It was literally the first thing i installed when when playing around with VMWare Workstation almost 20 years ago.

  9. Jerry said on
    Reply

    Is this article really written by Martin? Because it is full of mistakes (or misleanding information, at least).

    1. “The description may sound as if you’d need to insert a CD image, but this is not the case.”

    IT IS THE CASE. VirtualBox literally has an ISO image in its program folder, and by clicking “Insert Guest Additions CD image” it inserts that ISO image for you. Users can do it manually, especially if anyone want to download and test different versions of Guest Additions.

    2. “VBoxWindowsAdditions is for 64-bit systems.” “VboxWindowsAdditions-amd64 is for AMD systems.”

    Both statements are wrong/misleading. “VboxWindowsAdditions-amd64” is for 64-bit systems. It has nothing to do with AMD systems or AMD processors. “amd64” is just a term interchangeable with x64 (well, with very subtle diffrence that normal users can ignore). And “VBoxWindowsAdditions” (without suffix) is for both 32-bit and 64-bit systems. In fact, it is just an automatic selector (look at its tiny file size!). It automatically selects from -amd64 and -x86 based on the right architecture it detects. So:

    – If the guest OS is 64-bit, use either “VBoxWindowsAdditions” or “VboxWindowsAdditions-amd64”.
    – If the guest OS is 32-bit, use either “VBoxWindowsAdditions” or “VboxWindowsAdditions-x86”.

    Come on Martin, you are much better than this…

    1. unicorns-will-save-you said on
      Reply

      @jerry @martin

      and to clarify vbox manual says…https://www.virtualbox.org/manual/ch04.html

      4.2.1.4. Manual File Extraction

      To explicitly extract the Windows Guest Additions for another platform than the current running one, such as 64-bit files on a 32-bit system, you must use the appropriate platform installer. Use VBoxWindowsAdditions-x86.exe or VBoxWindowsAdditions-amd64.exe with the /extract parameter.

      So by reading that you can indeed confirm Jerry has no idea about compilers and cross compilers, since Windows vbox binaries are cross compiled on Linux and that how Linux compilers name the 64bit binaries FOR ANY platform.

      1. Jerry said on
        Reply

        @unicorns-will-save-you

        I’m sorry my friend, but you are so hilarious. The two stupid sentences you quote (“VBoxWindowsAdditions is for 64-bit systems.” “VboxWindowsAdditions-amd64 is for AMD systems.”) were not said by me. Those were written by Martin originally. He made those stupid mistakes. He messed up with the definition of “amd64”, and I (just like you) tried to correct those mistakes. Why do you think I used the quotation marks in the first place?? Did you see that I said “both statements are wrong”? And did you see the article was “updated June 12”? It was updated/corrected because I pointed out the mistakes in those two sentences.

        Again, those stupid statements that you laughed at were written by Martin, not by me. If anyone “has no idea about compilers and cross compilers”, that was Martin, not me. You are too late to the party and have no idea what the first version of this article looked like, and you wrote a bunch of stuff that’s essentially the same as what I had written earlier.

        And please re-read @Farmers’ comment. When he said “as stated above”, he meant “as stated by Jerry”. That means you, I, and @Farmers all share the same opinion. Clear?

    2. unicorns-will-save-you said on
      Reply

      @Jerry

      >2. “VBoxWindowsAdditions is for 64-bit systems.” “VboxWindowsAdditions-amd64 is for AMD systems.”

      Incorrect…

      VBoxWindowsAdditions detects your OS bitness and either calls VboxWindowsAdditions-x86 or VboxWindowsAdditions-amd64 which the later is just a 64bit for all 64bit Windows systems.

      The amd in filename has NOTHING todo with AMD the brand… Clearly you arent familiar with what you are talking about and whats worse anyone reading

      If you dont believe me go ask irc://irc.oftc.net/vbox or https://www.virtualbox.org/manual/ch04.html and read this part

      > Unless you have the Autostart feature disabled in your Windows guest, Windows will now autostart the Oracle VM VirtualBox Guest Additions installation program from the Additions ISO. If the Autostart feature has been turned off, choose VBoxWindowsAdditions.exe from the CD/DVD drive inside the guest to start the installer.

      >The installer will add several device drivers to the Windows driver database and then invoke the hardware detection wizard.

      The hardware detection wizard is the part that detects which guest OS bitness and calls respective executable.

      In fact you can just bypass the detection wizard and run the respective binaries directly if you know which Guest OS bitness you have

      Sigh for calling out martin and providing false information.

    3. Martin Brinkmann said on
      Reply

      This has been corrected, thanks for pointing it out.

  10. Belga said on
    Reply

    I have 2 virtual machines with the Guest Additions: one win 7 and one win 10.
    In the first there is no “View” in the menu !
    In the Win 10 machine, the resolutions are not grayed out but nothing happens when you click on them. On the other hand, the scale works.

    1. Belga said on
      Reply

      Sorry, resolutions smaller than 1024×768 work, but larger resolutions don’t!

      1. unicorns-will-save-you said on
        Reply

        @Belga

        It all works, its been buggy at times but if you run a recent VB version it works and has worked for the last 10 versions.

Leave a Reply

By commenting, you accept our privacy policy and keep the discussion respectful and on topic.