首页 文章

使用虚拟串行端口调试Windows XP guest虚拟机

提问于
浏览
1

我试图通过QEmu虚拟串口调试我的Windows XP客户内核 .

我正在关注"Setting up the target VM" (linux-kvm.org)以使用设置debugee

qemu-system-x86_64 \-m 1024 \-drive file=win-target.img \-serial tcp:127.0.0.1:4445

问题是QEmu无法启动错误消息

qemu-system-x86_64:-serial tcp:127.0.0.1:portNo:未指定主机和/或端口qemu:无法将串行设备连接到字符后端'tcp:127.0.0.1:portNo'

虽然我可以通过在 tcp:ip:portNumber 之后添加 serve,nowait 来成功创建调试器VM .

有什么我想念的吗?

1 回答

  • 0

    我没有通过链接,我不使用TCP和端口,但我经常使用qemu从xp32物理主机调试xp64虚拟机

    对于网络我使用tap适配器

    我用于调试以及非调试Qemu会话的bat文件如下所示
    qemu是非常老的一个0.9.0的窗口

    during kernel debugging the windbg tends to be terminated several times   
        during startup (enabling DEBUG_SPEW ctrl+alt+d and enabling a log prior  
        to startup of vm shows too much commands in serial pipe restarting   
        kd connection error but i couldnt find anything relevent to solve the issue    
        i simply restart the vm with the bat after a few restarts of the batfile    
        windbg starts running and then there is no problems of windbg  termination
    

    bat文件的内容

    IF "%1" == ""       goto nodebug
    IF "%1" == "dbg"    goto debug
    
    :nodebug
    %cd%\qemu-system-x86_64.exe -L . -m 700 -hda xp64.img -net nic,model=rtl8139 -net tap,ifname=mytap -localtime
    goto exit
    
    :debug
    %cd%\qemu-system-x86_64.exe -L . -m 700 -hda xp64.img -net nic,model=rtl8139 -net tap,ifname=mytap -localtime -serial pipe:debugPipe
    goto exit
    
    :exit
    

相关问题