如何增加VirtualBox屏幕的大小?

时间:2017-09-29 22:10:16

标签: linux virtualbox

我试图在VirtualBox 5.1.28中运行Arch Linux,其中主机操作系统是Windows 10.问题是显示尺寸太小,即使我最大化窗口大小。看看这个截图,看看我的意思:

Arch Linux in VirtualBox 5.1.28

我搜索了这个问题,但我遇到的每个可能的解决方案都说要安装Guest Additions,但正如您从上面的屏幕截图中看到的那样,我没有选择安装Guest Additions。

2 个答案:

答案 0 :(得分:0)

我知道这有点晚了,但是对于其他遇到相同问题的人来说。可以遵循以下解决方案。这对我有用。

在安装了Ubuntu来宾计算机(在我的情况下,我正在Windows中安装ubuntu虚拟机)之后,您会发现Ubuntu操作系统的屏幕尺寸不可扩展,并且无法在主机和Ubuntu之间共享文件夹。

要获得更好的屏幕分辨率,请执行以下步骤。

第1步

sudo adduser USERNAME sudo

其中USERNAME应替换为当前用户的名称。

第2步

To install Guest Additions, click Devices > Insert Guest Additions CD images…

第3步

Click 'Run' button (next to 'Cancel' button) to start the installation. Note that the version of VBOXADDITIONS should be matched with the one of VirtualBox you have installed.

第4步

Installing Guest Additions requires root privilege. Enter user's password (assume the current user has sudo privilege).

第5步

When the installation is finished, press Return key to close the terminal window.

步骤6

Now prepare to restart the system to enable the change. Click 'Shutdown' on the menu and then the 'Restart' button.

重启Ubuntu后,您会看到桌面分辨率更好。

获得更清晰的参考

在下面的链接中从Guest Addition(title)小节中进行检查。图像清晰,说明已完成 https://brb.nci.nih.gov/seqtools/installUbuntu.html

答案 1 :(得分:-1)

嗯,这有点痛苦,但你要找的是:

VBoxManage controlvm "your_vm_name" setvideomodehint Xres Yres ColorDepth

示例:

VBoxManage controlvm "Win7Pro_32-bit" setvideomodehint 1464 834 32

或与Archlinux客人:

VBoxManage controlvm arch_1_64 setvideomodehint 1366 864 32

对于Windows guest,只要安装了WindowsGuestAdditions,就会立即调整大小,对于Linux guest虚拟机,发出命令并重新启动VM。

对于Archlinux来宾本身内的启动帧缓冲区解析,请参阅Setting the framebuffer resolution