Re: nmdm issues with bhyve

From: Polarian <polarian_at_polarian.dev>
Date: Tue, 16 Jul 2024 15:56:10 UTC
Hello,

I will reply to both emails here.

Mario:
> In short words,what's nmdm used for ? thanks.

nmdm(4) (null modem) allows to connect two devices through serial
communication. The nmdm device simply allows two devices, A and B to
pass data to one another. What I am trying to do is get bhyve to
redirect the output from com1 to a nmdm device, which would allow me
to cu to read the output from com1 on the host
(instead of using stdio or vnc).

Therefore allowing configuration of the virtual machine over ssh
instead of having to use vnc which has security implications when used
remotely.

For more information on null modem see the man page, or [1].

Bakul:
> I use the B device here, as in /dev/nmdm3B

I do not believe this would make a difference but I will give it a go
anyways, thanks :)

> They seem to get generated on demand. e.g if you do
> 
> cu -l /dev/nmdm3A
> 
> Both A and B devices will get generated.

Yes, nmdm(4) already states this:

"The nmdm driver implements “on-demand device creation” so simply
accessing a given instance in /dev will create it."

However that is not the issue, the issue is that bhyve SHOULD have
created it, if there is data from com1 going to a nmdm device as
specified in the bhyve command, then the devices should be appearing,
but they are not, that is what I can't figure out.

Thank you,
-- 
Polarian
GPG signature: 0770E5312238C760
Jabber/XMPP: polarian@icebound.dev

[1] https://en.wikipedia.org/wiki/Null_modem