[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-users] Switching between multiple VMs with shared input (One Keyboard + Mouse)



These days I find that one of the things that annoys me the most in my day-to-day use of Xen and some VMs, is switching between them. So far, I have the following:

Reelevant Hardware:

Two Video Cards
Two Monitors (One connected to each Video Card)
One Keyboard and Mouse set (Shared between Dom0 and all VMs)

Reelevant Software:
Dom0 with Arch Linux and Gnome for GUI
Gaming VM with Windows XP, which receives its own Video Card and Monitor
Rarely, another VM if I want to do something that I'm not going to do on the gaming VM

So far, it looks like this:
The black box is the VM that has the other Video Card.


Now, the problem lies in where the Mouse and Keyboard are active at a given time, and how to change them to be active on another VM: If I am on the Windows XP VM, I can easily switch input to Dom0 by pressing Alt + Ctrl, so both Keyboard and Mouse now are active on Dom0. However, to change back to the VM, I have to left-click somewhere inside the black box, which also has the annoying behaviator than that left-click to change the focus of the Mouse and Keyboard to that VM, is also a left-click on the relative position in the actual VM, which depending on where that click falls may have unintended consequences (For example, harmless on Windows Desktop, but shoots a gun if I am playing a FPS and didn't paused it). If I have another VM open like on the screenshot, is even worse, because I can't directly switch from one to another, I have to Alt + Ctrl out of it to Dom0, then left-click inside the other VM. This means that switching between VMs is highly inefficient, and sometimes even worse, because Gnome likes to rearrange minimized windows when I open more things on Dom0 so I can't memorize locations to click.

My idea is something like having each VM in a tty console, so I can switch between them with Alt + Ctrl + Fx. It would be even better if the VM is in fullscreen mode in their own tty to make it feel even more natural instead of windowed with borders (Unless I needed to see multiple VMs on the same Monitor, where they would be windowed in resolutions that don't max the Monitor). This should apply to Dom0 and all VMs but the one that has its own GPU/Monitor, where Alt + Ctrl + Fing into it should just make Keyboard and Mouse active in that VM, yet I should simultaneously see the last VM that I switched to in the other Monitor. No black square wasting screen space.
I'm pretty confident than doing something like that should be possible, however, did anyone actually tried and knows what is needed? I had decent results opening another X.org session in other tty with startx, then using xl create from there, but would prefer instructions from someone more experienced or that has better shortcuts ideas because there are too many rough edges (Seems I have to configure X.org settings per-tty so I don't get the default lame three white rectangles).

Is there anyone that can share experience, ideas, etc, about this? I think that having a well-defined way of dealing with VM switching and shortcuts would improve user experience. And if there is one, I entirely missed it.



Also, I'm intending to downgrade my GUI bloated Dom0 to just a text console, so I can leave Dom0 as lightweight as possible and do anything user-related in VMs. I didn't set up that way when I configured my system some months ago because I still had troubles doing some things using only the console, so I rushed to a GUI. Then later I figured out that if I make another VM to do what I'm currently doing in Dom0 (Basic browsing), I had to do VGA Passthrough of the integrated GPU to have Flash acceleration inside a Linux based VM, at the cost of having to access Dom0 in a headless way (Like SSH). XenGT will take care of that when its ready because with a virtualized GPU, I will not have to choose either GPU acceleration in other VMs or Dom0 video output, I should be able to have both.
As far that I am aware, with Xen I have three choices for video output from a VM:
1) Headless: A GPU is still emulated but there is no default video output, unless I use remote viewing Software installed from inside the VM's OS.
2) VNC: Xen provides a way to route the video output by itself. The VM can work headless, but you can also use VNC Viewer to see the VM's video output either locally or remotely.
3) SDL: Intended to be used locally, but you still can use remote viewing Software from inside the VM. Forces you to have X.org installed and to create the VM from inside a X session.

So far, I always found SDL more straightforward than VNC. So the lightest Dom0 for SDL, at minimum, needs X.org, plus possibily a Window Manager to not have to use a full blown Desktop Enviroment like Gnome or KDE.
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.