I just upgraded to F-11 and have been trying out the new virt-manager. I have had a few "Huh?" moments that I'd like to share in case they help anyone else out.
The release notes say that F-11 guests now get higher screen resolutions and absolute mouse coordinates via a USB tablet, out of the box. I need to make a CentOS 5.3 guest, and decided to see if I could get those same benefits. I knew the higher screen resolution was possible, because I have been running a CentOS 5.3 guest in F-10 using explicit invocation of qemu-kvm with the -std-vga switch. I hoped that the absolute mouse coordinates would also be possible, as the lack of them was probably the most annoying part of using that guest machine in F-10.
My first attempt was to lie to virt-manager about what kind of guest I was installing. I told it that I was installing an F-11 guest, in hopes that things would Just Work. They didn't. Still, I was able to mostly patch things together as described below.
When I created the virtual machine, I took a look at the hardware list. Even though I had specified an F-11 guest, there was no USB tablet on the hardware list. I thought I was supposed to get that automatically, just by specifying the F-11 guest. No matter; I added it manually. Now I don't need the PS/2 mouse, so let's get rid of it. I can't. The "Remove" button is grayed out. What's up with that?
So I installed CentOS 5.3 in the guest. For the record, if you have SELinux on in your host machine, the CD images have to have type virt_content_t. Something (virt-manager?) apparently set the type correctly for me for CD #1, but I got an AVC denial and no CD visible to the guest when I tried to change to CD #2. So I changed all the CD image types to virt_content_t by hand and everything went okay after that.
Installation finished. I rebooted the machine and got an 800x600 resolution screen. Darn. I looked through Xorg.0.log and found that virt-manager gave me the Cirrus video card. I thought specifying an F-11 guest was supposed to give me a generic VESA card. By adding a Monitor section to my xorg.conf and playing with HorizSync and VertRefresh, I can manage to get a 1280x800 window, but I really want 1280x1024. It doesn't appear to be possible to achieve that, though, as the emulated Cirrus card is reporting a dot clock that can't manage that resolution. How do I get virt-manager to give me the VESA card? It doesn't appear to be possible to get that through the interface it provides. Why not?
The absolute mouse coordinates did NOT work when I first installed the machine. Once I added the Monitor section, they started working. I don't know why, though, as Xorg.0.log says that it is using the ExplorerPS/2 protocol, which suggests that X is using the PS/2 mouse that virt-manager won't let me remove instead of the USB tablet that I added manually.
Thanks for all the work that has gone into improving the F-11 virtualization technology.
FWIW I installed a CentOS 5.3 guest on Fedora 11 host using virt-install (not virt-manager) and this is how the command line turned out:
/usr/bin/qemu-kvm -S -M pc -m 512 -smp 1 -name CentOS5x32 -uuid 2ce397d9-1931-feb1-8ad8-15f22c4f18af -monitor pty -pidfile /var/run/libvirt/qemu//CentOS5x32.pid -boot c -drive file=/dev/vg_trick/CentOS5x32,if=ide,index=0,boot=on -net nic,macaddr=54:52:00:3c:76:11,vlan=0 -net tap,fd=18,script=,vlan=0,ifname=vnet1 -serial pty -parallel none -usb -vnc 127.0.0.1:1
I haven't really tweaked it, because I only use it over ssh.
Rich.
On Mon, Jun 22, 2009 at 10:14:34AM -0600, Jerry James wrote:
When I created the virtual machine, I took a look at the hardware list. Even though I had specified an F-11 guest, there was no USB tablet on the hardware list. I thought I was supposed to get that automatically, just by specifying the F-11 guest. No matter; I added it manually. Now I don't need the PS/2 mouse, so let's get rid of it. I can't. The "Remove" button is grayed out. What's up with that?
The PS/2 mouse is always present in the underlying emulator, whenever you have graphics enabled. Fear not, because if the USB tablet is present & activated by the guest OS, PS/2 mouse will cease to generate any events. So (functionally) it doesn't matter that its still there
So I installed CentOS 5.3 in the guest. For the record, if you have SELinux on in your host machine, the CD images have to have type virt_content_t. Something (virt-manager?) apparently set the type correctly for me for CD #1, but I got an AVC denial and no CD visible to the guest when I tried to change to CD #2. So I changed all the CD image types to virt_content_t by hand and everything went okay after that.
libvirt automatically relabels all CD images to virt_content_t since that is what SELinux wants. It should also be doing this when hotplugging but its possible we missed a codepath - should file a BZ for this problem
Installation finished. I rebooted the machine and got an 800x600 resolution screen. Darn. I looked through Xorg.0.log and found that virt-manager gave me the Cirrus video card. I thought specifying an F-11 guest was supposed to give me a generic VESA card. By adding a Monitor section to my xorg.conf and playing with HorizSync and VertRefresh, I can manage to get a 1280x800 window, but I really want 1280x1024. It doesn't appear to be possible to achieve that, though, as the emulated Cirrus card is reporting a dot clock that can't manage that resolution. How do I get virt-manager to give me the VESA card? It doesn't appear to be possible to get that through the interface it provides. Why not?
We don't support the generic VESA card in libvirt at this time. What the F11 feature was doing was actually using the Cirrus card. All it in fact did was tweak the xorg cirrus driver such that if it saw it had a QEMU emulated Cirrus card instead of a normal one, it would run at 1024x768 instead of 800x600. We'll further improve on this for F12, including support for the various video card models.
The absolute mouse coordinates did NOT work when I first installed the machine. Once I added the Monitor section, they started working. I don't know why, though, as Xorg.0.log says that it is using the ExplorerPS/2 protocol, which suggests that X is using the PS/2 mouse that virt-manager won't let me remove instead of the USB tablet that I added manually.
RHEL5 has absolutely no clue how to correctly configure a USB tablet. You explicitly do *not* want to use the 'mouse' driver in Xorg. It must be using the 'evdev' driver, and must be running in 'absolute' coordinate mode. Anything else will result in pain & suffering. For F11 guests this is all automatically done by blackmagic. RHEL-5 is too old for any of this automatic stuff to work. If you have a USB tablet and it is not configured correctly, the results will in fact be *worse* than a PS/2 mouse. The latest virt-viewer/gkt-vnc client knows how to correctly deal with PS/2 mice, although it does need to grab the mouse pointer todo so.
Daniel