Migrating an NT4 VM from VMWare to NT4 - Part 2
Sat May 31 2008
This post is really just following up from the last one explaining about problems arising from using NT4 under qemu. Having successfully booted the VM (with some help from http://scottcross.blogspot.com/2006/03/haldll-requires-mps-version-11-system.html), there were a couple of issues I was seeing with general use. It also seems that these were the exact same issues that were being experienced here: http://www.debian-administration.org/users/ajt/weblog/115.
White Mouse Pointer
This is an interesting one. My current workstation runs Debian lenny, whereas the server cluster the VM will run on is Debain etch. Both machines are running qemu 0.9.1: the only real difference that the etch server is 32-bit whereas my workstation is 64-bit. When mounting the VM image locally on my workstation and running qemu, the mouse pointer appears fine when using the VGA driver and the Cirrus driver. However, when running the image on the 32-bit etch server, the mouse pointer appears fine using the in-built VGA driver, but appears as a white box when using the Cirrus driver :-( This is a pain, since the application running on the server requires 256 colours to look respectable. It does make one wonder if this is some kind of compiler bug/word size bug of some description.
After some Google research, I found out that VBE ReactOS drivers were available, which should be able to drive the VM in 256 colours. So I ended up downloading the VGA drivers from here: https://bearwindows.zcm.com.au/vbe9x.htm. Now after installing these video drivers, the mouse pointer appears fine on the VM in 256 colours.
Mouse pointer goes crazy
The symptoms of this bug were very simple: after several minutes of using the VM, the mouse pointer would go crazy where one small touch would send the pointer flying all over the screen. The only cure AFAICT is to reboot the VM which is fairly annoying. Given that if there was a bug of this nature within NT4 someone would have complained by now, I guessed that the qemu mouse emulation was suspect. After adding some extra debug information on the console, I could see that in the middle of the PS/2 mouse stream, an extra ENABLE/ACK pair was being embedded into the PS/2 data stream, and it was soon after this that the mouse would deteriorate.
My first thought was that since qemu emulated an intellimouse (rather than a standard PS/2 mouse), that there was either a problem with the qemu mouse emulation or the intellimouse part of the standard PS/2 driver. Thus I came up with the following patch against qemu 0.9.1 to disable intellimouse emulation:
** hw/ps2.c.orig 2008-05-29 17:25:53.000000000 +0100 --- hw/ps2.c 2008-05-29 17:31:14.000000000 +0100 ************** *** 446,451 **** --- 446,453 ---- s->mouse_detect_state = 0; break; } + /* Force mouse type as PS/2 to fix NT4 crazy mouse bug */ + s->mouse_type = 0; ps2_queue(&s->common, AUX_ACK); s->common.write_cmd = -1; break;
I’m pleased to report so far with this patch, the mouse pointer has stopped exhibiting this behaviour - I suspect that this is a bug in qemu somewhere. I must admit to being slightly disappointed with the qemu development team. Even though I have posted these questions to the development mailing list, no-one has really given me any meaningful answers, even when I have asked what extra information they would need to pass it on. Seems like they are all too busy with the dyngen->TCG migration :(