Reputation: 99
Is it possible to get virt-viewer to start up with 2 displays?
Background: we have a linux based retail system that typically runs on terminals with multiple displays. Basically as X starts up we detect how many displays are connected and configure our system based on that (i.e. we have a primary display which is always shown, and an optional secondary display which is shown on systems with 2 screens). For testing we run this system in a VM (libvirt spice/QEMU based) with spice-vdagent allowing us to open up 2 displays with virt-viewer and thus emulating the same setup as the real terminals.
The problem is that virt-viewer can't seem to start up with 2 displays, I always have to open the second display using the View->Displays menu once X has started. This causes a problem since the screen detection and configuration has already happened at this point (and since only 1 display was open the system only detected 1 screen).
The only workaround I've found so far is to open the second display and then restart X forcing reconfiguration, however I really would need the second display to be open from start so we can get a two screen system without any manual intervention.
Can this be done? One problem is that the second display can only be opened once spice-vdagent has started, and that can't start until X has started.
Upvotes: 5
Views: 13502
Reputation: 356
If your guest is a Linux, you'll have to make sure the heads
property is set to 2 in your xml under video
tag. If you have access to virsh, you can do virsh edit [name on vm]
. If you start it directly from the terminal you probably have to set it as a flag.
Upvotes: 1
Reputation: 3766
With virt-viewer 6.0 using spice, it automatically starts with as many displays as the guest has enabled at boot.
Caveats:
Upvotes: 0
Reputation: 253
It is possible as shown here: https://www.youtube.com/watch?v=UySlAfz7e7Q
However, I was out of luck trying this on Ubuntu though. My mouse would not work. Whenever I went to the second screen, it shooted back to the first one.
I believe this was because of Unity. On Fedora and other Gnome based systems it is supposed to run great.
Upvotes: 0