Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no VM console output on FreeBSD 12.1 host #332

Closed
cgull opened this issue Nov 7, 2019 · 6 comments
Closed

no VM console output on FreeBSD 12.1 host #332

cgull opened this issue Nov 7, 2019 · 6 comments

Comments

@cgull
Copy link
Contributor

cgull commented Nov 7, 2019

I've been experimenting with vm for a little while. It was working for me with 12.0, and I think 12.1-BETAs and -RCs, but is working less well for me now with 12.1-RELEASE. With either nmdm or tmux console, I get console output from bhyveload, but none from the kernel once it starts. If i set debug=yes in the config file, I see the output there, and from that I can see that console input works. I think the VM is running normally otherwise, but I'm doing install/boot testing and I haven't exhaustively checked. The same VM produces normal console output if I start bhyve manually in tmux. IIRC I saw similar behavior with a Linux guest yesterday (output from grub-bhyve, none from guest). I see this with both vm-1.3 from packages, or tag v1.4.0 from github.

I suspect I might be doing something wrong somewhere but I haven't found it yet.

@razzfazz
Copy link

razzfazz commented Nov 7, 2019

console=nmdm seems to work for me on 12.1, but console=tmux produces no output at all.

Someone filed a FreeBSD bug report about this here.

@drozdowsky
Copy link

flag -f does not work for me
workaround:

vm start guest
vm console guest 

@scornet256
Copy link

Im definitely not qualified to suggest a fix of some sort, but this helped me (for now).

/usr/local/lib/vm-bhyve/vm-run (from line 266) :

        # actually run bhyve!
        # we're already in the background so we just wait for it to exit
        bhyve ${_opts} \
              ${_devices} \
              ${_iso_dev} \
              ${_comstring} \
              # ${_name} >>"${_logpath}" 2>&1
              ${_name}

@anteract
Copy link

this all fails also without vm-bhyve, so its not really an issue for this project... Not to say it wouldn't be nice of someone comes up with a fix.

@bsdxbsdx
Copy link

I think the cause is https://svnweb.freebsd.org/changeset/base/352720. I've been reverting it to fix vm-bhyve. If the change stays then I suspect vm-bhyve or whatever it uses internally will need to detect and compensate.

@anteract
Copy link

This change worked for me. Thanks

dch pushed a commit to skunkwerks/vm-bhyve that referenced this issue Jan 10, 2020
bhyve was doing UART console emulation on fd 0 for both reads and
writes.  Commits r346550 and r352720 changed it to use fd 0 for input
and fd 1 for output on console.

Fix vm-bhyve to not redirect fd 1.

Fixes churchers#332.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants