VirtualBox

Opened 14 years ago

Closed 7 years ago

#6854 closed enhancement (fixed)

Allow hot-plug addition / removal of screens (monitors) in guest OS

Reported by: fuujuhi Owned by:
Component: GUI/multiview Version: VirtualBox 3.2.0
Keywords: multiscreen Cc:
Guest type: other Host type: other

Description (last modified by Frank Mehnert)

It would be nice to add / remove monitors to a running VirtualBox, i.e. change the monitor count without the need to shutdown the guest OS.

In my case for instance, I use VB on a laptop that has an external monitor attached to it. To reduce desktop clutter, I use the fullscreen/seamless mode. However when I detach the external monitor to go somewhere else, I can't use fullscreen/seamless mode anymore because virtualbox complains there are more virtual screens than physical ones.

Also, if I boot the laptop while not attached to the external monitor, I cannot later connect a 2nd monitor to the VB to benefit from the external monitor.

Ideal solution to this problem would be to allow hot-plug addition / removal of new monitor in the guest OS without need of shutdown, etc.

A work-around solution, would be to allow fullscreen/seamless while there is less physical screens than virtual ones, e.g. by disabling one of the screen (in that case, the screen is still visible to the guest OS, but the content is not displayed in the host anymore). That would be less ideal, but still workable and may be easier to implement I guess.

Change History (7)

comment:1 by Cuffs, 10 years ago

This limitation still exists in VirtualBox 4.3.10.

Nowadays it's very common to use a laptop's internal LCD on the go, and multiple physical screens when docked. Having to reboot the guest, in order to make full use of the physical screens, is a big limitation.

comment:2 by eduncan911, 10 years ago

I agree. After switching to a Macbook Pro fulltime, and using VirtualBox now instead of VMware, the multi-display support is very nice.

BUT: I very often disconnect the external monitor(s <- sometimes 2 ext) for several meetings during the day, then reconnect.

So I echo the original ticket logged 4 years ago, and Cuffs comment above:

  • Allow for enabling/disabling the external displays from the HOST.
  • Or, allow Fullscreen on a single monitor when the external monitor has been disabled (that way, we can at least get around two floating windows for two displays).

comment:3 by ercreswick, 9 years ago

I would also make use of this feature on a daily basis (the lack of hot-plug virtual monitors is a major barrier for entry for my use of VMs on a daily basis with Virtual Box).

(As an aside, there doesn't appear to be a way to receive notifications on this ticket -- hopefully commenting will do that, but it would be nice if those aspects of the trac UI were exposed to authenticated users.)

comment:4 by mizzao, 9 years ago

I guess this feature still doesn't exist in Virtualbox 5.0? It would be great to change the monitor config without rebooting.

Currently if I'm using 2 monitors and configure the guest to just output to 1 monitor, it ends up showing a black screen on the second window. Would be nice to just have it disappear!

comment:5 by Frank Mehnert, 8 years ago

Description: modified (diff)
Resolution: fixed
Status: newclosed

The expected behavior with VBox 5.0.x is that for screens which are not used in the guest, the VM window is hidden. This should work if up-to-date Guest Additions are installed. If that does not work, please reopen this ticket.

comment:6 by foobard, 7 years ago

Resolution: fixed
Status: closedreopened

I don't see any preferences for this, so i believe I'm still seeing the old behavior / bug.

System:

  • Host: ubuntu 16.04.02, update'd/upgraded. quadro m2200 with nvidia-381 and intel-microcode.
  • Virtualbox: 5.0.40_Ubuntu r11513
  • Guest: ubuntu 16.04, also up to date
  • Guest additions: sudo /usr/sbin/VBoxService --version == 5.0.40r115130

Problem:

  • working from desk, with laptop docked. Host has two monitors at this point: built-in 4k, and 1920x1080 over displayport
  • boot guest, configured with two displays. Normal maximized window (not seemless, not fullscreen) (Works as expected)
  • un-dock laptop. Host successfully reverts to single screen.
  • But
  • but virtualbox/guest still has two host windows, one for each display

comment:7 by Klaus Espenlaub, 7 years ago

Resolution: fixed
Status: reopenedclosed

Since you're using windowed mode it's next to impossible to sensibly determine the monitor correlation (windows can be on more than one monitor, and maximized windows are still big challenges, as it's up to the window manager what it does for those - in principle they can also span multiple screens). If you'd use fullscreen mode there would be a solution, as there's a known relationship between guest and host monitors, and there's already an option to tell the GUI to automatically update the guest monitor state:

VBoxManage setextradata "vmname" GUI/AutomountGuestScreens 1

This tweak isn't fully tested on all platforms, but we're welcoming feedback. It may become the default monitor handling mechanism for fullscreen mode if the feedback is positive.

To repeat it: this doesn't work with windowed mode.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use