Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jan 2001 13:48:58 -0800
From:      Julian Elischer <julian@elischer.org>
To:        Marvin McNett <mmcnett@ucsd.edu>
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: vmware serial connection
Message-ID:  <3A68B649.A52AB05A@elischer.org>
References:  <Pine.SOL.3.96.1010118172853.7903A-100000@kimba.ucsd.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A68B649.A52AB05A>