From owner-freebsd-emulation Fri Jan 19 13:51:24 2001 Delivered-To: freebsd-emulation@freebsd.org Received: from mail.interware.hu (mail.interware.hu [195.70.32.130]) by hub.freebsd.org (Postfix) with ESMTP id D77CE37B402 for ; Fri, 19 Jan 2001 13:51:04 -0800 (PST) Received: from marakesh-02.budapest.interware.hu ([195.70.50.130] helo=elischer.org) by mail.interware.hu with esmtp (Exim 3.16 #1 (Debian)) id 14JjQz-0000AN-00; Fri, 19 Jan 2001 22:51:01 +0100 Message-ID: <3A68B649.A52AB05A@elischer.org> Date: Fri, 19 Jan 2001 13:48:58 -0800 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: Marvin McNett Cc: freebsd-emulation@freebsd.org Subject: Re: vmware serial connection References: Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Marvin McNett wrote: > > Could anyone tell me whether or not serial ports work in vmware for > FreeBSD? If so, is it possible to establish a serial connection between > the host and guest operating systems? In particular, what devices should > I be using on the respective machines and in the vmware configuration > editor? I'd like to try using remote gdb between the host and guest > machines, but can't seem to get a serial connection established. > > I've tried using /dev/cuaa0 as the device in the configuration editor, but > it didn't seem to work. On the other hand, I'm not sure if I'm properly > testing to see that the serial connection has been established (I tried > minicom to no avail). Perhaps someone could tell me how to do that as > well. Is it possible to simply cat a file to the device on one end and > read it on the other? If so, how? > > Sorry if this is the wrong list to be submitting such a question, but I > didn't get a response from the questions list. Perhaps someone here knows > more about this. I do this regularly. You need to use the "nullmodem" driver (available at http://www.freebsd.org/~julian/ ) --- my configuration files attach the output of the serial ports on vmware to the nullmodem device, and I attach gdb to the other end here's the end of /etc remote (for tip to teh console) na:dv=/dev/nmdma0:br#115200:pa=none: nb|vmcons:dv=/dev/nmdmb0:br#115200:pa=none:etimeout=100 nc:dv=/dev/nmdma1:br#115200:pa=none: nd|vmgdb:dv=/dev/nmdmb1:br#115200:pa=none: ------ Here's what /dev/ looks like: crw-r--r-- 1 root wheel 20, 0 Mar 30 2000 /dev/nmdma0 crw-r--r-- 1 root wheel 20, 2 Jan 13 16:40 /dev/nmdma1 crw-r--r-- 1 root wheel 20, 1 Jan 3 13:31 /dev/nmdmb0 crw-r--r-- 1 root wheel 20, 3 Jan 13 16:40 /dev/nmdmb1 --------- Here's the vmware (1.02) setup: !/usr/local/lib/vmware/bin/vmware # Virtual hard disk on primary master ide0:0.present = TRUE ide0:0.fileName = /unused/vmware/FreeBSD/FreeBSD.dsk ide0:0.deviceType = ata-hardDisk ide0:0.mode = persistent # CD-ROM ide1:0.present = FALSE ide1:0.fileName = /dev/acd0c ide1:0.deviceType = atapi-cdrom # Floppy floppy0.present = TRUE floppy0.fileName = /dev/fd0 # Networked to host only subnet ethernet0.present = TRUE ethernet0.connectionType = hostOnly # Memory size memsize = 32 # Nvram nvram = /unused/vmware/FreeBSD/FreeBSD.nvram # Log file log.fileName = /unused/vmware/FreeBSD/FreeBSD.log # Hints hint.guestOS = other:FreeBSD ide1:1.present = FALSE ide1:1.deviceType = "rawDisk" ide1:1.fileName = "real" floppy0.startConnected = FALSE serial0.present = TRUE serial0.fileName = "/dev/cuaa4" ide0:1.present = TRUE ide0:1.mode = "nonpersistent" ide0:1.fileName = "/unused/vmware/FreeBSD/swap.dsk" serial1.present = TRUE serial1.fileName = "/dev/nmdma1" mouse.hostType = "PS/2" mouse.fileName = "/dev/sysmouse" -------- and here's the script I use to start it. #!/bin/sh vmware -x FreeBSD.cfg& #sleep 10 #xterm -T "vm console" -e tip vmcons& cd /sys/compile/VJ while : do echo "hit return for debugger" read junk #ddd xxgdb done ------ and here's the .gdbinit file in the compile directory file kernel.debug set remotebaud 9600 target remote /dev/nmdmb1 ----- It's very slow but it allows me to debug the virtual machine from my laptop as if I had two machines. > > Thanks, > Marvin > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-emulation" in the body of the message -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000 ---> X_.---._/ from Perth, presently in: Budapest v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message