Programmatically set very high VirtualBox guest resolution
I would like my VM to have a ton of screen space. I'm fine with having to scroll to see the entire desktop, but I want a desktop in the VM much larger than the size of my current monitor. For example, if I have 1920x1080 monitor, I want to have a 2560x1600 desktop.
I know it's technically possible, because sometimes from strange resizing and what-not, I end up getti开发者_如何学JAVAng a VirtualBox window that is smaller than the guest OS's resolution, and scroll bars appear.
Having a similar need, I've searched and found the following: http://flink.formula9.net/?p=229
I've successfully performed the following using a OS X 10.10.3 host and Windows 8.1 guest (adapted to example by Andersson):
- close the VirtualBox Manager
in the shell, run:
VBoxManage setextradata global GUI/MaxGuestResolution any
start the guest
in the shell, run:
VBoxManage controlvm "Windows 8 VM" setvideomodehint 3200 1800 32
Using Windows as host and VM target I have managed to achieve this the following way:
- Close VirtualBox if open.
- Open a command prompt and cd to the virtualbox installation dir
- Run: VBoxManage.exe setextradata "NAME OF VM" CustomVideoMode1 WxHxD
Where "NAME OF VM" is the name of the virtual machine, W is width, H is height, D is depth.
e.g. To make 2560x1600 available for my VM with the name "Windows 8 VM" i would:
..VirtualBox> VBoxManage.exe setextradata "Windows 8 VM" CustomVideoMode1 2560x1600x32
The next time I boot up the "Windows 8 VM" I'm able to see the new custom resolution in the list together with the default resolutions (i.e. right click on desktop->Screen resolution).
Not sure if this method works on other hosts/targets than Windows.
Just use "Scale Factor
", VirtualBox"6.1.32
" Max “Scale Factor” could up to "300%
".
You know,
"Guest Resolution
" * "Scale Factor
" == "Host Display size
".
Or
"Max Guest Screen size
" * "Scale Factor
" >= "Host Display size
".
e.g:
"1024*640
" * "250%
" == "2560*1600
";
"1280*800
" * "200%
" == "2560*1600
";
"2560*1600
" * "100%
" == "2560*1600
";
Just use your default "1920×1080 monitor
" for an example:
"1920×1080" * "
100%" == "
1920×1080" < "
2560*1600`";
"1920×1080
" * "200%
" == "3840×2160
" > "2560*1600
";
"1920×1080
" * "250%
" == "4800×2700
" > "2560*1600
";
"1920×1080
" * "300%
" == "5760×3240
" > "2560*1600
";
Now, change your VM "Scale Factor
", VM "Max Guest Screen Size",
Guest-General Display "Scale Factor
" and Guest-Settings Display
"Resolution
".
Notices:
Guest-Settings Display "Resolution
" should be the same as VM "Max Guest Screen Size".
VM "Scale Factor
" should be the same as Guest-General Display "Scale Factor
".
Just use Virtual box for an example:
e.g: "1280*800
" * "200%
" == "2560*1600
";
1.VM scale factor and max screen size:
click VirtualBox
APP, then you see "Oracle Vm VirtualBox Manager
",
move your mouse to top menu, found out VirtualBox
logo, select
"Preference
", then enter "VirtualBox – General
", click Display
,
Choose "Maximum screen size
" to "Hint
" with Width "1280
" and
Height "800
", and adjust "Scale Factor
" to "200%
", then click
"OK
".
- Guest scale factor:
When you enter VirtualBox
APP, then you see "Oracle Vm VirtualBox Manager
",
found out your guest machine name button, as mine is "linux_debian_11
",
you will see "Power Off
" under the name of your guest machine.
Please found out your guest machine "Menu Box Button
", that is at the right
of your guest machine name, right-click your "Menu Box
" or single click your
"Guest Machine Box
", choose "Settings
", then you will enter your guest
machine's "General
", mine is "linux_debian_11 – General
", then click
"Display
", and adjust "Scale Factor
" to "200%
"(the same as Scale Factor
On virtual machine's "General
").
- Guest Resolution:
My guest machine is "Debian
". So, just use "Debian
" for an example here.
Click my guest machine "Debian
"'s “Settings”, then found out "Display
",
and, also, choose "Resolution
" to "1280*800(16:10)
".
No matter your Debian version is "8
", or even "11
", the upstairs settings
Is OK.
Are you ok? Said, Lei Jun.
- Reboot Host Machine:
Now, it's your time to show!
Please restart my Mac/Windows.
精彩评论