[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [Question]WinDbg runs too slowly or exits unexpectly when d
From: |
Mars.Cao |
Subject: |
[Qemu-devel] [Question]WinDbg runs too slowly or exits unexpectly when debug windows guest driver under QEMU 0.15.50 |
Date: |
Wed, 19 Oct 2011 18:24:02 +0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110927 Red Hat/3.1.15-1.el6_1 Thunderbird/3.1.15 |
WinDbg runs too slowly or exits unexpectedly when debug windows guest
driver under QEMU 0.15.
I installed 2 windows (WinXP SP3)VMs on my host (RHEL6.1).
The basic debug method is :
1.Setup the Windows driver Kit in host
/usr/local/bin/qemu-system-x86_64 -drive
file=winxpsp3.img,if=virtio,format=qcow2,cache=none,aio=threads -smp 2
-net tap,ifname=tap0,script=no,downscript=no -net
nic,model=virtio,macaddr=52:54:00:d6:be:bb -m 1024 --enable-kvm -serial
tcp:127.0.0.1:4445,server,nowait -cdrom WDK.iso
power off.
2.Run the guest and edit the boot.ini of the guest windows
/usr/local/bin/qemu-system-x86_64 -drive
file=winxp-guest.img,if=virtio,format=qcow2,cache=none,aio=threads -smp
2 -net tap,ifname=tap1,script=no,downscript=no -net
nic,model=virtio,macaddr=52:54:00:d6:be:ee -m 1024 --enable-kvm
edit boot.ini and duplicate the default boot option add the line "/debug
/debugport=COM1 /baudrate=115200"
3.Run host and WinDbg
/usr/local/bin/qemu-system-x86_64 -drive
file=winxpsp3.img,if=virtio,format=qcow2,cache=none,aio=threads -smp 2
-net tap,ifname=tap0,script=no,downscript=no -net
nic,model=virtio,macaddr=52:54:00:d6:be:bb -m 1024 --enable-kvm -serial
tcp:127.0.0.1:4445,server,nowait
Run the host VM,and then run WinDbg then "Ctrl+k" kernel debug to
connect the guest for debugging through COM1.
4.Run the guest to debug
Restart the guest,select the windows debug option in the boot menu.
/usr/local/bin/qemu-system-x86_64 -drive
file=winxp-guest.img,if=virtio,format=qcow2,cache=none,aio=threads -smp
2 -net tap,ifname=tap1,script=no,downscript=no -net
nic,model=virtio,macaddr=52:54:00:d6:be:ee -m 1024 --enable-kvm -serial
tcp:127.0.0.1:4445
There are several problems when debugging:
1).The Windows VM boot slow (more than 20 seconds)and does not run smoothly.
I use the qemu-kvm (version 0.12.1) which pre-installed in the RedHat
RHEL6.1 with same option and same image file, the VM boots and runs much
more better than using QEMU-0.15.0.
address@hidden images]# /usr/local/bin/qemu-system-x86_64 --version
QEMU emulator version 0.15.50, Copyright (c) 2003-2008 Fabrice Bellard
address@hidden images]# /usr/libexec/qemu-kvm --version
QEMU PC emulator version 0.12.1 (qemu-kvm-0.12.1.2), Copyright (c)
2003-2008 Fabrice Bellard
2).The process of WinDbg on the host VM connecting to the guest occupy
so much time.
It spend at least 10 minutes to connect the guest VM when debugging the
windows kernel by WinDbg.
3).When WinDbg connecting to the guest VM(not connected yet),WinDbg exit
unexpected sometimes, and sometimes can not connect to the guest. And
the probability of the problem is high.
I have no idea what is wrong?
The COM rate is too slow,the QEMU is not used correctly or some bugs in
QEMU?
Can anyone give me some tips?
- [Qemu-devel] [Question]WinDbg runs too slowly or exits unexpectly when debug windows guest driver under QEMU 0.15.50,
Mars.Cao <=