VM guest console inaccessible via nmdm(4)

Status
Not open for further replies.

mcroger

Cadet
Joined
Apr 15, 2014
Messages
6
I'm trying to set up a VM in FreeNAS-11.0-U4 (54848d13b). This is a Debian Linux guest I'm trying to boot the installer on, and when the VM is in RUNNING state in the web UI I'm unable to connect via VNC (haven't got a client working successfully with it yet) and the console is inaccessible using cu(1) to an nmdm(4) device. Here is the running VM as seen in processes:

Code:
bhyve -A -P -H -c 1 -m 1024 -s 0:0,hostbridge -s 31,lpc -l com1,/dev/nmdm2A -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \
	-s 3,e1000,tap0 -s 29,fbuf,tcp=0.0.0.0:5902,w=1024,h=768,wait -s 30,xhci,tablet -s 4,ahci-hd,/dev/zvol/znetdata/unifi_disk0 \
	-s 5,ahci-cd,/mnt/znetdata/media/iso/debian-9.2.1-amd64-netinst.iso unifi_controller


And connecting using sudo cu -s 9600 -l /dev/nmdm2B results in "Connected" output but repeated keystrokes on the serial connection give no results.

Any hints on continuing forward? Have seen in other threads that the Java Viewer for TightVNC is the one that seems to work for others, but it is not currently functioning on my macOS client (Java reflection error) so I was hoping to rely on the serial connection. What would cause the serial connection to not work in this case?
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
But does the Debian installer work over a serial console by default? I'm not sure.

Even after installing a Debian guest VM with UEFI boot the FreeNas webUI still shows a serial com port is supposedly available. But again it does nothing.

The problem of incompatible vnc clients has been side-stepped in FreeNAs 11.1RC as they have implemented a noVNC web connection for virtual machines.

I thought MacOS had an in-built vnc client which you could use at the xterm or via safari? Seems a bit ridiculous if you'd have to create a vm on your mac itself just to connect to the vm on Freenas to get it installed. If Debian made it easy to use preseed you could have set up the installer to work over ssh and avoid the bhyve framebuffer connection issue. But IIRC you'd have to modify the net install iso to do that.

Right now, unless you can find a vnc client that works, you're better off still using iohyve at the command line to get your debian VM installed and running. In any case, if you're just intending to use the vm in text mode then you'd be likely to install and configure ssh in the vm once it's running and no use vnc to connect to it..
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
I'm trying to set up a VM in FreeNAS-11.0-U4 (54848d13b). This is a Debian Linux guest I'm trying to boot the installer on, and when the VM is in RUNNING state in the web UI I'm unable to connect via VNC (haven't got a client working successfully with it yet) and the console is inaccessible using cu(1) to an nmdm(4) device. Here is the running VM as seen in processes:

Code:
bhyve -A -P -H -c 1 -m 1024 -s 0:0,hostbridge -s 31,lpc -l com1,/dev/nmdm2A -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \
	-s 3,e1000,tap0 -s 29,fbuf,tcp=0.0.0.0:5902,w=1024,h=768,wait -s 30,xhci,tablet -s 4,ahci-hd,/dev/zvol/znetdata/unifi_disk0 \
	-s 5,ahci-cd,/mnt/znetdata/media/iso/debian-9.2.1-amd64-netinst.iso unifi_controller


And connecting using sudo cu -s 9600 -l /dev/nmdm2B results in "Connected" output but repeated keystrokes on the serial connection give no results.

Any hints on continuing forward? Have seen in other threads that the Java Viewer for TightVNC is the one that seems to work for others, but it is not currently functioning on my macOS client (Java reflection error) so I was hoping to rely on the serial connection. What would cause the serial connection to not work in this case?

A bit of Googling confirmed what I suspected to be the case. The Debian installer needs user input to work over a serial console. So in Freenas this is a catch-22, unless you can connect to the byhve framebuffer via a vnc client at install time, you can't make the user input to get the install to work over a serial console. But as you cannot connect over a vnc client ....

This might help, or at least proves the point: https://github.com/ffries/Debian-installer-with-serial-console

Unfortunately the iso needs to be built in debian 9.

After a quick test, it does appear to work.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Status
Not open for further replies.
Top